-
Notifications
You must be signed in to change notification settings - Fork 8
109 lines (98 loc) · 5.67 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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
name: Test
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
go: ['1.19.13', '1.20.14', '1.21.13', '1.22.6', '1.23.0']
name: Test with Go ${{ matrix.go }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up the prerequisites
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y gcc-aarch64-linux-gnu qemu-user
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
- name: Test (Linux, arm64)
if: runner.os == 'Linux'
run: |
GOARCH=arm64 go run test.go -qemu -args="-test.run=^Test -test.v fmt"
GOARCH=arm64 go run test.go -qemu -args="-test.run=^Test -test.v internal/abi"
GOARCH=arm64 go run test.go -qemu -args="-test.run=^Test -test.v internal/cpu"
GOARCH=arm64 go run test.go -qemu -args="-test.run=^Test -test.v internal/fmtsort"
GOARCH=arm64 go run test.go -qemu -args="-test.run=^Test -test.v internal/itoa"
GOARCH=arm64 go run test.go -qemu -args="-test.run=^Test -test.v internal/reflectlite"
GOARCH=arm64 go run test.go -qemu -args="-test.run=^Test -test.v internal/unsafeheader"
GOARCH=arm64 go run test.go -qemu -args="-test.run=^Test -test.v math"
GOARCH=arm64 go run test.go -qemu -args="-test.run=^Test -test.v math/big"
GOARCH=arm64 go run test.go -qemu -args="-test.run=^Test -test.v math/bits"
GOARCH=arm64 go run test.go -qemu -args="-test.run=^Test -test.v math/cmplx"
GOARCH=arm64 go run test.go -qemu -args="-test.run=^Test -test.v math/rand"
GOARCH=arm64 go run test.go -qemu -args="-test.run=^Test -test.v -test.short runtime"
GOARCH=arm64 go run test.go -qemu -args="-test.run=^Test -test.v runtime/debug"
GOARCH=arm64 go run test.go -qemu -args="-test.run=^Test -test.v runtime/internal/math"
GOARCH=arm64 go run test.go -qemu -args="-test.run=^Test -test.v runtime/internal/sys"
GOARCH=arm64 go run test.go -qemu -args="-test.run=^Test -test.v strconv"
GOARCH=arm64 go run test.go -qemu -args="-test.run=^Test -test.v strings"
GOARCH=arm64 go run test.go -qemu -args="-test.run=^Test -test.v sort"
GOARCH=arm64 go run test.go -qemu -args="-test.run=^Test -test.v sync"
GOARCH=arm64 go run test.go -qemu -args="-test.run=^Test -test.v sync/atomic"
GOARCH=arm64 go run test.go -qemu -args="-test.run=^Test -test.v time"
- name: Test (Linux, arm64, Go <=1.22)
if: runner.os == 'Linux' && (startsWith(matrix.go, '1.19.') || startsWith(matrix.go, '1.20.') || startsWith(matrix.go, '1.21.') || startsWith(matrix.go, '1.22.'))
run: |
GOARCH=arm64 go run test.go -qemu -args="-test.run=^Test -test.v runtime/internal/atomic"
- name: Test (Linux, arm64, Go >=1.23)
if: runner.os == 'Linux' && startsWith(matrix.go, '1.23.')
run: |
GOARCH=arm64 go run test.go -qemu -args="-test.run=^Test -test.v internal/runtime/atomic"
- name: Test (amd64)
if: runner.os == 'Linux' || (runner.os == 'Windows' && !startsWith(matrix.go, '1.23.'))
run: |
go run test.go -args="-test.run=^Test -test.v fmt"
go run test.go -args="-test.run=^Test -test.v internal/abi"
go run test.go -args="-test.run=^Test -test.v internal/cpu"
go run test.go -args="-test.run=^Test -test.v internal/fmtsort"
go run test.go -args="-test.run=^Test -test.v internal/itoa"
go run test.go -args="-test.run=^Test -test.v internal/reflectlite"
go run test.go -args="-test.run=^Test -test.v internal/unsafeheader"
go run test.go -args="-test.run=^Test -test.v math"
go run test.go -args="-test.run=^Test -test.v math/big"
go run test.go -args="-test.run=^Test -test.v math/bits"
go run test.go -args="-test.run=^Test -test.v math/cmplx"
# math/rand's TestDefaultRace doesn't work well by default.
# Set an environment to do the default tests.
GO_RAND_TEST_HELPER_CODE=1 go run test.go -args="-test.run=^Test -test.v math/rand"
go run test.go -args="-test.run=^Test -test.v runtime/debug"
go run test.go -args="-test.run=^Test -test.v runtime/internal/math"
go run test.go -args="-test.run=^Test -test.v runtime/internal/sys"
go run test.go -args="-test.run=^Test -test.v strconv"
go run test.go -args="-test.run=^Test -test.v strings"
go run test.go -args="-test.run=^Test -test.v sort"
go run test.go -args="-test.run=^Test -test.v sync"
go run test.go -args="-test.run=^Test -test.v sync/atomic"
go run test.go -args="-test.run=^Test -test.v time"
- name: Test (amd64, Go <=1.22)
if: startsWith(matrix.go, '1.19.') || startsWith(matrix.go, '1.20.') || startsWith(matrix.go, '1.21.') || startsWith(matrix.go, '1.22.')
run: |
go run test.go -args="-test.run=^Test -test.v runtime/internal/atomic"
- name: Test (amd64, Go >=1.23)
if: (runner.os == 'Linux' || (runner.os == 'Windows' && !startsWith(matrix.go, '1.23.'))) && startsWith(matrix.go, '1.23.')
run: |
go run test.go -args="-test.run=^Test -test.v internal/runtime/atomic"
- name: Test (amd64, runtime)
# Skip runtime tests with Go 1.19 and Windows, as there is an issue (probably golang/go#51007 and golang/go#57455).
# For Go 1.23, Windows is not supported yet.
if: runner.os != 'Windows' || (!startsWith(matrix.go, '1.19.') && !startsWith(matrix.go, '1.23.'))
run: |
go run test.go -args="-test.run=^Test -test.v -test.short runtime"