Skip to content

Build

Build #78

Workflow file for this run

name: Build
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
- cron: "0 0 * * 4"
jobs:
build:
strategy:
matrix:
goos:
- darwin
- freebsd
- linux
- windows
name: cross-compilation (GOOS=${{ matrix.goos }})
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3.3.0
with:
go-version: 1.19
- uses: actions/checkout@v3.0.2
- run: go build
env:
GOOS: ${{ matrix.goos }}
test:
strategy:
matrix:
go_version:
- 1.18
- 1.19
os:
- macos
- ubuntu
- windows
goarch:
- 386
- amd64
exclude:
- os: macos
goarch: 386
name: test (${{ matrix.os }}/go-${{ matrix.go_version }}/${{ matrix.goarch }})
runs-on: ${{ matrix.os }}-latest
steps:
- uses: actions/setup-go@v3.3.0
id: go
with:
go-version: ${{ matrix.go_version }}
- uses: actions/checkout@v3.0.2
- run: go mod download
- run: make staticcheck
if: matrix.go_version == '1.19'
- run: make gotest
env:
GOARCH: ${{ matrix.goarch }}
GOPROXY: off
- run: make integration
if: matrix.os != 'macos' && matrix.goarch == 'amd64'
env:
GOFLAGS: -mod=readonly
lint:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3.0.2
- uses: golangci/golangci-lint-action@v3.2.0