Skip to content

Commit 6d42a5b

Browse files
hotlongCopilot
andcommitted
ci(one): cross-compile macOS x64 from arm64 runner + 45min job timeout
macos-13 (Intel) runners have multi-hour queue waits. Cross-compile x86_64-apple-darwin from a macos-14 runner instead. stage-runtime.mjs now honours TARGET_ARCH env so the right Node tarball + native module prebuilds are staged for the build target rather than the host. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 3387200 commit 6d42a5b

2 files changed

Lines changed: 10 additions & 3 deletions

File tree

.github/workflows/one.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,25 +18,30 @@ jobs:
1818
build:
1919
name: ${{ matrix.label }}
2020
runs-on: ${{ matrix.os }}
21+
timeout-minutes: 45
2122
strategy:
2223
fail-fast: false
2324
matrix:
2425
include:
2526
- label: macOS (arm64)
2627
os: macos-14
2728
target: aarch64-apple-darwin
29+
target-arch: arm64
2830
bundle-dir: macos
2931
- label: macOS (x64)
30-
os: macos-13
32+
os: macos-14
3133
target: x86_64-apple-darwin
34+
target-arch: x64
3235
bundle-dir: macos
3336
- label: Windows (x64)
3437
os: windows-2022
3538
target: x86_64-pc-windows-msvc
39+
target-arch: x64
3640
bundle-dir: nsis
3741
- label: Linux (x64)
3842
os: ubuntu-22.04
3943
target: x86_64-unknown-linux-gnu
44+
target-arch: x64
4045
bundle-dir: deb
4146

4247
steps:
@@ -71,6 +76,8 @@ jobs:
7176
run: pnpm install --frozen-lockfile
7277

7378
- name: Stage Node runtime
79+
env:
80+
TARGET_ARCH: ${{ matrix.target-arch }}
7481
run: pnpm --filter @objectos/one stage
7582

7683
- name: Build Tauri bundle

apps/objectos-one/scripts/stage-runtime.mjs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const RUNTIME = resolve(PKG, 'src-tauri/runtime');
2828
const NODE_VERSION = process.env.NODE_VERSION ?? '22.22.0';
2929

3030
const osName = ({ darwin: 'darwin', linux: 'linux', win32: 'win' })[platform()];
31-
const archName = ({ x64: 'x64', arm64: 'arm64' })[arch()];
31+
const archName = process.env.TARGET_ARCH ?? ({ x64: 'x64', arm64: 'arm64' })[arch()];
3232
if (!osName || !archName) {
3333
console.error(`unsupported platform: ${platform()}/${arch()}`);
3434
process.exit(1);
@@ -55,7 +55,7 @@ function slim(root) {
5555
if (!existsSync(root)) return;
5656
const dropFileExt = /\.(map|md|markdown)$/i;
5757
const dropDirName = /^(__tests__|\.github|\.nyc_output|coverage)$/i;
58-
const platformTag = `${platform() === 'win32' ? 'win32' : platform()}-${arch()}`;
58+
const platformTag = `${platform() === 'win32' ? 'win32' : platform()}-${archName}`;
5959

6060
let removed = 0;
6161
let bytes = 0;

0 commit comments

Comments
 (0)