| 1 |
name: build |
| 2 |
|
| 3 |
on: |
| 4 |
- push |
| 5 |
- pull_request |
| 6 |
|
| 7 |
permissions: |
| 8 |
contents: read |
| 9 |
|
| 10 |
concurrency: |
| 11 |
cancel-in-progress: true |
| 12 |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} |
| 13 |
|
| 14 |
jobs: |
| 15 |
build: |
| 16 |
name: ${{ matrix.os }}-${{ matrix.arch }} |
| 17 |
runs-on: ubuntu-latest |
| 18 |
strategy: |
| 19 |
fail-fast: false |
| 20 |
matrix: |
| 21 |
include: |
| 22 |
- os: linux |
| 23 |
arch: 386 |
| 24 |
- os: linux |
| 25 |
arch: amd64 |
| 26 |
- os: linux |
| 27 |
arch: arm64 |
| 28 |
- os: linux |
| 29 |
arch: arm |
| 30 |
- os: linux |
| 31 |
arch: ppc64le |
| 32 |
- os: linux |
| 33 |
arch: s390x |
| 34 |
- os: darwin |
| 35 |
arch: amd64 |
| 36 |
- os: darwin |
| 37 |
arch: arm64 |
| 38 |
- os: freebsd |
| 39 |
arch: amd64 |
| 40 |
- os: openbsd |
| 41 |
arch: amd64 |
| 42 |
- os: windows |
| 43 |
arch: amd64 |
| 44 |
steps: |
| 45 |
- name: Code checkout |
| 46 |
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 |
| 47 |
with: |
| 48 |
persist-credentials: false |
| 49 |
|
| 50 |
- name: Setup Go |
| 51 |
id: go |
| 52 |
uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6.4.0 |
| 53 |
with: |
| 54 |
cache-dependency-path: | |
| 55 |
go.sum |
| 56 |
go-version-file: 'go.mod' |
| 57 |
- run: go version |
| 58 |
|
| 59 |
- name: Build ${{ matrix.os }}-${{ matrix.arch }} |
| 60 |
run: GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} go build |