Skip to content

Code cleaned, CI +go1.21, -go1.18 (#45) #30

Code cleaned, CI +go1.21, -go1.18 (#45)

Code cleaned, CI +go1.21, -go1.18 (#45) #30

Workflow file for this run

name: Go
on:
push:
branches: [ v* ]
pull_request:
branches: [ v* ]
jobs:
# Test
tests:
name: Test go${{ matrix.go }} on ${{ matrix.os }}
strategy:
matrix:
os:
- 'ubuntu-latest'
- 'macos-latest'
- 'windows-latest'
go:
- '1.19'
- '1.20'
- '1.21'
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go }}
- run: go test -v -race ./...
# Lint
# lint:
# name: Lint go${{ matrix.go }}
#
# strategy:
# matrix:
# go:
# - 1.16
# - 1.17
# - 1.18
#
# runs-on: ubuntu-latest
#
# steps:
# - uses: actions/checkout@v2
# - uses: actions/setup-go@v2
# with:
# go-version: ${{ matrix.go }}
# - uses: golangci/golangci-lint-action@v2
# with:
# version: v1.45
# Build
build:
name: Build ${{ matrix.goos }}/${{ matrix.goarch }} on ${{ matrix.os }}
strategy:
matrix:
# `go tool dist list` with many exclusions
include:
- { os: ubuntu-latest, goos: linux, goarch: amd64, cgo: '0' }
- { os: ubuntu-latest, goos: linux, goarch: arm64, cgo: '0' }
- { os: ubuntu-latest, goos: linux, goarch: ppc64le, cgo: '0' }
- { os: ubuntu-latest, goos: android, goarch: amd64, cgo: '0' }
- { os: ubuntu-latest, goos: android, goarch: arm64, cgo: '0' }
- { os: ubuntu-latest, goos: freebsd, goarch: amd64, cgo: '0' }
- { os: ubuntu-latest, goos: freebsd, goarch: arm64, cgo: '0' }
- { os: ubuntu-latest, goos: openbsd, goarch: amd64, cgo: '0' }
- { os: ubuntu-latest, goos: openbsd, goarch: arm64, cgo: '0' }
# MacOS IOKit required, so no cross-build available
# - { os: ubuntu-latest, goos: darwin, goarch: amd64 }
# - { os: ubuntu-latest, goos: darwin, goarch: arm64 }
- { os: macos-latest, goos: darwin, goarch: amd64, cgo: '1' }
- { os: macos-latest, goos: darwin, goarch: arm64, cgo: '1' }
- { os: windows-latest, goos: windows, goarch: amd64, cgo: '0' }
- { os: windows-latest, goos: windows, goarch: arm64, cgo: '0' }
runs-on: ${{ matrix.os }}
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: ${{ matrix.cgo }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v4
with:
go-version: '1.21'
- run: uname -a && go build