From 4ce517acf9ab8f796537c7bc6d199ee46a8ce249 Mon Sep 17 00:00:00 2001 From: tangbo Date: Fri, 26 Apr 2024 17:11:08 +0800 Subject: [PATCH] fix macos unique toolchain --- .github/workflows/call-rust-tauri.yml | 2 +- templates/rust-tauri/extra.j2 | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/call-rust-tauri.yml b/.github/workflows/call-rust-tauri.yml index 33a495c..2afc6b3 100644 --- a/.github/workflows/call-rust-tauri.yml +++ b/.github/workflows/call-rust-tauri.yml @@ -112,7 +112,7 @@ jobs: - name: install stable toolchain uses: dtolnay/rust-toolchain@stable with: - targets: ${{ matrix.settings.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} + targets: ${{ matrix.settings.platform == 'macos-latest' && ((contains(matrix.settings.arg, 'x86_64') && 'x86_64-apple-darwin') || (contains(matrix.settings.arg, 'aarch64') && 'aarch64-apple-darwin')) || '' }} - name: rust cache uses: swatinem/rust-cache@v2 diff --git a/templates/rust-tauri/extra.j2 b/templates/rust-tauri/extra.j2 index e677a6d..6e2a1e9 100644 --- a/templates/rust-tauri/extra.j2 +++ b/templates/rust-tauri/extra.j2 @@ -39,7 +39,7 @@ steps: - name: install stable toolchain uses: dtolnay/rust-toolchain@stable with: - targets: ${{ matrix.settings.platform == 'macos-latest' && 'aarch64-apple-darwin,x86_64-apple-darwin' || '' }} + targets: ${{ matrix.settings.platform == 'macos-latest' && ((contains(matrix.settings.arg, 'x86_64') && 'x86_64-apple-darwin') || (contains(matrix.settings.arg, 'aarch64') && 'aarch64-apple-darwin')) || '' }} - name: rust cache uses: swatinem/rust-cache@v2