30
30
- uses : actions/checkout@v4
31
31
- name : Prerequisites
32
32
run : |
33
+ prerequisites=(
34
+ ca-certificates
35
+ curl
36
+ gcc # rustc calls gcc to invoke the linker.
37
+ libc-dev # rustc, in the toolchain we are using, dynamically links to the system libc.
38
+ )
33
39
apt-get update
34
- apt-get install --no-install-recommends -y ca-certificates curl gcc libc-dev # gcc is required as OS abstraction
40
+ apt-get install --no-install-recommends -y -- "${prerequisites[@]}"
41
+ shell : bash
35
42
- name : Verify environment is sufficiently minimal for the test
36
43
run : |
37
44
set -x
@@ -84,15 +91,14 @@ jobs:
84
91
- uses : Swatinem/rust-cache@v2
85
92
- name : Setup dependencies (macos)
86
93
if : startsWith(matrix.os, 'macos')
87
- run :
88
- brew install tree openssl gnu-sed
94
+ run : brew install tree openssl gnu-sed
89
95
- name : " cargo check default features"
90
96
if : startsWith(matrix.os, 'windows')
91
97
run : cargo check --workspace --bins --examples
92
98
- uses : taiki-e/install-action@v2
93
99
with :
94
100
tool : nextest
95
- - name : " Test (nextest)"
101
+ - name : Test (nextest)
96
102
env :
97
103
GIX_TEST_CREATE_ARCHIVES_EVEN_ON_CI : ' 1'
98
104
run : cargo nextest run --workspace --no-fail-fast
@@ -157,9 +163,9 @@ jobs:
157
163
- uses : taiki-e/install-action@v2
158
164
with :
159
165
tool : cross
160
- - name : " check"
166
+ - name : check
161
167
run : cross check -p gix --target ${{ matrix.target }}
162
- - name : " Test (unit)"
168
+ - name : Test (unit)
163
169
# run high-level unit tests that exercise a lot of code while being pure Rust to ease building test binaries.
164
170
# TODO: figure out why `git` doesn't pick up environment configuration so build scripts fail when using `-p gix`.
165
171
run : cross test -p gix-hashtable --target ${{ matrix.target }}
@@ -275,7 +281,7 @@ jobs:
275
281
276
282
defaults :
277
283
run :
278
- shell : bash
284
+ shell : bash # Use bash even on Windows, if we ever reenable windows-latest for testing.
279
285
280
286
steps :
281
287
- uses : actions/checkout@v4
@@ -327,7 +333,7 @@ jobs:
327
333
- name : Each job must block PRs or be declared not to
328
334
run : |
329
335
sort -m blocking-jobs.txt expected-nonblocking-jobs.txt |
330
- diff --color=always -U1000 -- - all-jobs.txt
336
+ diff --color=always -U1000 - all-jobs.txt
331
337
332
338
# Dummy job to have a stable name for the "all tests pass" requirement
333
339
tests-pass :
@@ -349,7 +355,7 @@ jobs:
349
355
350
356
steps :
351
357
- name : Fail if ANY dependency has failed or cancelled
352
- if : " contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')"
358
+ if : contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')
353
359
run : exit 1
354
360
- name : OK
355
361
run : exit 0
0 commit comments