add workflow

This commit is contained in:
wh1te909 2022-06-17 18:59:24 -07:00
parent 42be72f0b4
commit 959a1bb8c8

35
.github/workflows/ci.yml vendored Normal file
View File

@ -0,0 +1,35 @@
name: Run tests
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
jobs:
build:
runs-on: ubuntu-latest
name: Run tests
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: '1.18.3'
- name: Ensure linux agent compiles
run: |
ARCHS='amd64 386 arm64 arm'
for i in ${ARCHS}; do
env CGO_ENABLED=0 GOOS=linux GOARCH=${i} go build -ldflags "-s -w"
done
- name: Ensure windows agent compiles
run: |
ARCHS='amd64 386'
for i in ${ARCHS}; do
env CGO_ENABLED=0 GOOS=windows GOARCH=${i} go build -ldflags "-s -w"
done