From b1a97c366bb4bec63746c0c791b2ebfc6b53e75d Mon Sep 17 00:00:00 2001 From: Mega Mind <146339422+M3gA-Mind@users.noreply.github.com> Date: Wed, 3 Jun 2026 00:38:47 +0530 Subject: [PATCH] fix(ci): key vendored tauri-cli cache by runner.arch to fix Linux x64 release build (#3228) --- .github/workflows/build-desktop.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-desktop.yml b/.github/workflows/build-desktop.yml index e845aa5c4..6c1fdeeb8 100644 --- a/.github/workflows/build-desktop.yml +++ b/.github/workflows/build-desktop.yml @@ -213,20 +213,27 @@ jobs: # Upstream @tauri-apps/cli doesn't bundle CEF framework files into the # produced installer. Only the fork at vendor/tauri-cef does. Build and # install that CLI so `cargo tauri build` invokes the cef-aware bundler. + # + # The cache key must include runner.arch, not just runner.os: cargo-tauri + # is a host-arch binary, and the Linux matrix runs on both x86_64 + # (ubuntu-24.04) and aarch64 (ubuntu-24.04-arm) runners that share + # runner.os == 'Linux'. Keying on runner.os alone lets one arch restore + # the other arch's binary, which then fails to exec ("ELF ...: not found" + # / "Syntax error: word unexpected") when `cargo tauri build` runs it. - name: Cache vendored tauri-cli binary (unix) if: matrix.settings.platform != 'windows-latest' id: tauri-cli-cache-unix uses: actions/cache@v5 with: path: ~/.cargo/bin/cargo-tauri - key: vendored-tauri-cli-${{ runner.os }}-${{ hashFiles('app/src-tauri/vendor/tauri-cef/crates/tauri-cli/Cargo.toml') }} + key: vendored-tauri-cli-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('app/src-tauri/vendor/tauri-cef/crates/tauri-cli/Cargo.toml') }} - name: Cache vendored tauri-cli binary (windows) if: matrix.settings.platform == 'windows-latest' id: tauri-cli-cache-windows uses: actions/cache@v5 with: path: ~/.cargo/bin/cargo-tauri.exe - key: vendored-tauri-cli-${{ runner.os }}-${{ hashFiles('app/src-tauri/vendor/tauri-cef/crates/tauri-cli/Cargo.toml') }} + key: vendored-tauri-cli-${{ runner.os }}-${{ runner.arch }}-${{ hashFiles('app/src-tauri/vendor/tauri-cef/crates/tauri-cli/Cargo.toml') }} - name: Install vendored tauri-cli (cef-aware bundler) if: (matrix.settings.platform == 'windows-latest' && steps.tauri-cli-cache-windows.outputs.cache-hit