diff --git a/.github/workflows/exhaustive.yml b/.github/workflows/exhaustive.yml index b6988994..ccd9bf8e 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 @@ -82,15 +85,23 @@ jobs: - uses: actions-rust-lang/setup-rust-toolchain@v1 - uses: taiki-e/install-action@v2 with: { tool: cargo-hack } - - run: - cargo hack check - --workspace - --feature-powerset - --no-dev-deps - --skip 'all,all-algorithms,all-implementations' + - 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 \ + --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: - 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 @@ -99,12 +110,34 @@ jobs: - uses: actions-rust-lang/setup-rust-toolchain@v1 - uses: taiki-e/install-action@v2 with: { tool: cargo-hack } - - run: - cargo hack check - --workspace - --feature-powerset - --all-targets - --skip 'all,all-algorithms,all-implementations' + - 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 \ + --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 + 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: 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: 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: diff --git a/.github/workflows/wasi.yml b/.github/workflows/wasi.yml index c7cbe2d4..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: | - curl -L https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-25/wasi-sysroot-25.0.tar.gz -o 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 + 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 + 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: 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\""