-
-
Notifications
You must be signed in to change notification settings - Fork 7
49 lines (47 loc) · 1.27 KB
/
ci.yml
File metadata and controls
49 lines (47 loc) · 1.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Spaceflake CI (Lint & Test)
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
jobs:
lint-test:
name: Lint & Test
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.24
- name: Lint
uses: golangci/golangci-lint-action@v7
with:
version: latest
- name: Test
run: go test -v ./...
build:
name: Build for ${{ matrix.target.goos }}/${{ matrix.target.goarch }}
runs-on: ubuntu-latest
needs: [lint-test]
strategy:
matrix:
target:
- { goos: linux, goarch: amd64 }
- { goos: linux, goarch: arm64 }
- { goos: darwin, goarch: amd64 }
- { goos: darwin, goarch: arm64 }
- { goos: windows, goarch: amd64 }
- { goos: windows, goarch: arm64 }
- { goos: android, goarch: arm64 }
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.24
- name: Build
run: GOOS=${{ matrix.target.goos }} GOARCH=${{ matrix.target.goarch }} go build -v ./...