From c5a0785c1139d34bc440cb4b361e41dedc1b39b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Vieira?= Date: Wed, 13 Nov 2024 02:04:38 +0000 Subject: [PATCH 1/2] Add aarch64-apple-darwin build target to cubestore Fixes: #8949 --- .github/workflows/publish.yml | 11 ++++++++++- .github/workflows/rust-cubestore-master.yml | 7 +++++++ .github/workflows/rust-cubestore.yml | 7 +++++++ rust/cubestore/js-wrapper/src/utils.ts | 3 +-- 4 files changed, 25 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 22a53e2d104a1..d0c83b46eda99 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -666,6 +666,7 @@ jobs: target: - x86_64-pc-windows-msvc - x86_64-apple-darwin + - aarch64-apple-darwin include: - target: x86_64-pc-windows-msvc os: windows-2019 @@ -673,8 +674,8 @@ jobs: strip: true # cubestored.exe: CantPackException: superfluous data between sections compress: false - # Please use minimal possible version of macOS, because it produces constraint on libstdc++ tar_executable: tar + # Please use minimal possible version of macOS, because it produces constraint on libstdc++ - target: x86_64-apple-darwin os: macos-12 executable_name: cubestored @@ -683,6 +684,14 @@ jobs: compress: false # bsd tar has a different format with Sparse files which breaks download script tar_executable: gtar + - os: macos-14 + target: aarch64-apple-darwin + executable_name: cubestored + # upx has been disabled because it is crashing for macOS Ventura or above! It was disabled on 2024-09-05. + strip: false + compress: false + # bsd tar has a different format with Sparse files which breaks download script + tar_executable: gtar fail-fast: false permissions: contents: write diff --git a/.github/workflows/rust-cubestore-master.yml b/.github/workflows/rust-cubestore-master.yml index 585080bd80c92..42f2a3837a2c6 100644 --- a/.github/workflows/rust-cubestore-master.yml +++ b/.github/workflows/rust-cubestore-master.yml @@ -187,6 +187,7 @@ jobs: target: - x86_64-pc-windows-msvc - x86_64-apple-darwin + - aarch64-apple-darwin include: - os: windows-2019 target: x86_64-pc-windows-msvc @@ -201,6 +202,12 @@ jobs: # upx has been disabled because it is crashing for macOS Ventura or above! It was disabled on 2024-09-05. strip: false compress: false + - os: macos-14 + target: aarch64-apple-darwin + executable_name: cubestored + # upx has been disabled because it is crashing for macOS Ventura or above! It was disabled on 2024-09-05. + strip: false + compress: false fail-fast: false steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/rust-cubestore.yml b/.github/workflows/rust-cubestore.yml index 1f5411d2dd265..9cbe945fb9bfb 100644 --- a/.github/workflows/rust-cubestore.yml +++ b/.github/workflows/rust-cubestore.yml @@ -118,6 +118,7 @@ jobs: target: - x86_64-pc-windows-msvc - x86_64-apple-darwin + - aarch64-apple-darwin include: - os: windows-2019 target: x86_64-pc-windows-msvc @@ -132,6 +133,12 @@ jobs: # upx has been disabled because it is crashing for macOS Ventura or above! It was disabled on 2024-09-05. strip: false compress: false + - os: macos-14 + target: aarch64-apple-darwin + executable_name: cubestored + # upx has been disabled because it is crashing for macOS Ventura or above! It was disabled on 2024-09-05. + strip: false + compress: false fail-fast: false steps: - uses: actions/checkout@v4 diff --git a/rust/cubestore/js-wrapper/src/utils.ts b/rust/cubestore/js-wrapper/src/utils.ts index ba4041da07e8c..6b657265398d9 100644 --- a/rust/cubestore/js-wrapper/src/utils.ts +++ b/rust/cubestore/js-wrapper/src/utils.ts @@ -29,8 +29,7 @@ export function getTarget(): string { ); } case 'darwin': - // Rosetta 2 is required - return 'x86_64-apple-darwin'; + return 'aarch64-apple-darwin'; default: throw new Error( `You are using ${process.env} platform on arm64 which is not supported by Cube Store`, From 89fe277061dfea2ccac8a6a6f005c60bdc7804bc Mon Sep 17 00:00:00 2001 From: Dmitry Patsura Date: Wed, 13 Nov 2024 11:51:02 +0100 Subject: [PATCH 2/2] chore: drop old comment --- rust/cubestore/js-wrapper/src/utils.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/rust/cubestore/js-wrapper/src/utils.ts b/rust/cubestore/js-wrapper/src/utils.ts index 6b657265398d9..47e66544d5e7c 100644 --- a/rust/cubestore/js-wrapper/src/utils.ts +++ b/rust/cubestore/js-wrapper/src/utils.ts @@ -48,7 +48,6 @@ export function isCubeStoreSupported(): boolean { } if (process.arch === 'arm64') { - // We mark darwin as supported, but it uses Rosetta 2 if (process.platform === 'darwin') { return true; }