.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 <jordan@tailscale.com>
This commit is contained in:
parent
91a0587fb2
commit
6413b491d4
1 changed files with 68 additions and 0 deletions
68
.github/workflows/test.yml
vendored
Normal file
68
.github/workflows/test.yml
vendored
Normal file
|
|
@ -0,0 +1,68 @@
|
||||||
|
name: CI
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches: ["tailscale"]
|
||||||
|
pull_request:
|
||||||
|
branches: ["tailscale"]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
include:
|
||||||
|
- goos: linux
|
||||||
|
goarch: amd64
|
||||||
|
- goos: linux
|
||||||
|
goarch: arm64
|
||||||
|
- goos: linux
|
||||||
|
goarch: "386"
|
||||||
|
- goos: linux
|
||||||
|
goarch: loong64
|
||||||
|
- goos: linux
|
||||||
|
goarch: arm
|
||||||
|
goarm: "5"
|
||||||
|
- goos: linux
|
||||||
|
goarch: arm
|
||||||
|
goarm: "7"
|
||||||
|
# macOS
|
||||||
|
- goos: darwin
|
||||||
|
goarch: amd64
|
||||||
|
- goos: darwin
|
||||||
|
goarch: arm64
|
||||||
|
# Windows
|
||||||
|
- goos: windows
|
||||||
|
goarch: amd64
|
||||||
|
- goos: windows
|
||||||
|
goarch: arm64
|
||||||
|
# BSDs
|
||||||
|
- goos: freebsd
|
||||||
|
goarch: amd64
|
||||||
|
- goos: openbsd
|
||||||
|
goarch: amd64
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
- name: setup go
|
||||||
|
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
|
||||||
|
with:
|
||||||
|
go-version-file: go.mod
|
||||||
|
- name: build
|
||||||
|
run: go build ./...
|
||||||
|
env:
|
||||||
|
GOOS: ${{ matrix.goos }}
|
||||||
|
GOARCH: ${{ matrix.goarch }}
|
||||||
|
CGO_ENABLED: "0"
|
||||||
|
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- name: checkout
|
||||||
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
- name: setup go
|
||||||
|
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5.5.0
|
||||||
|
with:
|
||||||
|
go-version-file: go.mod
|
||||||
|
- name: test
|
||||||
|
run: go test -race -v ./...
|
||||||
Loading…
Add table
Add a link
Reference in a new issue