@@ -6,113 +6,44 @@ name: Test
6
6
on : [push, pull_request]
7
7
8
8
jobs :
9
- test-macos-llvm-14 :
9
+ test-macos :
10
10
runs-on : macos-latest
11
+ strategy :
12
+ matrix :
13
+ llvm : [14, 15, 16, 17]
11
14
steps :
12
15
- name : Checkout
13
16
uses : actions/checkout@v2
17
+ - name : Update Homebrew
18
+ if : matrix.llvm == 17 # needed as long as LLVM 17 is still fresh
19
+ run : brew update
14
20
- name : Install LLVM
15
- run : |
16
- brew update
17
- brew install llvm@14
18
- - name : Test LLVM 14
21
+ run : HOMEBREW_NO_AUTO_UPDATE=1 brew install llvm@${{ matrix.llvm }}
22
+ - name : Test LLVM ${{ matrix.llvm }}
19
23
run :
20
- go test -v -tags=llvm14
21
- test-macos-llvm-15 :
22
- runs-on : macos-latest
23
- steps :
24
- - name : Checkout
25
- uses : actions/checkout@v2
26
- - name : Install LLVM
27
- run : |
28
- brew update
29
- brew install llvm@15
30
- - name : Test LLVM 15
31
- run :
32
- go test -v -tags=llvm15
33
- test-macos-llvm-16 :
34
- runs-on : macos-latest
35
- steps :
36
- - name : Checkout
37
- uses : actions/checkout@v2
38
- - name : Install LLVM
39
- run : |
40
- brew update
41
- brew install llvm@16
42
- - name : Test LLVM 16
43
- run :
44
- go test -v -tags=llvm16
24
+ go test -v -tags=llvm${{ matrix.llvm }}
45
25
- name : Test default LLVM
26
+ if : matrix.llvm == 16
46
27
run :
47
28
go test -v
48
- test-macos-llvm-17 :
49
- runs-on : macos-latest
50
- steps :
51
- - name : Checkout
52
- uses : actions/checkout@v2
53
- - name : Install LLVM
54
- run : |
55
- brew update
56
- brew install llvm@17
57
- - name : Test LLVM 17
58
- run :
59
- go test -v -tags=llvm17
60
- test-linux-llvm-14 :
29
+ test-linux :
61
30
runs-on : ubuntu-20.04
31
+ strategy :
32
+ matrix :
33
+ llvm : [14, 15, 16, 17]
62
34
steps :
63
35
- name : Checkout
64
36
uses : actions/checkout@v2
65
37
- name : Install LLVM
66
38
run : |
67
- echo 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-14 main' | sudo tee /etc/apt/sources.list.d/llvm.list
39
+ echo 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-${{ matrix.llvm }} main' | sudo tee /etc/apt/sources.list.d/llvm.list
68
40
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
69
41
sudo apt-get update
70
- sudo apt-get install --no-install-recommends llvm-14 -dev
71
- - name : Test LLVM 14
42
+ sudo apt-get install --no-install-recommends llvm-${{ matrix.llvm }} -dev
43
+ - name : Test LLVM ${{ matrix.llvm }}
72
44
run :
73
- go test -v -tags=llvm14
74
- test-linux-llvm-15 :
75
- runs-on : ubuntu-20.04
76
- steps :
77
- - name : Checkout
78
- uses : actions/checkout@v2
79
- - name : Install LLVM
80
- run : |
81
- echo 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-15 main' | sudo tee /etc/apt/sources.list.d/llvm.list
82
- wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
83
- sudo apt-get update
84
- sudo apt-get install --no-install-recommends llvm-15-dev
85
- - name : Test LLVM 15
86
- run :
87
- go test -v -tags=llvm15
88
- test-linux-llvm-16 :
89
- runs-on : ubuntu-20.04
90
- steps :
91
- - name : Checkout
92
- uses : actions/checkout@v2
93
- - name : Install LLVM
94
- run : |
95
- echo 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-16 main' | sudo tee /etc/apt/sources.list.d/llvm.list
96
- wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
97
- sudo apt-get update
98
- sudo apt-get install --no-install-recommends llvm-16-dev
99
- - name : Test LLVM 16
100
- run :
101
- go test -v -tags=llvm16
45
+ go test -v -tags=llvm${{ matrix.llvm }}
102
46
- name : Test default LLVM
47
+ if : matrix.llvm == 16
103
48
run :
104
49
go test -v
105
- test-linux-llvm-17 :
106
- runs-on : ubuntu-20.04
107
- steps :
108
- - name : Checkout
109
- uses : actions/checkout@v2
110
- - name : Install LLVM
111
- run : |
112
- echo 'deb http://apt.llvm.org/focal/ llvm-toolchain-focal-17 main' | sudo tee /etc/apt/sources.list.d/llvm.list
113
- wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
114
- sudo apt-get update
115
- sudo apt-get install --no-install-recommends llvm-17-dev
116
- - name : Test LLVM 17
117
- run :
118
- go test -v -tags=llvm17
0 commit comments