Skip to content

Commit 94c35a5

Browse files
authored
Merge pull request #15 from hkrutzer/macos-arm
feat: add arm64 support on osx
2 parents 6f9e87d + f32e435 commit 94c35a5

File tree

3 files changed

+27
-6
lines changed

3 files changed

+27
-6
lines changed

.github/workflows/main.yml

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,24 @@ on:
66

77
jobs:
88
install_fdb:
9-
name: Install
9+
name: Install FDB ${{ matrix.fdb_version }} on ${{ matrix.os }}
1010

1111
strategy:
1212
matrix:
13-
os: [ubuntu-latest, macos-13]
13+
include:
14+
# macOS test variations
15+
- os: macos-13
16+
fdb_version: '7.3.66'
17+
- os: macos-14
18+
fdb_version: '7.3.66'
19+
20+
# Linux test variations
21+
- os: ubuntu-latest
22+
fdb_version: '6.3.25'
23+
- os: ubuntu-latest
24+
fdb_version: '7.1.59'
25+
- os: ubuntu-latest
26+
fdb_version: '7.3.66'
1427

1528
runs-on: ${{ matrix.os }}
1629

dist/index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2886,9 +2886,13 @@ try {
28862886
break;
28872887
}
28882888
case 'darwin': {
2889-
let url = `${base_url}/FoundationDB-${version}_x86_64.pkg`;
2889+
let arch = os.arch();
2890+
let arch_suffix = arch === 'arm64' ? 'arm64' : 'x86_64';
2891+
let url = `${base_url}/FoundationDB-${version}_${arch_suffix}.pkg`;
2892+
let pkg_name = `FoundationDB-${version}_${arch_suffix}.pkg`;
2893+
28902894
exec(`curl -L -O ${url}`);
2891-
exec(`sudo installer -pkg FoundationDB-${version}_x86_64.pkg -target /`);
2895+
exec(`sudo installer -pkg ${pkg_name} -target /`);
28922896
break;
28932897
}
28942898
default:

index.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,13 @@ try {
2525
break;
2626
}
2727
case 'darwin': {
28-
let url = `${base_url}/FoundationDB-${version}_x86_64.pkg`;
28+
let arch = os.arch();
29+
let arch_suffix = arch === 'arm64' ? 'arm64' : 'x86_64';
30+
let url = `${base_url}/FoundationDB-${version}_${arch_suffix}.pkg`;
31+
let pkg_name = `FoundationDB-${version}_${arch_suffix}.pkg`;
32+
2933
exec(`curl -L -O ${url}`);
30-
exec(`sudo installer -pkg FoundationDB-${version}_x86_64.pkg -target /`);
34+
exec(`sudo installer -pkg ${pkg_name} -target /`);
3135
break;
3236
}
3337
default:

0 commit comments

Comments
 (0)