Skip to content

Commit 5ac6801

Browse files
author
Akos Kitta
committed
feat: build IDE2 on darwin arm64
- Use Node.js 16+, - All workflow files use `.yml` instead of `.yaml`, - Use Arduino LS `0.7.2`, - Updated `electron-builder` to `23.3.3`, - Removed unused `conf-node-gyp.sh`, - Removed unused `THEIA_ELECTRON_SKIP_REPLACE_FFMPEG`, and - Aligned `[email protected]`, `[email protected]` to Theia. Signed-off-by: Akos Kitta <[email protected]>
1 parent b55cfc2 commit 5ac6801

21 files changed

+75
-158
lines changed
File renamed without changes.

Diff for: .github/workflows/build.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ jobs:
5757
- name: Checkout
5858
uses: actions/checkout@v2
5959

60-
- name: Install Node.js 14.x
60+
- name: Install Node.js 16.x
6161
uses: actions/setup-node@v1
6262
with:
63-
node-version: '14.x'
63+
node-version: '16.x'
6464
registry-url: 'https://registry.npmjs.org'
6565

6666
- name: Install Python 3.x

Diff for: .github/workflows/check-i18n-task.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ jobs:
2929
- name: Checkout repository
3030
uses: actions/checkout@v2
3131

32-
- name: Install Node.js 14.x
32+
- name: Install Node.js 16.x
3333
uses: actions/setup-node@v2
3434
with:
35-
node-version: '14.x'
35+
node-version: '16.x'
3636
registry-url: 'https://registry.npmjs.org'
3737

3838
- name: Install Go

Diff for: .github/workflows/compose-full-changelog.yaml renamed to .github/workflows/compose-full-changelog.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ on:
88
env:
99
CHANGELOG_ARTIFACTS: changelog
1010
# See: https://github.com/actions/setup-node/#readme
11-
NODE_VERSION: 14.x
11+
NODE_VERSION: 16.x
1212

1313
jobs:
1414
create-changelog:
File renamed without changes.

Diff for: .github/workflows/i18n-nightly-push.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
- name: Checkout
1717
uses: actions/checkout@v2
1818

19-
- name: Install Node.js 14.x
19+
- name: Install Node.js 16.x
2020
uses: actions/setup-node@v2
2121
with:
22-
node-version: '14.x'
22+
node-version: '16.x'
2323
registry-url: 'https://registry.npmjs.org'
2424

2525
- name: Install Go

Diff for: .github/workflows/i18n-weekly-pull.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ jobs:
1616
- name: Checkout
1717
uses: actions/checkout@v2
1818

19-
- name: Install Node.js 14.x
19+
- name: Install Node.js 16.x
2020
uses: actions/setup-node@v2
2121
with:
22-
node-version: '14.x'
22+
node-version: '16.x'
2323
registry-url: 'https://registry.npmjs.org'
2424

2525
- name: Install Go

Diff for: .github/workflows/themes-weekly-pull.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
env:
1010
# See vars.GO_VERSION field of https://github.com/arduino/arduino-cli/blob/master/DistTasks.yml
1111
GO_VERSION: "1.17"
12-
NODE_VERSION: 14.x
12+
NODE_VERSION: 16.x
1313

1414
jobs:
1515
pull-from-jsonbin:

Diff for: arduino-ide-extension/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@
167167
"version": "14.0.0"
168168
},
169169
"languageServer": {
170-
"version": "0.7.1"
170+
"version": "0.7.2"
171171
}
172172
}
173173
}

Diff for: arduino-ide-extension/scripts/download-cli.js

