Add more code examples to readme #139
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 cross compile | ||
on: | ||
push: | ||
pull_request: | ||
branches: [ "main" ] | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
CC: ["clang"] | ||
ARCH: ["amd64", "arm32v5", "arm32v6", "arm32v7", "i386", "arm64", "mips64", "mips64le", "mips", "mipsle", "ppc64", "ppc64le", "riscv64", "s390x"] | ||
go-version: [ '1.19', '1.20', '1.21.x' ] | ||
fail-fast: false | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Setup Go ${{ matrix.go-version }} | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
- name: Display Go version | ||
run: go version | ||
- name: Install Golang deps | ||
run: sudo ./misc/install-debian-go-deps-by-arch.sh ${{ matrix.ARCH }} | ||
- name: Install Go (from go.mod) | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version-file: go.mod | ||
check-latest: true | ||
- name: Run tests | ||
run: go test -v ./... |