Skip to content

Commit 68f63a7

Browse files
committed
.github: build/crossbuild binaries in sanity check.
Signed-off-by: Krisztian Litkey <[email protected]>
1 parent 3b6fa86 commit 68f63a7

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

.github/workflows/sanity.yml

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
on: [push, pull_request]
22
name: Sanity
3+
4+
env:
5+
GO_VERSION: '1.17.x'
6+
37
jobs:
48
build:
59
name: "Run go sanity tools"
@@ -8,7 +12,7 @@ jobs:
812
- uses: actions/checkout@v2
913
- uses: actions/setup-go@v2
1014
with:
11-
go-version: 1.17.x
15+
go-version: ${{ env.GO_VERSION }}
1216
- name: Install golint
1317
run: go get -u golang.org/x/lint/golint
1418
- name: Lint
@@ -19,3 +23,30 @@ jobs:
1923
run: make vet
2024
- name: Test
2125
run: make test
26+
27+
28+
# Make sure binaries compile on multiple platforms.
29+
crossbuild:
30+
name: Build/Crossbuild Binaries
31+
runs-on: ubuntu-20.04
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
include:
36+
- goos: linux
37+
goarch: amd64
38+
- goos: windows
39+
goarch: amd64
40+
41+
steps:
42+
- uses: actions/checkout@v2
43+
- uses: actions/setup-go@v2
44+
with:
45+
go-version: ${{ env.GO_VERSION }}
46+
- name: Build
47+
env:
48+
GOOS: ${{matrix.goos}}
49+
GOARCH: ${{matrix.goarch}}
50+
run: |
51+
env | grep ^GO
52+
make

0 commit comments

Comments
 (0)