@@ -34,19 +34,27 @@ jobs:
34
34
strategy :
35
35
fail-fast : false
36
36
matrix :
37
- name : [ubuntu-latest, macOS-arm-latest]
37
+ name : [ubuntu-latest, macOS-arm-latest, macOS-x64-latest ]
38
38
rust : ["${{ inputs.rust-version }}"]
39
39
features : [all, none, default]
40
40
include :
41
41
- name : ubuntu-latest
42
42
os : ubuntu-latest
43
43
release-os : linux
44
44
release-arch : amd64
45
+ cargo_targets : " x86_64-unknown-linux-musl"
45
46
runner : [self-hosted, linux, X64]
46
47
- name : macOS-arm-latest
47
48
os : macOS-latest
48
49
release-os : darwin
49
50
release-arch : aarch64
51
+ cargo_targets : " aarch64-apple-darwin"
52
+ runner : [self-hosted, macOS, ARM64]
53
+ - name : macOS-x64-latest
54
+ os : macOS-latest
55
+ release-os : darwin
56
+ release-arch : x86_64
57
+ cargo_targets : " x86_64-apple-darwin"
50
58
runner : [self-hosted, macOS, ARM64]
51
59
env :
52
60
# Using self-hosted runners so use local cache for sccache and
@@ -58,11 +66,16 @@ jobs:
58
66
with :
59
67
ref : ${{ inputs.git-ref }}
60
68
69
+ - name : Ensure musl support
70
+ if : ${{ contains(matrix.cargo_targets, '-musl') }}
71
+ run : sudo apt-get install musl-tools -y
72
+
61
73
- name : Install ${{ matrix.rust }} rust
62
74
uses : dtolnay/rust-toolchain@master
63
75
with :
64
76
toolchain : ${{ matrix.rust }}
65
-
77
+ targets : ${{ matrix.cargo_targets }}
78
+
66
79
- name : Install cargo-nextest
67
80
uses : taiki-e/install-action@v2
68
81
with :
@@ -94,24 +107,26 @@ jobs:
94
107
do
95
108
echo "Checking $i $FEATURES"
96
109
targets="--lib --bins"
97
- echo cargo check -p $i $FEATURES $targets
98
- cargo check -p $i $FEATURES $targets
110
+ # echo cargo check -p $i $FEATURES $targets
111
+ # cargo check -p $i $FEATURES $targets
112
+ echo "cargo check -p $i $FEATURES $targets --target ${{ matrix.cargo_targets }}"
113
+ cargo check -p $i $FEATURES $targets --target ${{ matrix.cargo_targets }}
99
114
done
100
115
env :
101
116
RUST_LOG : ${{ runner.debug && 'TRACE' || 'DEBUG'}}
102
117
103
118
- name : build tests
104
119
run : |
105
- cargo nextest run --workspace ${{ env.FEATURES }} --lib --bins --tests --no-run
120
+ cargo nextest run --workspace ${{ env.FEATURES }} --lib --bins --tests --no-run --target ${{ matrix.cargo_targets }}
106
121
107
122
- name : list ignored tests
108
123
run : |
109
- cargo nextest list --workspace ${{ env.FEATURES }} --lib --bins --tests --run-ignored ignored-only
124
+ cargo nextest list --workspace ${{ env.FEATURES }} --lib --bins --tests --run-ignored ignored-only --target ${{ matrix.cargo_targets }}
110
125
111
126
- name : run tests
112
127
run : |
113
128
mkdir -p output
114
- cargo nextest run --workspace ${{ env.FEATURES }} --lib --bins --tests --profile ci --run-ignored ${{ inputs.flaky && 'all' || 'default' }} ${{ inputs.flaky && '--verbose' || '' }} --no-fail-fast --message-format ${{ inputs.flaky && 'libtest-json' || 'human' }} > output/${{ matrix.name }}_${{ matrix.features }}_${{ matrix.rust }}.json
129
+ cargo nextest run --workspace ${{ env.FEATURES }} --lib --bins --tests --profile ci --run-ignored ${{ inputs.flaky && 'all' || 'default' }} ${{ inputs.flaky && '--verbose' || '' }} --target ${{ matrix.cargo_targets }} -- no-fail-fast --message-format ${{ inputs.flaky && 'libtest-json' || 'human' }} > output/${{ matrix.name }}_${{ matrix.features }}_${{ matrix.rust }}.json
115
130
env :
116
131
RUST_LOG : ${{ runner.debug && 'TRACE' || 'DEBUG'}}
117
132
NEXTEST_EXPERIMENTAL_LIBTEST_JSON : 1
0 commit comments