name: ci on: push: pull_request: jobs: test: strategy: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - uses: actions/setup-go@v5 with: go-version-file: go.mod - name: format if: runner.os == 'Linux' run: test -z "$(gofmt -l .)" - run: go vet ./... - run: go test ./... - name: race if: runner.os != 'Windows' run: go test -race ./... - name: cross-build if: runner.os == 'Linux' run: | for t in linux/arm64 linux/386 darwin/arm64 windows/amd64 freebsd/amd64; do GOOS=${t%/*} GOARCH=${t#*/} CGO_ENABLED=0 go build -o /dev/null ./cmd/mapsize done