7373 - run: cargo --locked test --workspace --doc --all-features
7474
7575 check-features:
76- name: cargo hack check --feature-powerset
76+ strategy:
77+ matrix:
78+ async_runtime: [tokio, futures-io]
79+ name: cargo hack check --feature-powerset --features ${{ matrix.async_runtime }}
7780 runs-on: ubuntu-latest
7881 env:
7982 RUSTFLAGS: -Dwarnings
@@ -82,15 +85,23 @@ jobs:
8285 - uses: actions-rust-lang/setup-rust-toolchain@v1
8386 - uses: taiki-e/install-action@v2
8487 with: { tool: cargo-hack }
85- - run:
86- cargo hack check
87- --workspace
88- --feature-powerset
89- --no-dev-deps
90- --skip ' all,all-algorithms,all-implementations'
88+ - name: cargo-hack check
89+ run: |
90+ set -exuo pipefail
91+ skipped_features=$(echo ' futures-io,tokio,' | sed 's/${{ matrix.async_runtime }},//')
92+ cargo hack check \
93+ --feature-powerset \
94+ --features ${{ matrix.async_runtime }} \
95+ --no-dev-deps \
96+ --skip "all,all-algorithms,${skipped_features}all-implementations,xz-parallel,zstdmt" \
97+ --depth 4
98+ cargo check --features ${{ matrix.async_runtime }},xz-parallel,zstdmt
9199
92100 check-test-features :
93- name : cargo hack check --all-targets --feature-powerset
101+ strategy :
102+ matrix :
103+ async_runtime : [tokio, futures-io]
104+ name : cargo check --all-targets --feature-powerset --features ${{ matrix.async_runtime }}
94105 runs-on : ubuntu-latest
95106 env :
96107 RUSTFLAGS : -Dwarnings
@@ -99,12 +110,34 @@ jobs:
99110 - uses : actions-rust-lang/setup-rust-toolchain@v1
100111 - uses : taiki-e/install-action@v2
101112 with : { tool: cargo-hack }
102- - run :
103- cargo hack check
104- --workspace
105- --feature-powerset
106- --all-targets
107- --skip 'all,all-algorithms,all-implementations'
113+ - name : cargo-hack check
114+ run : |
115+ set -exuo pipefail
116+ skipped_features=$(echo 'futures-io,tokio,' | sed 's/${{ matrix.async_runtime }},//')
117+ cargo hack check \
118+ --feature-powerset \
119+ --features ${{ matrix.async_runtime }} \
120+ --all-targets \
121+ --skip "all,all-algorithms,${skipped_features}all-implementations,xz-parallel,zstdmt" \
122+ --depth 4
123+ cargo check --all-targets --features ${{ matrix.async_runtime }},xz-parallel,zstdmt
124+
125+ # Dummy job to have a stable name for the "all tests pass" requirement
126+ tests-pass :
127+ name : Exhaustive tests pass
128+ needs :
129+ - test
130+ - min-versions-shallow
131+ - min-versions
132+ - check-features
133+ - check-test-features
134+ if : always() # always run even if dependencies fail
135+ runs-on : ubuntu-latest
136+ steps :
137+ # fail if ANY dependency has failed or cancelled
138+ - if : " contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')"
139+ run : exit 1
140+ - run : exit 0
108141
109142on :
110143 merge_group :
0 commit comments