Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
61 changes: 47 additions & 14 deletions .github/workflows/exhaustive.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/wasi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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\""
Expand Down
Loading