Skip to content

Commit f262802

Browse files
author
Akos Kitta
committed
feat: build IDE2 on linux arm
Ref: #107 Signed-off-by: Akos Kitta <[email protected]>
1 parent cd1d16f commit f262802

File tree

3 files changed

+12
-5
lines changed

3 files changed

+12
-5
lines changed

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
"version": "0.28.0"
163163
},
164164
"fwuploader": {
165-
"version": "2.2.0"
165+
"version": "2.2.2"
166166
},
167167
"clangd": {
168168
"version": "14.0.0"

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

+6
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,12 @@
8888
lsSuffix = 'Linux_64bit.tar.gz';
8989
clangdSuffix = 'Linux_64bit';
9090
break;
91+
case 'linux-arm':
92+
clangdExecutablePath = path.join(build, 'clangd');
93+
clangFormatExecutablePath = path.join(build, 'clang-format');
94+
lsSuffix = 'Linux_ARMv7.tar.gz';
95+
clangdSuffix = 'Linux_ARMv6'; // there is no ARNv7 available/ but armv7l GNU/Linux can run ARMv6 artifacts
96+
break;
9197
case 'win32-x64':
9298
clangdExecutablePath = path.join(build, 'clangd.exe');
9399
clangFormatExecutablePath = path.join(build, 'clang-format.exe');

Diff for: electron/packager/index.js

+5-4
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@
88
const isCI = require('is-ci');
99
// Note, this will crash on PI if the available memory is less than desired heap size.
1010
// https://github.com/shelljs/shelljs/issues/1024#issuecomment-1001552543
11-
shell.env.NODE_OPTIONS = '--max_old_space_size=4096'; // Increase heap size for the CI
11+
const heapSize = Math.min(4096, require('v8').getHeapStatistics().total_physical_size / 1024).toFixed(0);
12+
shell.env.NODE_OPTIONS = `--max_old_space_size=${heapSize}`; // Increase heap size for the CI
1213
shell.env.PUPPETEER_SKIP_CHROMIUM_DOWNLOAD = 'true'; // Skip download and avoid `ERROR: Failed to download Chromium`.
1314
const template = require('./config').generateTemplate(
1415
new Date().toISOString()
@@ -266,14 +267,14 @@ ${fs.readFileSync(path('..', 'build', 'package.json')).toString()}
266267
//-----------------------------------+
267268
// Package the electron application. |
268269
//-----------------------------------+
270+
const arch = process.platform === 'linux' && process.arch === 'arm' ? ' --armv7l' : '';
269271
exec(
270-
`yarn --network-timeout 1000000 --cwd ${path('..', 'build')} package`,
272+
`yarn --network-timeout 1000000 --cwd ${path('..', 'build')} package${arch}`,
271273
`Packaging your ${productName} application`
272274
);
273275

274276
//-----------------------------------------------------------------------------------------------------+
275-
// Recalculate artifacts hash and copy to another folder (because they can change after signing them).
276-
// Azure does not support wildcard for `[email protected]` |
277+
// Recalculate artifacts hash and copy to another folder (because they can change after signing them). |
277278
//-----------------------------------------------------------------------------------------------------+
278279
if (isCI) {
279280
try {

0 commit comments

Comments
 (0)