diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 0c5f0be4..c0c10de6 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -50,7 +50,7 @@ jobs: with: toolchain: ${{ matrix.toolchain }} # build lib with cross - - run: $BUILD_CMD build ${{ matrix.features }} --target ${{ matrix.job.target }} --release --locked --workspace --lib + - run: $BUILD_CMD +${{ matrix.toolchain }} build ${{ matrix.features }} --target ${{ matrix.job.target }} --release --locked --workspace --lib # build/test all supported targets for library and bins (skipping slow and squashfs-tools tests) cross-test: @@ -67,7 +67,7 @@ jobs: - { target: arm-unknown-linux-musleabi, os: ubuntu-24.04, use-cross: true } - { target: armv7-unknown-linux-musleabi, os: ubuntu-24.04, use-cross: true } - { target: aarch64-unknown-linux-musl, os: ubuntu-24.04, use-cross: true } - - { target: x86_64-apple-darwin, os: macos-14 } + - { target: x86_64-apple-darwin, os: macos-14, } toolchain: - stable # msrv of backhand-cli @@ -92,11 +92,12 @@ jobs: with: toolchain: ${{ matrix.toolchain }} # TODO: really only needed for the matrix variables without use-cross - target: ${{ matrix.job.target }} - # build lib and bins with cross - - run: $BUILD_CMD build ${{ matrix.features }} --target ${{ matrix.job.target }} --release --locked --workspace --features xz-static + targets: ${{ matrix.job.target }} + + # build lib and bins with cross or cargo + - run: $BUILD_CMD +${{ matrix.toolchain }} build ${{ matrix.features }} --target ${{ matrix.job.target }} --release --locked --workspace --features xz-static # test with cross, skipping slow test and tests that use more then qemu default memory without use-cross without use-cross - - run: CROSS_CONTAINER_OPTS="--network host" RUST_LOG=info $BUILD_CMD test --workspace --release ${{ matrix.features }} --target ${{ matrix.job.target }} --features xz-static --locked -- --skip slow --skip no_qemu + - run: CROSS_CONTAINER_OPTS="--network host" RUST_LOG=info $BUILD_CMD +${{ matrix.toolchain }} test --workspace --release ${{ matrix.features }} --target ${{ matrix.job.target }} --features xz-static --locked -- --skip slow --skip no_qemu # build/test all supported on native x86_64 arch for library and bins (all tests) build-test-native: runs-on: ubuntu-24.04 @@ -124,9 +125,9 @@ jobs: with: toolchain: ${{ matrix.toolchain }} # build bins - - run: cargo build ${{ matrix.features }} --release --locked --workspace + - run: cargo +${{ matrix.toolchain }} build ${{ matrix.features }} --release --locked --workspace # run tests with native unsquashfs on x86_64-unknown-linux-musl (using Cross.toml) - - run: RUST_LOG=info cargo test --workspace --release ${{ matrix.features }} --locked --features __test_unsquashfs -- --skip slow + - run: RUST_LOG=info cargo +${{ matrix.toolchain }} test --workspace --release ${{ matrix.features }} --locked --features __test_unsquashfs -- --skip slow # fmt and clippy on stable fmt-clippy-stable: diff --git a/.github/workflows/msrv.yml b/.github/workflows/msrv.yml index 1e8b8692..cb18bdc5 100644 --- a/.github/workflows/msrv.yml +++ b/.github/workflows/msrv.yml @@ -26,7 +26,7 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.toolchain }} - - run: cargo check --locked -p backhand + - run: cargo +${{ matrix.toolchain }} check --locked -p backhand build-test-backhand-cli: runs-on: ubuntu-24.04 @@ -45,4 +45,4 @@ jobs: - uses: dtolnay/rust-toolchain@master with: toolchain: ${{ matrix.toolchain }} - - run: cargo check --locked -p backhand-cli + - run: cargo +${{ matrix.toolchain }} check --locked -p backhand-cli