@@ -14,49 +14,49 @@ defaults:
14
14
shell : bash
15
15
16
16
jobs :
17
- # style_check:
18
- # name: Style check
19
- # runs-on: ubuntu-24.04
20
- # timeout-minutes: 10
21
- # steps:
22
- # - uses: actions/checkout@v4
23
- # - name: Setup Rust toolchain
24
- # run: ./ci/install-rust.sh
25
- # - name: Check style
26
- # run: ./ci/style.sh
27
-
28
- # # This runs `cargo build --target ...` for all T1 and T2 targets`
29
- # verify_build:
30
- # name: Verify build
31
- # strategy:
32
- # matrix:
33
- # toolchain: [stable, nightly, 1.63.0]
34
- # os: [ubuntu-24.04, macos-14, windows-2022]
35
- # include:
36
- # - toolchain: beta
37
- # os: ubuntu-24.04
38
- # runs-on: ${{ matrix.os }}
39
- # timeout-minutes: 25
40
- # env:
41
- # TOOLCHAIN: ${{ matrix.toolchain }}
42
- # steps:
43
- # - uses: actions/checkout@v4
44
- # - name: Setup Rust toolchain
45
- # run: ./ci/install-rust.sh
46
-
47
- # # FIXME(ci): These `du` statements are temporary for debugging cache
48
- # - name: Target size before restoring cache
49
- # run: du -sh target | sort -k 2 || true
50
- # - uses: Swatinem/rust-cache@v2
51
- # with:
52
- # key: ${{ matrix.os }}-${{ matrix.toolchain }}
53
- # - name: Target size after restoring cache
54
- # run: du -sh target | sort -k 2 || true
55
-
56
- # - name: Execute build.sh
57
- # run: ./ci/verify-build.sh
58
- # - name: Target size after job completion
59
- # run: du -sh target | sort -k 2
17
+ style_check :
18
+ name : Style check
19
+ runs-on : ubuntu-24.04
20
+ timeout-minutes : 10
21
+ steps :
22
+ - uses : actions/checkout@v4
23
+ - name : Setup Rust toolchain
24
+ run : ./ci/install-rust.sh
25
+ - name : Check style
26
+ run : ./ci/style.sh
27
+
28
+ # This runs `cargo build --target ...` for all T1 and T2 targets`
29
+ verify_build :
30
+ name : Verify build
31
+ strategy :
32
+ matrix :
33
+ toolchain : [stable, nightly, 1.63.0]
34
+ os : [ubuntu-24.04, macos-14, windows-2022]
35
+ include :
36
+ - toolchain : beta
37
+ os : ubuntu-24.04
38
+ runs-on : ${{ matrix.os }}
39
+ timeout-minutes : 25
40
+ env :
41
+ TOOLCHAIN : ${{ matrix.toolchain }}
42
+ steps :
43
+ - uses : actions/checkout@v4
44
+ - name : Setup Rust toolchain
45
+ run : ./ci/install-rust.sh
46
+
47
+ # FIXME(ci): These `du` statements are temporary for debugging cache
48
+ - name : Target size before restoring cache
49
+ run : du -sh target | sort -k 2 || true
50
+ - uses : Swatinem/rust-cache@v2
51
+ with :
52
+ key : ${{ matrix.os }}-${{ matrix.toolchain }}
53
+ - name : Target size after restoring cache
54
+ run : du -sh target | sort -k 2 || true
55
+
56
+ - name : Execute build.sh
57
+ run : ./ci/verify-build.sh
58
+ - name : Target size after job completion
59
+ run : du -sh target | sort -k 2
60
60
61
61
test_tier1 :
62
62
name : Test tier1
@@ -91,145 +91,140 @@ jobs:
91
91
TARGET : ${{ matrix.target }}
92
92
steps :
93
93
- uses : actions/checkout@v4
94
- # - name: Setup Rust toolchain
95
- # run: ./ci/install-rust.sh
96
- # - uses: Swatinem/rust-cache@v2
97
- # with:
98
- # key: ${{ matrix.target }}
99
-
100
- # - name: Run natively
101
- # if: "!matrix.docker"
102
- # run: ./ci/run.sh ${{ matrix.target }}
103
- # - name: Run in Docker
104
- # if: "matrix.docker"
105
- # run: ./ci/run-docker.sh ${{ matrix.target }}
94
+ - name : Setup Rust toolchain
95
+ run : ./ci/install-rust.sh
96
+ - uses : Swatinem/rust-cache@v2
97
+ with :
98
+ key : ${{ matrix.target }}
99
+
100
+ - name : Run natively
101
+ if : " !matrix.docker"
102
+ run : ./ci/run.sh ${{ matrix.target }}
103
+ - name : Run in Docker
104
+ if : " matrix.docker"
105
+ run : ./ci/run-docker.sh ${{ matrix.target }}
106
+
107
+ - name : Create CI artifacts
108
+ if : always()
109
+ run : ./ci/create-artifacts.py
110
+ - uses : actions/upload-artifact@v4
111
+ with :
112
+ name : ${{ env.ARCHIVE_NAME }}-${{ matrix.target }}
113
+ path : ${{ env.ARCHIVE_PATH }}
114
+ retention-days : 5
115
+
116
+ test_tier2 :
117
+ name : Test tier2
118
+ needs : [test_tier1, style_check]
119
+ runs-on : ubuntu-24.04
120
+ strategy :
121
+ fail-fast : true
122
+ max-parallel : 12
123
+ matrix :
124
+ target :
125
+ # FIXME(sparc): this takes much longer to run than any other job, put
126
+ # it first to make sure it gets a head start.
127
+ - sparc64-unknown-linux-gnu
128
+ - aarch64-linux-android
129
+ - aarch64-unknown-linux-gnu
130
+ - aarch64-unknown-linux-musl
131
+ - arm-linux-androideabi
132
+ - arm-unknown-linux-gnueabihf
133
+ - arm-unknown-linux-musleabihf
134
+ - i686-linux-android
135
+ - i686-unknown-linux-musl
136
+ - loongarch64-unknown-linux-gnu
137
+ - loongarch64-unknown-linux-musl
138
+ - powerpc-unknown-linux-gnu
139
+ - powerpc64-unknown-linux-gnu
140
+ - powerpc64le-unknown-linux-gnu
141
+ - riscv64gc-unknown-linux-gnu
142
+ - s390x-unknown-linux-gnu
143
+ - wasm32-unknown-emscripten
144
+ - wasm32-wasip1
145
+ - wasm32-wasip2
146
+ - x86_64-linux-android
147
+ # FIXME: Exec format error (os error 8)
148
+ # - x86_64-unknown-linux-gnux32
149
+ - x86_64-unknown-linux-musl
150
+ # FIXME: It seems some items in `src/unix/mod.rs`
151
+ # aren't defined on redox actually.
152
+ # - x86_64-unknown-redox
153
+ timeout-minutes : 25
154
+ env :
155
+ TARGET : ${{ matrix.target }}
156
+ steps :
157
+ - uses : actions/checkout@v4
158
+ - name : Setup Rust toolchain
159
+ run : ./ci/install-rust.sh
160
+ - uses : Swatinem/rust-cache@v2
161
+ with :
162
+ key : ${{ matrix.target }}
163
+
164
+ - name : Execute run-docker.sh
165
+ run : ./ci/run-docker.sh ${{ matrix.target }}
106
166
107
167
- name : Create CI artifacts
108
168
if : always()
109
- run : |
110
- # testing only
111
- mkdir target
112
- cp *.rs target
113
- touch target/main.c
114
- ./ci/create-artifacts.py
169
+ run : ./ci/create-artifacts.py
115
170
- uses : actions/upload-artifact@v4
116
171
with :
117
172
name : ${{ env.ARCHIVE_NAME }}-${{ matrix.target }}
118
173
path : ${{ env.ARCHIVE_PATH }}
119
174
retention-days : 5
120
175
121
- # test_tier2:
122
- # name: Test tier2
123
- # needs: [test_tier1, style_check]
124
- # runs-on: ubuntu-24.04
125
- # strategy:
126
- # fail-fast: true
127
- # max-parallel: 12
128
- # matrix:
129
- # target:
130
- # # FIXME(sparc): this takes much longer to run than any other job, put
131
- # # it first to make sure it gets a head start.
132
- # - sparc64-unknown-linux-gnu
133
- # - aarch64-linux-android
134
- # - aarch64-unknown-linux-gnu
135
- # - aarch64-unknown-linux-musl
136
- # - arm-linux-androideabi
137
- # - arm-unknown-linux-gnueabihf
138
- # - arm-unknown-linux-musleabihf
139
- # - i686-linux-android
140
- # - i686-unknown-linux-musl
141
- # - loongarch64-unknown-linux-gnu
142
- # - loongarch64-unknown-linux-musl
143
- # - powerpc-unknown-linux-gnu
144
- # - powerpc64-unknown-linux-gnu
145
- # - powerpc64le-unknown-linux-gnu
146
- # - riscv64gc-unknown-linux-gnu
147
- # - s390x-unknown-linux-gnu
148
- # - wasm32-unknown-emscripten
149
- # - wasm32-wasip1
150
- # - wasm32-wasip2
151
- # - x86_64-linux-android
152
- # # FIXME: Exec format error (os error 8)
153
- # # - x86_64-unknown-linux-gnux32
154
- # - x86_64-unknown-linux-musl
155
- # # FIXME: It seems some items in `src/unix/mod.rs`
156
- # # aren't defined on redox actually.
157
- # # - x86_64-unknown-redox
158
- # timeout-minutes: 25
159
- # env:
160
- # TARGET: ${{ matrix.target }}
161
- # steps:
162
- # - uses: actions/checkout@v4
163
- # - name: Setup Rust toolchain
164
- # run: ./ci/install-rust.sh
165
- # - uses: Swatinem/rust-cache@v2
166
- # with:
167
- # key: ${{ matrix.target }}
168
-
169
- # - name: Execute run-docker.sh
170
- # run: ./ci/run-docker.sh ${{ matrix.target }}
171
-
172
- # - name: Create CI artifacts
173
- # if: always()
174
- # run: ./ci/create-artifacts.py
175
- # - uses: actions/upload-artifact@v4
176
- # with:
177
- # name: ${{ env.ARCHIVE_NAME }}-${{ matrix.target }}
178
- # path: ${{ env.ARCHIVE_PATH }}
179
- # retention-days: 5
180
-
181
- # test_tier2_vm:
182
- # name: Test tier2 VM
183
- # needs: [test_tier1, style_check]
184
- # runs-on: ubuntu-latest
185
- # strategy:
186
- # fail-fast: true
187
- # matrix:
188
- # target:
189
- # - x86_64-pc-solaris
190
- # timeout-minutes: 25
191
- # steps:
192
- # - uses: actions/checkout@v4
193
- # - name: test on Solaris
194
- # uses: vmactions/solaris-vm@v1
195
- # with:
196
- # release: "11.4-gcc"
197
- # usesh: true
198
- # mem: 4096
199
- # copyback: false
200
- # prepare: |
201
- # set -x
202
- # source <(curl -s https://raw.githubusercontent.com/psumbera/solaris-rust/refs/heads/main/sh.rust-web-install)
203
- # rustc --version
204
- # uname -a
205
- # run: |
206
- # export PATH=$HOME/.rust_solaris/bin:$PATH
207
- # ./ci/run.sh ${{ matrix.target }}
208
-
209
- # check_cfg:
210
- # name: "Check #[cfg]s"
211
- # runs-on: ubuntu-24.04
212
- # env:
213
- # TOOLCHAIN: nightly
214
- # timeout-minutes: 10
215
- # steps:
216
- # - uses: actions/checkout@v4
217
- # - name: Setup Rust toolchain
218
- # run: ./ci/install-rust.sh
219
- # - name: Build with check-cfg
220
- # run: LIBC_CHECK_CFG=1 cargo build -Z unstable-options -Z check-cfg
176
+ test_tier2_vm :
177
+ name : Test tier2 VM
178
+ needs : [test_tier1, style_check]
179
+ runs-on : ubuntu-latest
180
+ strategy :
181
+ fail-fast : true
182
+ matrix :
183
+ target :
184
+ - x86_64-pc-solaris
185
+ timeout-minutes : 25
186
+ steps :
187
+ - uses : actions/checkout@v4
188
+ - name : test on Solaris
189
+ uses : vmactions/solaris-vm@v1
190
+ with :
191
+ release : " 11.4-gcc"
192
+ usesh : true
193
+ mem : 4096
194
+ copyback : false
195
+ prepare : |
196
+ set -x
197
+ source <(curl -s https://raw.githubusercontent.com/psumbera/solaris-rust/refs/heads/main/sh.rust-web-install)
198
+ rustc --version
199
+ uname -a
200
+ run : |
201
+ export PATH=$HOME/.rust_solaris/bin:$PATH
202
+ ./ci/run.sh ${{ matrix.target }}
203
+
204
+ check_cfg :
205
+ name : " Check #[cfg]s"
206
+ runs-on : ubuntu-24.04
207
+ env :
208
+ TOOLCHAIN : nightly
209
+ timeout-minutes : 10
210
+ steps :
211
+ - uses : actions/checkout@v4
212
+ - name : Setup Rust toolchain
213
+ run : ./ci/install-rust.sh
214
+ - name : Build with check-cfg
215
+ run : LIBC_CHECK_CFG=1 cargo build -Z unstable-options -Z check-cfg
221
216
222
217
# One job that "summarizes" the success state of this pipeline. This can then be added to branch
223
218
# protection, rather than having to add each job separately.
224
219
success :
225
220
name : success
226
221
runs-on : ubuntu-24.04
227
222
needs :
228
- # - style_check
223
+ - style_check
229
224
- test_tier1
230
- # - test_tier2
231
- # - test_tier2_vm
232
- # - verify_build
225
+ - test_tier2
226
+ - test_tier2_vm
227
+ - verify_build
233
228
# Github branch protection is exceedingly silly and treats "jobs skipped because a dependency
234
229
# failed" as success. So we have to do some contortions to ensure the job fails if any of its
235
230
# dependencies fails.
0 commit comments