Skip to content

Commit 1ad4b01

Browse files
committed
fixes for mac
1 parent 1f65a74 commit 1ad4b01

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

.github/workflows/matlab.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- name: Run wkwBuild
2121
uses: matlab-actions/run-command@v2
2222
with:
23-
command: cd zarr-matlab, wkwBuild
23+
command: cd zarr-matlab, zarrBuild
2424

2525
- uses: actions/upload-artifact@v4
2626
with:

zarr-matlab/wkwBuild.m renamed to zarr-matlab/zarrBuild.m

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function wkwBuild()
1+
function zarrBuild()
22
% Written by
33
% Benedikt Staffler <[email protected]>
44
% Alessandro Motta <[email protected]>
@@ -39,10 +39,14 @@ function buildWithCargo(oldName, newName)
3939
%system('cargo update');
4040

4141
if ismac
42-
% In case the binary is build on arm64 make sure to use x86 as the
43-
% target.
44-
system('cargo build --release --target=aarch64-apple-darwin');
45-
libDir = fullfile(cargoDir, 'target', 'aarch64-apple-darwin', 'release');
42+
[~, unameResult] = system('uname -m');
43+
if strcmp(strtrim(unameResult),'arm64')
44+
system('cargo build --release --target=aarch64-apple-darwin');
45+
libDir = fullfile(cargoDir, 'target', 'aarch64-apple-darwin', 'release');
46+
else
47+
system('cargo build --release --target=x86_64-apple-darwin');
48+
libDir = fullfile(cargoDir, 'target', 'x86_64-apple-darwin', 'release');
49+
end
4650
else
4751
system('cargo build --release');
4852
libDir = fullfile(cargoDir, 'target', 'release');

0 commit comments

Comments
 (0)