rewrote token implementation and added official cache support #1423
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: Build on Push | |
on: | |
push: | |
paths-ignore: | |
- docs/** | |
- README.md | |
pull_request: | |
branches: | |
- main | |
paths-ignore: | |
- docs/** | |
- README.md | |
permissions: | |
contents: read | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
permissions: | |
actions: read | |
contents: read | |
deployments: read | |
packages: none | |
env: | |
GO111MODULE: on | |
steps: | |
- name: Check out code | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Set up Go | |
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 | |
with: | |
go-version-file: "go.mod" | |
cache: false | |
- name: Run tests | |
run: make test | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@4fe8c5f003fae66aa5ebb77cfd3e7bfbbda0b6b0 # v3.1.5 | |
build-linux: | |
name: Build Linux | |
runs-on: ubuntu-latest | |
needs: test | |
steps: | |
- name: Check out code | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Install cross-compilation toolchains | |
run: | | |
sudo apt-get update && sudo apt-get install -y \ | |
gcc-aarch64-linux-gnu \ | |
gcc-arm-linux-gnueabihf | |
- name: Set up Go | |
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 | |
with: | |
go-version-file: "go.mod" | |
cache: false | |
- name: Build Linux AMD64 | |
run: make | |
env: | |
GOOS: linux | |
GOARCH: amd64 | |
- name: Build Linux ARM64 | |
run: make | |
env: | |
GOOS: linux | |
GOARCH: arm64 | |
CC: aarch64-linux-gnu-gcc | |
- name: Build Linux ARMv7 | |
run: make | |
env: | |
GOOS: linux | |
GOARCH: arm | |
GOARM: "7" | |
CC: arm-linux-gnueabihf-gcc | |
build-macos: | |
name: Build macOS | |
runs-on: macos-latest | |
needs: test | |
steps: | |
- name: Check out code | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Set up Go | |
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 | |
with: | |
go-version-file: "go.mod" | |
cache: false | |
- name: Build macOS AMD64 | |
run: make | |
env: | |
GOOS: darwin | |
GOARCH: amd64 | |
- name: Build macOS ARM64 | |
run: make | |
env: | |
GOOS: darwin | |
GOARCH: arm64 | |
build-windows: | |
name: Build Windows | |
runs-on: windows-latest | |
needs: test | |
steps: | |
- name: Check out code | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Set up Go | |
uses: actions/setup-go@93397bea11091df50f3d7e59dc26a7711a8bcfbe # v4.1.0 | |
with: | |
go-version-file: "go.mod" | |
cache: false | |
- name: Build Windows AMD64 | |
run: make | |
env: | |
GOOS: windows | |
GOARCH: amd64 | |
- name: Build Windows ARM64 | |
run: make | |
env: | |
GOOS: windows | |
GOARCH: arm64 |