-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (43 loc) · 1.05 KB
/
build-and-test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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@v4
- name: Go cache
uses: actions/cache@v4
with:
path: |
~/go/pkg/mod
~/.cache/go-build
key: ${{ runner.os }}-go-cache-${{ hashFiles('**/go.sum') }}
- name: Restore benchstat
uses: actions/cache@v4
with:
path: ~/go/bin/benchstat
key: ${{ runner.os }}-benchstat-legacy
- name: Build and test
run: |
make build-ci