Skip to content

Commit ba4243c

Browse files
committed
.github/workflows: establish basic build and test actions jobs
Upstream doesn't use GitHub actions for CI as GitHub is simply a mirror. Our workflows involve GitHub, so establish some basic CI jobs. Updates tailscale/corp#28877 Signed-off-by: Jordan Whited <[email protected]>
1 parent 91a0587 commit ba4243c

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

.github/workflows/test.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: ["tailscale"]
6+
pull_request:
7+
branches: ["tailscale"]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-22.04
12+
strategy:
13+
matrix:
14+
include:
15+
- goos: linux
16+
goarch: amd64
17+
- goos: linux
18+
goarch: arm64
19+
- goos: linux
20+
goarch: "386"
21+
- goos: linux
22+
goarch: loong64
23+
- goos: linux
24+
goarch: arm
25+
goarm: "5"
26+
- goos: linux
27+
goarch: arm
28+
goarm: "7"
29+
# macOS
30+
- goos: darwin
31+
goarch: amd64
32+
- goos: darwin
33+
goarch: arm64
34+
# Windows
35+
- goos: windows
36+
goarch: amd64
37+
- goos: windows
38+
goarch: arm64
39+
# BSDs
40+
- goos: freebsd
41+
goarch: amd64
42+
- goos: openbsd
43+
goarch: amd64
44+
steps:
45+
- name: checkout
46+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
47+
- name: setup go
48+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
49+
with:
50+
check-latest: true
51+
- name: build
52+
run: go build ./...
53+
env:
54+
GOOS: ${{ matrix.goos }}
55+
GOARCH: ${{ matrix.goarch }}
56+
CGO_ENABLED: "0"
57+
58+
test:
59+
runs-on: ubuntu-22.04
60+
steps:
61+
- name: checkout
62+
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
63+
- name: setup go
64+
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
65+
- name: test
66+
run: go test -race -v ./...

0 commit comments

Comments
 (0)