Skip to content

Commit

Permalink
feat: build for arm64 on MacOS
Browse files Browse the repository at this point in the history
Closes #1996
Closes #4236
  • Loading branch information
barmac committed Apr 11, 2024
1 parent 6245e57 commit 851ba29
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 109 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/NIGHTLY.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,10 @@ jobs:
- 'dist/camunda-modeler-nightly-linux-x64.tar.gz'
- os: macos-12
files:
- 'dist/camunda-modeler-nightly-mac.dmg'
- 'dist/camunda-modeler-nightly-mac.zip'
- 'dist/camunda-modeler-nightly-mac-arm64.dmg'
- 'dist/camunda-modeler-nightly-mac-arm64.zip'
- 'dist/camunda-modeler-nightly-mac-x64.dmg'
- 'dist/camunda-modeler-nightly-mac-x64.zip'
- os: windows-2022
files:
- 'dist/camunda-modeler-nightly-win-ia32.zip'
Expand Down
12 changes: 10 additions & 2 deletions electron-builder.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
],
"afterPack": "./tasks/after-pack.js",
"afterSign": "./tasks/after-sign.js",
"afterAllArtifactBuild": "./tasks/after-all-artifact-build.js",
"win": {
"target": [
{
Expand All @@ -34,7 +33,16 @@
"mac": {
"hardenedRuntime": true,
"entitlements": "./build/entitlements.mac.inherit.plist",
"target": "dmg"
"target": [
{
"target": "dmg",
"arch": [ "x64", "arm64" ]
},
{
"target": "zip",
"arch": [ "x64", "arm64" ]
}
]
},
"fileAssociations": [
{
Expand Down
28 changes: 0 additions & 28 deletions tasks/after-all-artifact-build.js

This file was deleted.

71 changes: 0 additions & 71 deletions tasks/after-all-artifact-build/build-mac-zip.js

This file was deleted.

5 changes: 2 additions & 3 deletions tasks/distro.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,6 @@ if (nightly) {

const artifactOptions = [
'-c.artifactName=${name}-${version}-${os}-${arch}.${ext}',
'-c.dmg.artifactName=${name}-${version}-${os}.${ext}',
'-c.nsis.artifactName=${name}-${version}-${os}-setup.${ext}',
'-c.nsisWeb.artifactName=${name}-${version}-${os}-web-setup.${ext}',
argv.compress === false && '-c.compression=store'
Expand All @@ -105,12 +104,12 @@ if (certificateFingerprint) {
signingOptions.push(`-c.win.certificateSha1=${certificateFingerprint}`);
}

if (publish && (argv.ia32 || argv.x64)) {
if (publish && (argv.ia32 || argv.x64 || argv.arm64)) {
console.error('Do not override arch; is manually pinned');
process.exit(1);
}

const archOptions = [ 'x64', 'ia32' ].filter(a => argv[a]).map(a => `--${a}`);
const archOptions = [ 'x64', 'ia32', 'arm64' ].filter(a => argv[a]).map(a => `--${a}`);

const extraMetadataOptions = [
`-c.extraMetadata.SENTRY_DSN=${ process.env.SENTRY_DSN || null }`
Expand Down
9 changes: 6 additions & 3 deletions tasks/test-distro.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,13 @@ const expectedFiles = {
}
],
mac: [
'camunda-modeler-${version}-mac.dmg',
{
name: 'camunda-modeler-${version}-mac.zip',
archs: [ 'x64' ],
name: 'camunda-modeler-${version}-mac-${arch}.dmg',
archs: [ 'x64', 'arm64' ]
},
{
name: 'camunda-modeler-${version}-mac-${arch}.zip',
archs: [ 'x64', 'arm64' ],
contents: [
'Camunda Modeler.app/Contents/Info.plist'
]
Expand Down

0 comments on commit 851ba29

Please sign in to comment.