+3
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,9 @@
4242
const suffix = (() => {
4343
switch (platform) {
4444
case 'darwin':
45+
if (arch === 'arm64') {
46+
return 'macOS_ARM64.tar.gz';
47+
}
4548
return 'macOS_64bit.tar.gz';
4649
case 'win32':
4750
return 'Windows_64bit.zip';

Diff for: arduino-ide-extension/scripts/download-ls.js

+6
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,12 @@
7676
lsSuffix = 'macOS_64bit.tar.gz';
7777
clangdSuffix = 'macOS_64bit';
7878
break;
79+
case 'darwin-arm64':
80+
clangdExecutablePath = path.join(build, 'clangd');
81+
clangFormatExecutablePath = path.join(build, 'clang-format');
82+
lsSuffix = 'macOS_ARM64.tar.gz';
83+
clangdSuffix = 'macOS_ARM64';
84+
break;
7985
case 'linux-x64':
8086
clangdExecutablePath = path.join(build, 'clangd');
8187
clangFormatExecutablePath = path.join(build, 'clang-format');

Diff for: docs/development.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ This repository contains the main code, but two more repositories are included d
5454
If you’re familiar with TypeScript, the [Theia IDE](https://theia-ide.org/), and if you want to contribute to the
5555
project, you should be able to build the Arduino IDE locally.
5656
Please refer to the [Theia IDE prerequisites](https://github.com/eclipse-theia/theia/blob/master/doc/Developing.md#prerequisites) documentation for the setup instructions.
57-
> **Note**: Node.js 14 must be used instead of the version 12 recommended at the link above.
57+
> **Note**: Node.js 16 must be used instead of the version 14 recommended at the link above. `arm64` arch is not recognized on 14. If you want to work build IDE2 on ARM, Node.js 16 is a must.
5858
5959
Once you have all the tools installed, you can build the editor following these steps
6060

Diff for: docs/internal/Arm.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
Building the Pro IDE on Linux `armv7l` (aka `armhf`) and `aarch64` (aka `arm64`):
44

5-
1. Install Node.js 14.x with [nvm](https://github.com/nvm-sh/nvm#install--update-script):
5+
1. Install Node.js 16.x with [nvm](https://github.com/nvm-sh/nvm#install--update-script):
66
```
77
wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash
88
```
99
Restart your shell then:
1010
```
11-
nvm install 14
12-
nvm use 14
11+
nvm install 16
12+
nvm use 16
1313
```
1414
Verify:
1515
```

Diff for: docs/internal/Ubuntu.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ sudo apt update \
1818
build-essential \
1919
&& wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.3/install.sh | bash \
2020
&& source ~/.bashrc \
21-
&& nvm install 14 \
22-
&& nvm use 14 \
23-
&& nvm alias default 14 \
21+
&& nvm install 16 \
22+
&& nvm use 16 \
23+
&& nvm alias default 16 \
2424
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add - \
2525
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list \
2626
&& sudo apt update && sudo apt install --no-install-recommends yarn \

Diff for: electron/build/template-package.json

+6-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
"devDependencies": {
1212
"@theia/cli": "1.25.0",
1313
"cross-env": "^7.0.2",
14-
"electron-builder": "23.0.2",
14+
"electron-builder": "23.3.3",
1515
"electron-notarize": "^1.1.1",
1616
"is-ci": "^2.0.0",
1717
"ncp": "^2.0.0",
@@ -26,7 +26,7 @@
2626
"patch": "ncp ./patch/backend/main.js ./src-gen/backend/main.js"
2727
},
2828
"engines": {
29-
"node": ">=14.0.0 <15"
29+
"node": ">=16.0.0 <17"
3030
},
3131
"repository": {
3232
"type": "git",
@@ -89,7 +89,10 @@
8989
"hardenedRuntime": true,
9090
"gatekeeperAssess": false,
9191
"entitlements": "resources/entitlements.mac.plist",
92-
"entitlementsInherit": "resources/entitlements.mac.plist"
92+
"entitlementsInherit": "resources/entitlements.mac.plist",
93+
"target": {
94+
"target": "default"
95+
}
9396
},
9497
"linux": {
9598
"target": [

Diff for: electron/packager/conf-node-gyp.sh

-11
This file was deleted.

Diff for: electron/packager/config.js

+3
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ function artifactName() {
2727
throw new Error(`Unsupported platform, arch: ${platform}, ${arch}`);
2828
}
2929
case 'darwin': {
30+
if (arch === 'arm64') {
31+
return `${name}_${id}_macOS_ARM64.\$\{ext}`;
32+
}
3033
return `${name}_${id}_macOS_64bit.\$\{ext}`;
3134
}
3235
case 'linux': {

Diff for: electron/packager/index.js

-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66
const shell = require('shelljs');
77
const glob = require('glob');
88
const isCI = require('is-ci');
9-
shell.env.THEIA_ELECTRON_SKIP_REPLACE_FFMPEG = '1'; // Do not run the ffmpeg validation for the packager.
109
// Note, this will crash on PI if the available memory is less than desired heap size.
1110
// https://github.com/shelljs/shelljs/issues/1024#issuecomment-1001552543
1211
shell.env.NODE_OPTIONS = '--max_old_space_size=4096'; // Increase heap size for the CI

Diff for: electron/packager/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
"yargs": "^12.0.5"
3434
},
3535
"engines": {
36-
"node": ">=14.0.0 <15"
36+
"node": ">=16.0.0 <17"
3737
},
3838
"mocha": {
3939
"reporter": "spec",

Diff for: package.json

+4-3
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"license": "AGPL-3.0-or-later",
88
"private": true,
99
"engines": {
10-
"node": ">=14.0.0 <15"
10+
"node": ">=16.0.0 <17"
1111
},
1212
"devDependencies": {
1313
"@theia/cli": "1.25.0",
@@ -26,7 +26,7 @@
2626
"ignore-styles": "^5.0.1",
2727
"lerna": "^3.20.2",
2828
"lint-staged": "^11.0.0",
29-
"node-gyp": "^9.0.0",
29+
"node-gyp": "^9.3.0",
3030
"prettier": "^2.3.1",
3131
"reflect-metadata": "^0.1.10",
3232
"rimraf": "^2.6.1",
@@ -37,7 +37,8 @@
3737
"xhr2": "^0.2.1"
3838
},
3939
"resolutions": {
40-
"@types/react": "16.14.25"
40+
"@types/react": "16.14.25",
41+
"electron-rebuild": "3.2.9"
4142
},
4243
"scripts": {
4344
"prepare": "lerna run prepare && yarn download:plugins",

0 commit comments

Comments
 (0)