lax FilesystemWriter lifetimes #1287
Workflow file for this run
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: | |
# By default, this is set to `true`, which means that a single CI job | |
# failure will cause all outstanding jobs to be canceled. This slows down | |
# development because it means that errors need to be encountered and | |
# fixed one at a time. | |
fail-fast: false | |
matrix: | |
target: | |
- x86_64-unknown-linux-musl | |
- aarch64-unknown-linux-musl | |
- arm-unknown-linux-musleabi | |
- armv7-unknown-linux-musleabi | |
toolchain: | |
- stable | |
# msrv of backhand-cli | |
- 1.73.0 | |
features: | |
# default features | |
- | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- name: Populate cache | |
uses: ./.github/workflows/cache | |
- uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # master | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
# install cross | |
- run: cargo install cargo-quickinstall | |
- run: cargo quickinstall [email protected] --force | |
# build lib and bins with cross | |
- run: cross build ${{ matrix.features }} --target ${{ matrix.target }} --release --locked --workspace | |
# test with cross | |
- run: CROSS_CONTAINER_OPTS="--network host" RUST_LOG=info cross test --workspace --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: | |
fail-fast: false | |
matrix: | |
target: | |
- x86_64-unknown-linux-musl | |
toolchain: | |
- stable | |
# msrv of backhand-cli | |
- 1.73.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@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # master | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
# install cross | |
- run: cargo install cargo-quickinstall | |
- run: cargo quickinstall [email protected] --force | |
# build bins | |
- run: cross build ${{ matrix.features }} --target ${{ matrix.target }} --release --locked --workspace | |
# run tests with native unsquashfs on x86_64-unknown-linux-musl (using Cross.toml) | |
- run: CROSS_CONTAINER_OPTS="--network host" RUST_LOG=info cross test --workspace --release ${{ matrix.features }} --target ${{ matrix.target }} --locked --features __test_unsquashfs -- --skip slow | |
# benchmark | |
benchmark: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
toolchain: | |
- stable | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # master | |
with: | |
toolchain: ${{ matrix.toolchain }} | |
- run: cargo bench | |
# fmt and clippy on stable | |
fmt-clippy-stable: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 | |
- uses: dtolnay/rust-toolchain@439cf607258077187679211f12aa6f19af4a0af7 # master | |
with: | |
toolchain: stable | |
components: rustfmt, clippy | |
# fmt | |
- run: cargo fmt --all -- --check | |
# clippy | |
- run: cargo clippy -- -D warnings |