From 5efe8d092f2b9e894b16ad4ccb90d8575a9ee43d Mon Sep 17 00:00:00 2001 From: Dan Cline <6798349+Rjected@users.noreply.github.com> Date: Mon, 5 Feb 2024 10:59:39 -0500 Subject: [PATCH] Add more targets to CI for rust bindings (#390) --- .github/workflows/rust-tests.yml | 34 +++++++++++++++++++++++++------- 1 file changed, 27 insertions(+), 7 deletions(-) diff --git a/.github/workflows/rust-tests.yml b/.github/workflows/rust-tests.yml index 64e037b..2028edf 100644 --- a/.github/workflows/rust-tests.yml +++ b/.github/workflows/rust-tests.yml @@ -18,27 +18,47 @@ jobs: - uses: dtolnay/rust-toolchain@stable - uses: taiki-e/install-action@cargo-hack - uses: Swatinem/rust-cache@v2 + with: + workspaces: "./bindings/rust" - name: cargo hack working-directory: bindings/rust run: cargo hack check --feature-powerset --depth 2 tests: - runs-on: ${{ matrix.os }} + runs-on: ${{ matrix.host }} strategy: + fail-fast: false matrix: - os: - - ubuntu-latest - - windows-latest - - macos-latest + include: + - host: ubuntu-latest + target: x86_64-unknown-linux-gnu + - host: windows-latest + target: x86_64-pc-windows-msvc + - host: macos-14 + target: aarch64-apple-darwin + - host: macos-latest + target: x86_64-apple-darwin steps: - uses: actions/checkout@v3 with: submodules: recursive + - uses: dtolnay/rust-toolchain@stable + with: + target: ${{ matrix.target }} + + - uses: taiki-e/setup-cross-toolchain-action@v1 + with: + target: ${{ matrix.target }} + - uses: Swatinem/rust-cache@v2 + with: + workspaces: "./bindings/rust" + cache-on-failure: true + - name: Build and Test working-directory: bindings/rust - run: cargo test + run: cargo test --target ${{ matrix.target }} - name: Benchmark working-directory: bindings/rust - run: cargo bench + run: cargo bench --target ${{ matrix.target }}