-
-
Notifications
You must be signed in to change notification settings - Fork 28
58 lines (54 loc) · 1.16 KB
/
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
50
51
52
53
54
55
56
57
58
name: test
concurrency:
group: test-${{ github.ref }}
cancel-in-progress: true
on:
push:
branches:
- 'master'
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
env:
PLATFORMS: linux/amd64,linux/arm64
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
go_version:
- 1.23.0
- 1.22.6
case:
- c
- cpp
- gorm
- ffmerger
steps:
-
name: Checkout
uses: actions/checkout@v4
-
name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
driver: docker
-
name: Build xgo
uses: docker/bake-action@v5
with:
targets: image
set: |
*.tags=xgo:${{ matrix.go_version }}
*.args.GO_VERSION=${{ matrix.go_version }}
*.output=type=docker
-
name: Test ${{ matrix.case }} for go ${{ matrix.go_version }}
uses: docker/bake-action@v5
with:
targets: test-${{ matrix.case }}
env:
BASE_IMAGE: xgo:${{ matrix.go_version }}