diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4ce6a157..a981a891 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -10,11 +10,17 @@ on: name: ci jobs: - # build, test all supported targets - build-test: + # build all supported targets for library + build-lib: runs-on: ubuntu-latest strategy: matrix: + target: + - x86_64-unknown-linux-musl + - aarch64-unknown-linux-musl + - arm-unknown-linux-musleabi + - mips-unknown-linux-musl + - mipsel-unknown-linux-musl toolchain: - stable # msrv @@ -35,8 +41,44 @@ jobs: toolchain: ${{ matrix.toolchain }} components: rustfmt, clippy - uses: Swatinem/rust-cache@v2 - - run: cargo build ${{ matrix.features }} - - run: RUST_LOG=info cargo test --release ${{ matrix.features }} + # install cross + - run: cargo install cargo-quickinstall + - run: cargo quickinstall cross@0.2.5 --force + # build with cross + - run: cross build ${{ matrix.features }} --target ${{ matrix.target }} --locked --lib + + # test some supported targets + test: + runs-on: ubuntu-latest + strategy: + matrix: + target: + - x86_64-unknown-linux-musl + toolchain: + - stable + # msrv + - 1.65.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@v3 + - uses: dtolnay/rust-toolchain@master + with: + toolchain: ${{ matrix.toolchain }} + components: rustfmt, clippy + - uses: Swatinem/rust-cache@v2 + # install cross + - run: cargo install cargo-quickinstall + - run: cargo quickinstall cross@0.2.5 --force + # test with cross + - run: RUST_LOG=info cross test --release ${{ matrix.features }} --target ${{ matrix.target }} --locked # benchmark benchmark: