Code cleaned, CI +go1.21, -go1.18 #27
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 } | |
- { os: ubuntu-latest, goos: linux, goarch: arm64 } | |
- { os: ubuntu-latest, goos: linux, goarch: ppc64le } | |
- { os: ubuntu-latest, goos: android, goarch: amd64 } | |
- { os: ubuntu-latest, goos: android, goarch: arm64 } | |
- { os: ubuntu-latest, goos: freebsd, goarch: amd64 } | |
- { os: ubuntu-latest, goos: freebsd, goarch: arm64 } | |
- { os: ubuntu-latest, goos: openbsd, goarch: amd64 } | |
- { os: ubuntu-latest, goos: openbsd, goarch: arm64 } | |
# 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 } | |
- { os: macos-latest, goos: darwin, goarch: arm64 } | |
- { os: windows-latest, goos: windows, goarch: amd64 } | |
- { os: windows-latest, goos: windows, goarch: arm64 } | |
runs-on: ${{ matrix.os }} | |
env: | |
GOOS: ${{ matrix.goos }} | |
GOARCH: ${{ matrix.goarch }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-go@v4 | |
with: | |
go-version: '1.21' | |
- run: go mod download | |
- run: go build |