-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This will perform full build and test on PRs and main branch builds and releases.
- Loading branch information
1 parent
3570c27
commit fc99229
Showing
2 changed files
with
64 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: build-and-test | ||
on: | ||
push: | ||
branches: [main] | ||
tags: | ||
- "v[0-9]+.[0-9]+.[0-9]+*" | ||
pull_request: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | ||
cancel-in-progress: true | ||
|
||
env: | ||
GO111MODULE: "on" | ||
CACHE_BENCHMARK: "off" | ||
RUN_BASE_BENCHMARK: "on" | ||
GO_VERSION: 1.22.x | ||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
go-version: [ 1.22.x ] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install Go stable | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ (github.event.inputs.new != '') && github.event.inputs.new || github.event.ref }} | ||
|
||
- name: Go cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/go/pkg/mod | ||
~/.cache/go-build | ||
key: ${{ runner.os }}-go-cache-${{ hashFiles('**/go.sum') }} | ||
restore-keys: | | ||
${{ runner.os }}-go-cache | ||
- name: Restore benchstat | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/go/bin/benchstat | ||
key: ${{ runner.os }}-benchstat-legacy | ||
|
||
- name: Build and test | ||
run: | | ||
make build-ci |
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