-
-
Notifications
You must be signed in to change notification settings - Fork 15
65 lines (52 loc) · 1.59 KB
/
go_cross.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: Cross Compatibility Test
on:
push:
branches: ["main"]
pull_request:
branches: ["main"]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref}}
cancel-in-progress: true
jobs:
build:
strategy:
matrix:
go-version: ["1.19.x", "1.20.x", "1.21.x", "1.22.x"]
arch: [x64, arm, arm64]
os: [macos-latest, ubuntu-latest] #windows-latest
include:
- os: ubuntu-latest
gocache: /tmp/go/gocache
# - os: windows-latest
# gocache: C:/gocache
- os: macos-latest
gocache: /tmp/go/gocache
fail-fast: true
max-parallel: 5
runs-on: ${{ matrix.os }}
timeout-minutes: 10
env:
GOCACHE: ${{matrix.gocache}}
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
check-latest: true
- name: Clear Go cache
run: go clean -cache
# - name: Cache Go tests
# uses: actions/cache@v3
# with:
# path: |
# ${{env.GOCACHE}}
# key: ${{ github.workflow }}-${{ runner.os }}-${{ matrix.arch }}-go-${{matrix.go-version}}-${{ hashFiles('**/go.mod','*_test.go') }}
# restore-keys: |
# ${{ github.workflow }}-${{ runner.os }}-${{ matrix.arch }}-go-${{matrix.go-version}}-${{ hashFiles('**/go.mod','*_test.go') }}
- name: Linter
continue-on-error: true
run: make lint-prepare && make lint
- name: Test
run: make test