DRAFT: Support squashfs v3 #1056
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
on: | |
push: | |
branches: | |
- master | |
pull_request: | |
branches: | |
- master | |
schedule: [cron: "40 1 * * *"] | |
name: ci | |
jobs: | |
# build/test all supported targets for library and bins (skipping slow and squashfs-tools tests) | |
build-test: | |
runs-on: ubuntu-latest | |
env: | |
RUSTFLAGS: "-C target-feature=+crt-static" | |
strategy: | |
matrix: | |
target: | |
- x86_64-unknown-linux-musl | |
- aarch64-unknown-linux-musl | |
- arm-unknown-linux-musleabi | |
- armv7-unknown-linux-musleabi | |
toolchain: | |
- stable | |
# msrv | |
- 1.66.0 | |
features: | |
# default features | |
- | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
# install cross | |
- run: cargo install cargo-quickinstall | |
- run: cargo quickinstall [email protected] --force | |
# build with cross | |
- run: cross build ${{ matrix.features }} --target ${{ matrix.target }} --locked --lib | |
# test with cross | |
- run: CROSS_CONTAINER_OPTS="--network host" RUST_LOG=info cross test --release ${{ matrix.features }} --target ${{ matrix.target }} --locked -- --skip slow | |
# build/test all supported on native(musl) arch for library and bins (all tests) | |
build-test-native: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
toolchain: | |
- stable | |
# msrv | |
- 1.66.0 | |
features: | |
- --no-default-features --features xz | |
- --no-default-features --features gzip | |
- --no-default-features --features gzip,xz | |
- --no-default-features --features xz-static | |
# default features | |
- | |
steps: | |
- run: sudo apt-get install -y squashfs-tools | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
- run: RUST_LOG=info cargo test --release ${{ matrix.features }} --locked --features __test_unsquashfs | |
# benchmark | |
benchmark: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
toolchain: | |
- stable | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
- run: cargo bench | |
# fmt and clippy on stable | |
fmt-clippy-stable: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: dtolnay/rust-toolchain@master | |
with: | |
toolchain: stable | |
components: rustfmt, clippy | |
# fmt | |
- run: cargo fmt --all -- --check | |
# clippy | |
- run: cargo clippy -- -D warnings |