Skip to content

armgit / Cap

Public Imported from GitHub
0

Open source Loom alternative. Beautiful, shareable screen recordings.

specify arch in workflow

Brendan Allan29ffbc1a3b8b
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b8731100d..96cce254f 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -62,8 +62,10 @@ jobs:
settings:
- target: aarch64-apple-darwin
runner: macos-latest
+ arch: aarch64
- target: x86_64-pc-windows-msvc
runner: windows-latest
+ arch: x86_64
runs-on: ${{ matrix.settings.runner }}
steps:
- name: Checkout repository
@@ -122,3 +124,4 @@ jobs:
env:
# https://github.com/tauri-apps/tauri-action/issues/740
CI: false
+ RUST_ARCH: ${{ matrix.settings.arch }}
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml
index 83a5b4abe..44c14a713 100644
--- a/.github/workflows/publish.yml
+++ b/.github/workflows/publish.yml
@@ -138,10 +138,13 @@ jobs:
settings:
- target: x86_64-apple-darwin
runner: macos-latest
+ arch: x86_64
- target: aarch64-apple-darwin
runner: macos-latest
+ arch: aarch64
- target: x86_64-pc-windows-msvc
runner: windows-latest
+ arch: x86_64
runs-on: ${{ matrix.settings.runner }}
steps:
- name: Checkout repository
@@ -225,6 +228,7 @@ jobs:
APPLE_KEYCHAIN: ${{ runner.temp }}/build.keychain
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_SIGNING_PRIVATE_KEY_PASSWORD }}
+ RUST_ARCH: ${{ matrix.settings.arch }}
- name: Upload assets
uses: crabnebula-dev/cloud-release@v0
diff --git a/apps/desktop/scripts/prepare.js b/apps/desktop/scripts/prepare.js
index fdf9db03c..c728f3d7c 100644
--- a/apps/desktop/scripts/prepare.js
+++ b/apps/desktop/scripts/prepare.js
@@ -72,7 +72,7 @@ export async function createTauriPlatformConfigs(
) {
const srcTauri = path.join(__dirname, "../src-tauri/");
let baseConfig = {};
- let configFileName = "";
+ let configFileName = null;
console.log(`Updating Platform (${platform}) Tauri config...`);
if (platform === "win32") {
@@ -91,6 +91,8 @@ export async function createTauriPlatformConfigs(
};
}
+ if (!configFileName) return;
+
const mergedConfig = configOptions
? deepMerge(baseConfig, configOptions)
: baseConfig;
diff --git a/scripts/setup.js b/scripts/setup.js
index c8286104b..4e277a290 100644
--- a/scripts/setup.js
+++ b/scripts/setup.js
@@ -14,7 +14,8 @@ const __dirname = path.dirname(__filename);
const __root = path.resolve(path.join(__dirname, ".."));
const targetDir = path.join(__root, "target");
-const arch = process.arch === "arm64" ? "aarch64" : "x86_64";
+const arch =
+ process.env.RUST_ARCH ?? process.arch === "arm64" ? "aarch64" : "x86_64";
async function main() {
await fs.mkdir(targetDir, { recursive: true });