From 7ed2388f7c3483b06dd01fef35574a9ee2d7f195 Mon Sep 17 00:00:00 2001 From: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> Date: Sat, 23 Aug 2025 15:52:45 +1000 Subject: [PATCH 01/12] Speedup exhaustive.yml Do not run cargo-hack on all crates, since codecs features are subset of async-compression features Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --- .github/workflows/exhaustive.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.github/workflows/exhaustive.yml b/.github/workflows/exhaustive.yml index b6988994..130b4555 100644 --- a/.github/workflows/exhaustive.yml +++ b/.github/workflows/exhaustive.yml @@ -84,7 +84,6 @@ jobs: with: { tool: cargo-hack } - run: cargo hack check - --workspace --feature-powerset --no-dev-deps --skip 'all,all-algorithms,all-implementations' @@ -101,7 +100,6 @@ jobs: with: { tool: cargo-hack } - run: cargo hack check - --workspace --feature-powerset --all-targets --skip 'all,all-algorithms,all-implementations' From 0ed5e802163b7861fd455021374a17988389bc2b Mon Sep 17 00:00:00 2001 From: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> Date: Sat, 23 Aug 2025 15:53:15 +1000 Subject: [PATCH 02/12] ci: speedup clippy in lint.yml Do not run clippy on dependencies Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --- .github/workflows/lint.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index f448e98a..832859ce 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -20,7 +20,7 @@ jobs: - uses: actions/checkout@v5 - uses: actions-rust-lang/setup-rust-toolchain@v1 with: { components: clippy } - - run: cargo --locked clippy --all --all-targets --all-features -- -D warnings + - run: cargo --locked clippy --no-deps --all --all-targets --all-features -- -D warnings on: merge_group: From 8772857b443e656e0a51aa1524bdade3fce4b842 Mon Sep 17 00:00:00 2001 From: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> Date: Sat, 23 Aug 2025 15:54:47 +1000 Subject: [PATCH 03/12] ci: speedup clippy in nightly.yml Do not run clippy on dependencies Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --- .github/workflows/nightly.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index e26d6704..3fecba73 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -37,7 +37,7 @@ jobs: with: toolchain: nightly components: clippy - - run: cargo --locked clippy --all --all-targets --all-features -- -D warnings + - run: cargo --locked clippy --no-deps --all --all-targets --all-features -- -D warnings on: schedule: From 63d2acc5e14d8090983021dec93698fc20a9f9c8 Mon Sep 17 00:00:00 2001 From: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> Date: Sat, 23 Aug 2025 15:58:55 +1000 Subject: [PATCH 04/12] Use latest wasi sysroot in wasi.yml And use cargo-check instead of cargo-build Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --- .github/workflows/wasi.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/wasi.yml b/.github/workflows/wasi.yml index c7cbe2d4..5fb3bcb0 100644 --- a/.github/workflows/wasi.yml +++ b/.github/workflows/wasi.yml @@ -14,12 +14,12 @@ jobs: toolchain: nightly target: wasm32-wasip1-threads - run: | - curl -L https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-25/wasi-sysroot-25.0.tar.gz -o wasi-sysroot.tar.gz + gh release download --repo WebAssembly/wasi-sdk --pattern 'wasi-sysroot-*.tar.gz' mkdir -p wasi-sysroot - tar xf wasi-sysroot.tar.gz --strip-components=1 -C wasi-sysroot + tar xf wasi-sysroot-*.tar.gz --strip-components=1 -C wasi-sysroot - run: | export "CFLAGS_wasm32_wasip1_threads=--sysroot=${{ github.workspace }}/wasi-sysroot -I${{ github.workspace }}/wasi-sysroot/include/wasm32-wasip1-threads -L-I${{ github.workspace }}/wasi-sysroot/lib/wasm32-wasip1-threads" - cargo +nightly build --lib --features all-implementations,brotli,bzip2,deflate,gzip,lz4,lzma,xz,zlib,zstd,deflate64 --target wasm32-wasip1-threads + cargo +nightly check --lib --features all-implementations,brotli,bzip2,deflate,gzip,lz4,lzma,xz,zlib,zstd,deflate64 --target wasm32-wasip1-threads on: merge_group: From a9f84e2ae636180767ac1b81ae626d0892a2be32 Mon Sep 17 00:00:00 2001 From: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> Date: Sat, 23 Aug 2025 16:00:16 +1000 Subject: [PATCH 05/12] Update README.md for wasi testing Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --- README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/README.md b/README.md index 89673d62..c0bb10bd 100644 --- a/README.md +++ b/README.md @@ -51,6 +51,9 @@ To prepare for a pull request, you can run several other checks: ```bash gh release download --repo WebAssembly/wasi-sdk --pattern 'wasi-sysroot-*.tar.gz' + mkdir -p wasi-sysroot + tar xf wasi-sysroot-*.tar.gz --strip-components=1 -C wasi-sysroot + rustup target add wasm32-wasip1-threads export "CFLAGS_wasm32_wasip1_threads=--sysroot=\"${PWD}/wasi-sysroot\" -I\"${PWD}/wasi-sysroot/include/wasm32-wasip1-threads\" -L-I\"${PWD}/wasi-sysroot/lib/wasm32-wasip1-threads\"" From d65af142581b1eebf5e977bda3273b5b22b65c70 Mon Sep 17 00:00:00 2001 From: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> Date: Sat, 23 Aug 2025 16:28:53 +1000 Subject: [PATCH 06/12] Speedup cargo-hack in exhaustive.yml Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --- .github/workflows/exhaustive.yml | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/.github/workflows/exhaustive.yml b/.github/workflows/exhaustive.yml index 130b4555..599e568a 100644 --- a/.github/workflows/exhaustive.yml +++ b/.github/workflows/exhaustive.yml @@ -73,7 +73,10 @@ jobs: - run: cargo --locked test --workspace --doc --all-features check-features: - name: cargo hack check --feature-powerset + strategy: + matrix: + async_runtime: [tokio, futures-io] + name: cargo hack check --feature-powerset --features ${{ matrix.async_runtime }} runs-on: ubuntu-latest env: RUSTFLAGS: -Dwarnings @@ -85,11 +88,15 @@ jobs: - run: cargo hack check --feature-powerset + --features ${{ matrix.async_runtime }} --no-dev-deps - --skip 'all,all-algorithms,all-implementations' + --skip 'all,all-algorithms,all-implementations,futures-io,tokio' check-test-features: - name: cargo hack check --all-targets --feature-powerset + strategy: + matrix: + async_runtime: [tokio, futures-io] + name: cargo check --all-targets --feature-powerset --features ${{ matrix.async_runtime }} runs-on: ubuntu-latest env: RUSTFLAGS: -Dwarnings @@ -101,8 +108,9 @@ jobs: - run: cargo hack check --feature-powerset + --features ${{ matrix.async_runtime }} --all-targets - --skip 'all,all-algorithms,all-implementations' + --skip 'all,all-algorithms,all-implementations,futures-io,tokio' on: merge_group: From 643bcd393ef1275835fe839861fb69059549a4a3 Mon Sep 17 00:00:00 2001 From: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> Date: Sat, 23 Aug 2025 16:33:08 +1000 Subject: [PATCH 07/12] Fix exhaustive.yml Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --- .github/workflows/exhaustive.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/exhaustive.yml b/.github/workflows/exhaustive.yml index 599e568a..a819a061 100644 --- a/.github/workflows/exhaustive.yml +++ b/.github/workflows/exhaustive.yml @@ -86,11 +86,13 @@ jobs: - uses: taiki-e/install-action@v2 with: { tool: cargo-hack } - run: + skipped_features='all,all-algorithms,futures-io,tokio,all-implementations' + skipped_features=$(echo "$skipped_features" | sed 's/${{ matrix.async_runtime }},//') cargo hack check --feature-powerset --features ${{ matrix.async_runtime }} --no-dev-deps - --skip 'all,all-algorithms,all-implementations,futures-io,tokio' + --skip "$skipped_features" check-test-features: strategy: @@ -106,11 +108,13 @@ jobs: - uses: taiki-e/install-action@v2 with: { tool: cargo-hack } - run: + skipped_features='all,all-algorithms,futures-io,tokio,all-implementations' + skipped_features=$(echo "$skipped_features" | sed 's/${{ matrix.async_runtime }},//') cargo hack check --feature-powerset --features ${{ matrix.async_runtime }} --all-targets - --skip 'all,all-algorithms,all-implementations,futures-io,tokio' + --skip "$skipped_features" on: merge_group: From e66d090d41807418b8f3242913759fb24effa498 Mon Sep 17 00:00:00 2001 From: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> Date: Sat, 23 Aug 2025 16:49:47 +1000 Subject: [PATCH 08/12] Speedup exhaustive.yml Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --- .github/workflows/exhaustive.yml | 31 +++++++++++++++++++++++++------ 1 file changed, 25 insertions(+), 6 deletions(-) diff --git a/.github/workflows/exhaustive.yml b/.github/workflows/exhaustive.yml index a819a061..fda39127 100644 --- a/.github/workflows/exhaustive.yml +++ b/.github/workflows/exhaustive.yml @@ -86,13 +86,14 @@ jobs: - uses: taiki-e/install-action@v2 with: { tool: cargo-hack } - run: - skipped_features='all,all-algorithms,futures-io,tokio,all-implementations' - skipped_features=$(echo "$skipped_features" | sed 's/${{ matrix.async_runtime }},//') + set -exuo pipefail + skipped_features=$(echo 'futures-io,tokio,' | sed 's/${{ matrix.async_runtime }},//') cargo hack check --feature-powerset --features ${{ matrix.async_runtime }} --no-dev-deps - --skip "$skipped_features" + --skip "all,all-algorithms,${skipped_features}all-implementations,xz-parallel,zstdmt" + cargo check --features ${{ matrix.async_runtime }},xz-parallel,zstdmt check-test-features: strategy: @@ -108,13 +109,31 @@ jobs: - uses: taiki-e/install-action@v2 with: { tool: cargo-hack } - run: - skipped_features='all,all-algorithms,futures-io,tokio,all-implementations' - skipped_features=$(echo "$skipped_features" | sed 's/${{ matrix.async_runtime }},//') + set -exuo pipefail + skipped_features=$(echo 'futures-io,tokio,' | sed 's/${{ matrix.async_runtime }},//') cargo hack check --feature-powerset --features ${{ matrix.async_runtime }} --all-targets - --skip "$skipped_features" + --skip "all,all-algorithms,${skipped_features}all-implementations,xz-parallel,zstdmt" + cargo check --all-targets --features ${{ matrix.async_runtime }},xz-parallel,zstdmt + + # Dummy job to have a stable name for the "all tests pass" requirement + tests-pass: + name: Exhaustive tests pass + needs: + - test + - min-versions-shallow + - min-versions + - check-features + - check-test-features + if: always() # always run even if dependencies fail + runs-on: ubuntu-latest + steps: + # fail if ANY dependency has failed or cancelled + - if: "contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled')" + run: exit 1 + - run: exit 0 on: merge_group: From 0fc448791f3401e094369d061c88c9a77bf4f6cc Mon Sep 17 00:00:00 2001 From: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> Date: Sat, 23 Aug 2025 16:54:30 +1000 Subject: [PATCH 09/12] Fix exhaustive.yml Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --- .github/workflows/exhaustive.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/exhaustive.yml b/.github/workflows/exhaustive.yml index fda39127..3396bd48 100644 --- a/.github/workflows/exhaustive.yml +++ b/.github/workflows/exhaustive.yml @@ -85,7 +85,7 @@ jobs: - uses: actions-rust-lang/setup-rust-toolchain@v1 - uses: taiki-e/install-action@v2 with: { tool: cargo-hack } - - run: + - run: | set -exuo pipefail skipped_features=$(echo 'futures-io,tokio,' | sed 's/${{ matrix.async_runtime }},//') cargo hack check @@ -108,7 +108,7 @@ jobs: - uses: actions-rust-lang/setup-rust-toolchain@v1 - uses: taiki-e/install-action@v2 with: { tool: cargo-hack } - - run: + - run: | set -exuo pipefail skipped_features=$(echo 'futures-io,tokio,' | sed 's/${{ matrix.async_runtime }},//') cargo hack check From 095b2a166f3a13b5f9fb73083e933ed712a31d44 Mon Sep 17 00:00:00 2001 From: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> Date: Sat, 23 Aug 2025 16:56:50 +1000 Subject: [PATCH 10/12] Fix exhaustive.yml Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --- .github/workflows/exhaustive.yml | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/.github/workflows/exhaustive.yml b/.github/workflows/exhaustive.yml index 3396bd48..a1f8d69c 100644 --- a/.github/workflows/exhaustive.yml +++ b/.github/workflows/exhaustive.yml @@ -85,13 +85,14 @@ jobs: - uses: actions-rust-lang/setup-rust-toolchain@v1 - uses: taiki-e/install-action@v2 with: { tool: cargo-hack } - - run: | + - name: cargo-hack check + run: | set -exuo pipefail skipped_features=$(echo 'futures-io,tokio,' | sed 's/${{ matrix.async_runtime }},//') - cargo hack check - --feature-powerset - --features ${{ matrix.async_runtime }} - --no-dev-deps + cargo hack check \ + --feature-powerset \ + --features ${{ matrix.async_runtime }} \ + --no-dev-deps \ --skip "all,all-algorithms,${skipped_features}all-implementations,xz-parallel,zstdmt" cargo check --features ${{ matrix.async_runtime }},xz-parallel,zstdmt @@ -108,13 +109,14 @@ jobs: - uses: actions-rust-lang/setup-rust-toolchain@v1 - uses: taiki-e/install-action@v2 with: { tool: cargo-hack } - - run: | + - name: cargo-hack check + run: | set -exuo pipefail skipped_features=$(echo 'futures-io,tokio,' | sed 's/${{ matrix.async_runtime }},//') - cargo hack check - --feature-powerset - --features ${{ matrix.async_runtime }} - --all-targets + cargo hack check \ + --feature-powerset \ + --features ${{ matrix.async_runtime }} \ + --all-targets \ --skip "all,all-algorithms,${skipped_features}all-implementations,xz-parallel,zstdmt" cargo check --all-targets --features ${{ matrix.async_runtime }},xz-parallel,zstdmt From 2103b3fa7d2597489ae4345ca51a39f53c90ad6c Mon Sep 17 00:00:00 2001 From: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> Date: Sat, 23 Aug 2025 17:13:18 +1000 Subject: [PATCH 11/12] Speedup exhaustive.yml Limit powerser depth to 4 Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --- .github/workflows/exhaustive.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/exhaustive.yml b/.github/workflows/exhaustive.yml index a1f8d69c..ccd9bf8e 100644 --- a/.github/workflows/exhaustive.yml +++ b/.github/workflows/exhaustive.yml @@ -93,7 +93,8 @@ jobs: --feature-powerset \ --features ${{ matrix.async_runtime }} \ --no-dev-deps \ - --skip "all,all-algorithms,${skipped_features}all-implementations,xz-parallel,zstdmt" + --skip "all,all-algorithms,${skipped_features}all-implementations,xz-parallel,zstdmt" \ + --depth 4 cargo check --features ${{ matrix.async_runtime }},xz-parallel,zstdmt check-test-features: @@ -117,7 +118,8 @@ jobs: --feature-powerset \ --features ${{ matrix.async_runtime }} \ --all-targets \ - --skip "all,all-algorithms,${skipped_features}all-implementations,xz-parallel,zstdmt" + --skip "all,all-algorithms,${skipped_features}all-implementations,xz-parallel,zstdmt" \ + --depth 4 cargo check --all-targets --features ${{ matrix.async_runtime }},xz-parallel,zstdmt # Dummy job to have a stable name for the "all tests pass" requirement From 0d7ab09852051222e30edd78d4625a47a18bb556 Mon Sep 17 00:00:00 2001 From: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> Date: Sat, 23 Aug 2025 17:23:34 +1000 Subject: [PATCH 12/12] Fix wasi.yml Signed-off-by: Jiahao XU <30436523+NobodyXu@users.noreply.github.com> --- .github/workflows/wasi.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/wasi.yml b/.github/workflows/wasi.yml index 5fb3bcb0..f9d27e1c 100644 --- a/.github/workflows/wasi.yml +++ b/.github/workflows/wasi.yml @@ -13,13 +13,17 @@ jobs: with: toolchain: nightly target: wasm32-wasip1-threads - - run: | - gh release download --repo WebAssembly/wasi-sdk --pattern 'wasi-sysroot-*.tar.gz' + - run: gh release download --repo WebAssembly/wasi-sdk --pattern 'wasi-sysroot-*.tar.gz' + env: + GH_TOKEN: ${{ github.token }} + - name: Extract wasi-sysroot + run: | mkdir -p wasi-sysroot tar xf wasi-sysroot-*.tar.gz --strip-components=1 -C wasi-sysroot - run: | - export "CFLAGS_wasm32_wasip1_threads=--sysroot=${{ github.workspace }}/wasi-sysroot -I${{ github.workspace }}/wasi-sysroot/include/wasm32-wasip1-threads -L-I${{ github.workspace }}/wasi-sysroot/lib/wasm32-wasip1-threads" cargo +nightly check --lib --features all-implementations,brotli,bzip2,deflate,gzip,lz4,lzma,xz,zlib,zstd,deflate64 --target wasm32-wasip1-threads + env: + CFLAGS_wasm32_wasip1_threads: --sysroot=${{ github.workspace }}/wasi-sysroot -I${{ github.workspace }}/wasi-sysroot/include/wasm32-wasip1-threads -L-I${{ github.workspace }}/wasi-sysroot/lib/wasm32-wasip1-threads on: merge_group: