17
17
name : Test
18
18
strategy :
19
19
matrix :
20
- include :
21
- - os : ubuntu-24.04
22
- target : x86_64-unknown-linux-gnu
23
- - os : windows-2022
24
- target : x86_64-pc-windows-msvc
25
- - os : macOS-latest
26
- target : aarch64-apple-darwin
20
+ os : [ ubuntu-24.04, windows-2022, macOS-latest ]
27
21
runs-on : ${{ matrix.os }}
28
22
env :
29
23
RUSTUP_UNPACK_RAM : " 26214400"
@@ -38,13 +32,14 @@ jobs:
38
32
- if : ${{ runner.os == 'Linux' }}
39
33
name : Linux - Install native dependencies
40
34
run : sudo apt install libwayland-cursor0 libxkbcommon-dev libwayland-dev
41
- # cargo version is a random command that forces the installation of rust-toolchain
35
+ # just need a random command that forces the installation of rust-toolchain
36
+ # figure out native target triple while we're at it
42
37
- name : install rust-toolchain
43
- run : cargo version
38
+ run : echo "TARGET=$(rustc --print host-tuple)" >> "$GITHUB_ENV"
44
39
# Fetch dependencies in a separate step to clearly show how long each part
45
40
# of the testing takes
46
41
- name : cargo fetch --locked
47
- run : cargo fetch --locked --target ${{ matrix.target }}
42
+ run : cargo fetch --locked --target $TARGET
48
43
49
44
# Core crates
50
45
# Compiled in --release because cargo compiletest would otherwise compile in release again.
80
75
name : Android
81
76
strategy :
82
77
matrix :
83
- include :
84
- - os : ubuntu-24.04
85
- target : aarch64-linux-android
86
- host : x86_64-unknown-linux-gnu
78
+ os : [ ubuntu-24.04 ]
79
+ target : [ aarch64-linux-android ]
87
80
runs-on : ${{ matrix.os }}
88
81
env :
89
82
RUSTUP_UNPACK_RAM : " 26214400"
95
88
with :
96
89
version : 1.4.309.0
97
90
cache : true
98
- # cargo version is a random command that forces the installation of rust-toolchain
99
91
- name : install rust-toolchain
100
92
run : cargo version
101
- # Fetch dependencies in a separate step to clearly show how long each part
102
- # of the testing takes
103
93
- name : cargo fetch --locked
104
94
run : cargo fetch --locked --target ${{ matrix.target }}
105
95
@@ -130,13 +120,7 @@ jobs:
130
120
name : Compiletest
131
121
strategy :
132
122
matrix :
133
- include :
134
- - os : ubuntu-24.04
135
- target : x86_64-unknown-linux-gnu
136
- - os : windows-2022
137
- target : x86_64-pc-windows-msvc
138
- - os : macOS-latest
139
- target : aarch64-apple-darwin
123
+ os : [ ubuntu-24.04, windows-2022, macOS-latest ]
140
124
runs-on : ${{ matrix.os }}
141
125
steps :
142
126
- uses : actions/checkout@v4
@@ -145,25 +129,18 @@ jobs:
145
129
with :
146
130
version : 1.4.309.0
147
131
cache : true
148
- # cargo version is a random command that forces the installation of rust-toolchain
149
132
- name : install rust-toolchain
150
- run : cargo version
133
+ run : echo "TARGET=$(rustc --print host-tuple)" >> "$GITHUB_ENV"
151
134
- name : cargo fetch --locked
152
- run : cargo fetch --locked --target ${{ matrix.target }}
135
+ run : cargo fetch --locked --target $TARGET
153
136
- name : compiletest
154
137
run : cargo run -p compiletests --release --no-default-features --features "use-installed-tools" -- --target-env vulkan1.1,vulkan1.2,spv1.3
155
138
156
139
difftest :
157
140
name : Difftest
158
141
strategy :
159
142
matrix :
160
- include :
161
- - os : ubuntu-24.04
162
- target : x86_64-unknown-linux-gnu
163
- - os : windows-2022
164
- target : x86_64-pc-windows-msvc
165
- - os : macOS-latest
166
- target : aarch64-apple-darwin
143
+ os : [ ubuntu-24.04, windows-2022, macOS-latest ]
167
144
runs-on : ${{ matrix.os }}
168
145
steps :
169
146
- uses : actions/checkout@v4
@@ -182,13 +159,12 @@ jobs:
182
159
sudo add-apt-repository ppa:kisak/turtle -y
183
160
sudo apt-get update
184
161
sudo apt install -y xvfb libgl1-mesa-dri libxcb-xfixes0-dev mesa-vulkan-drivers
185
- # cargo version is a random command that forces the installation of rust-toolchain
186
162
- name : install rust-toolchain
187
- run : cargo version
163
+ run : echo "TARGET=$(rustc --print host-tuple)" >> "$GITHUB_ENV"
188
164
- name : cargo fetch --locked
189
- run : cargo fetch --locked --target ${{ matrix.target }}
165
+ run : cargo fetch --locked --target $TARGET
190
166
- name : cargo fetch --locked difftests
191
- run : cargo fetch --locked --manifest-path=tests/difftests/tests/Cargo.toml --target ${{ matrix.target }}
167
+ run : cargo fetch --locked --manifest-path=tests/difftests/tests/Cargo.toml --target $TARGET
192
168
- name : test difftest
193
169
run : cargo test -p "difftest*" --release --no-default-features --features "use-installed-tools"
194
170
- name : difftests
0 commit comments