From 9d07e688719e0ed46ffe6f4bb222977c2b9fef11 Mon Sep 17 00:00:00 2001 From: Lucas Nogueira Date: Fri, 20 Oct 2023 00:29:12 -0300 Subject: [PATCH] update test CI --- .github/workflows/test-rust.yml | 40 ++++++++++----------------------- 1 file changed, 12 insertions(+), 28 deletions(-) diff --git a/.github/workflows/test-rust.yml b/.github/workflows/test-rust.yml index ea17506b0..28b8b7ae8 100644 --- a/.github/workflows/test-rust.yml +++ b/.github/workflows/test-rust.yml @@ -130,31 +130,31 @@ jobs: - { target: x86_64-pc-windows-msvc, os: windows-latest, - cross: false, + runner: 'cargo', command: "test", } - { target: x86_64-unknown-linux-gnu, os: ubuntu-latest, - cross: false, + runner: 'cargo', command: "test", } - { target: x86_64-apple-darwin, os: macos-latest, - cross: false, + runner: 'cargo', command: "test", } - { target: aarch64-apple-ios, os: macos-latest, - cross: false, + runner: 'cargo', command: "build", } - { target: aarch64-linux-android, os: ubuntu-latest, - cross: true, + runner: 'cross', command: "build", } @@ -192,34 +192,18 @@ jobs: run: | cargo update -p time@0.3.24 --precise 0.3.23 + - name: install cross + if: ${{ matrix.platform.runner == 'cross' }} + run: cargo install cross --git https://github.com/cross-rs/cross + - name: test ${{ matrix.package }} if: matrix.package != 'tauri-plugin-sql' - uses: actions-rs/cargo@v1 - with: - use-cross: ${{ matrix.platform.cross }} - command: ${{ matrix.platform.command }} - args: --package ${{ matrix.package }} --target ${{ matrix.platform.target }} --all-targets - - - name: test ${{ matrix.package }} --all-features - if: ${{ !contains(fromJSON('["tauri-plugin-http", "tauri-plugin-upload", "tauri-plugin-updater", "tauri-plugin-websocket", "tauri-plugin-sql"]'), matrix.package) }} - uses: actions-rs/cargo@v1 - with: - use-cross: ${{ matrix.platform.cross }} - command: ${{ matrix.platform.command }} - args: --package ${{ matrix.package }} --target ${{ matrix.platform.target }} --all-targets --all-features + run: ${{ matrix.platform.runner }} ${{ matrix.platform.command }} --package ${{ matrix.package }} --target ${{ matrix.platform.target }} --all-targets - name: test ${{ matrix.package }} mysql if: matrix.package == 'tauri-plugin-sql' - uses: actions-rs/cargo@v1 - with: - use-cross: ${{ matrix.platform.cross }} - command: ${{ matrix.platform.command }} - args: --package ${{ matrix.package }} --target ${{ matrix.platform.target }} --all-targets --features mysql + run: ${{ matrix.platform.runner }} ${{ matrix.platform.command }} --package ${{ matrix.package }} --target ${{ matrix.platform.target }} --all-targets --features mysql - name: test ${{ matrix.package }} postgres if: matrix.package == 'tauri-plugin-sql' - uses: actions-rs/cargo@v1 - with: - use-cross: ${{ matrix.platform.cross }} - command: ${{ matrix.platform.command }} - args: --package ${{ matrix.package }} --target ${{ matrix.platform.target }} --all-targets --features postgres + run: ${{ matrix.platform.runner }} ${{ matrix.platform.command }} --package ${{ matrix.package }} --target ${{ matrix.platform.target }} --all-targets --features postgres