Skip to content

Commit

Permalink
feat: build IDE2 on linux arm
Browse files Browse the repository at this point in the history
Ref: #107

Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
  • Loading branch information
Akos Kitta committed Oct 27, 2022
1 parent cd1d16f commit f262802
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
2 changes: 1 addition & 1 deletion arduino-ide-extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@
"version": "0.28.0"
},
"fwuploader": {
"version": "2.2.0"
"version": "2.2.2"
},
"clangd": {
"version": "14.0.0"
Expand Down
6 changes: 6 additions & 0 deletions arduino-ide-extension/scripts/download-ls.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,12 @@
lsSuffix = 'Linux_64bit.tar.gz';
clangdSuffix = 'Linux_64bit';
break;
case 'linux-arm':
clangdExecutablePath = path.join(build, 'clangd');
clangFormatExecutablePath = path.join(build, 'clang-format');
lsSuffix = 'Linux_ARMv7.tar.gz';
clangdSuffix = 'Linux_ARMv6'; // there is no ARNv7 available/ but armv7l GNU/Linux can run ARMv6 artifacts
break;
case 'win32-x64':
clangdExecutablePath = path.join(build, 'clangd.exe');
clangFormatExecutablePath = path.join(build, 'clang-format.exe');
Expand Down
9 changes: 5 additions & 4 deletions electron/packager/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
const isCI = require('is-ci');
// Note, this will crash on PI if the available memory is less than desired heap size.
// https://github.com/shelljs/shelljs/issues/1024#issuecomment-1001552543
shell.env.NODE_OPTIONS = '--max_old_space_size=4096'; // Increase heap size for the CI
const heapSize = Math.min(4096, require('v8').getHeapStatistics().total_physical_size / 1024).toFixed(0);
shell.env.NODE_OPTIONS = `--max_old_space_size=${heapSize}`; // Increase heap size for the CI
shell.env.PUPPETEER_SKIP_CHROMIUM_DOWNLOAD = 'true'; // Skip download and avoid `ERROR: Failed to download Chromium`.
const template = require('./config').generateTemplate(
new Date().toISOString()
Expand Down Expand Up @@ -266,14 +267,14 @@ ${fs.readFileSync(path('..', 'build', 'package.json')).toString()}
//-----------------------------------+
// Package the electron application. |
//-----------------------------------+
const arch = process.platform === 'linux' && process.arch === 'arm' ? ' --armv7l' : '';
exec(
`yarn --network-timeout 1000000 --cwd ${path('..', 'build')} package`,
`yarn --network-timeout 1000000 --cwd ${path('..', 'build')} package${arch}`,
`Packaging your ${productName} application`
);

//-----------------------------------------------------------------------------------------------------+
// Recalculate artifacts hash and copy to another folder (because they can change after signing them).
// Azure does not support wildcard for `PublishBuildArtifacts@1.pathToPublish` |
// Recalculate artifacts hash and copy to another folder (because they can change after signing them). |
//-----------------------------------------------------------------------------------------------------+
if (isCI) {
try {
Expand Down

0 comments on commit f262802

Please sign in to comment.