name: build on: - push - pull_request permissions: contents: read concurrency: cancel-in-progress: true group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} jobs: build: name: ${{ matrix.os }}-${{ matrix.arch }} runs-on: ubuntu-latest strategy: fail-fast: false matrix: include: - os: linux arch: 386 - os: linux arch: amd64 - os: linux arch: arm64 - os: linux arch: arm - os: linux arch: ppc64le - os: linux arch: s390x - os: darwin arch: amd64 - os: darwin arch: arm64 - os: freebsd arch: amd64 - os: openbsd arch: amd64 - os: windows arch: amd64 steps: - name: Code checkout uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false - name: Setup Go id: go uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 with: cache-dependency-path: | go.sum go-version-file: 'go.mod' - run: go version - name: Build ${{ matrix.os }}-${{ matrix.arch }} run: GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build