From 01209c776dc59e62616f01051e97ae2e3e9424c1 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 26 Mar 2025 02:00:22 -0500 Subject: [PATCH 01/22] arm64 --- arduino-ide-extension/package.json | 2 +- .../src/test/node/boards-service-impl.slow-test.ts | 1 + arduino-ide-extension/src/test/node/node-test-bindings.ts | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arduino-ide-extension/package.json b/arduino-ide-extension/package.json index 45e852988..c536375b8 100644 --- a/arduino-ide-extension/package.json +++ b/arduino-ide-extension/package.json @@ -140,7 +140,7 @@ "reporter": "spec", "colors": true, "watch-extensions": "js", - "timeout": 10000 + "timeout": 20000 }, "files": [ "lib", diff --git a/arduino-ide-extension/src/test/node/boards-service-impl.slow-test.ts b/arduino-ide-extension/src/test/node/boards-service-impl.slow-test.ts index f5b29a5bf..cd6086e64 100644 --- a/arduino-ide-extension/src/test/node/boards-service-impl.slow-test.ts +++ b/arduino-ide-extension/src/test/node/boards-service-impl.slow-test.ts @@ -35,6 +35,7 @@ describe('boards-service-impl', () => { describe('search', () => { it('should run search', async function () { + this.timeout(20_000); const result = await boardService.search({}); expect(result).is.not.empty; }); diff --git a/arduino-ide-extension/src/test/node/node-test-bindings.ts b/arduino-ide-extension/src/test/node/node-test-bindings.ts index 690d19442..cd4b29fb1 100644 --- a/arduino-ide-extension/src/test/node/node-test-bindings.ts +++ b/arduino-ide-extension/src/test/node/node-test-bindings.ts @@ -317,7 +317,7 @@ export async function startDaemon( configService.onStart(); daemon.onStart(); await Promise.all([ - waitForEvent(daemon.onDaemonStarted, 10_000), + waitForEvent(daemon.onDaemonStarted, 20_000), coreClientProvider.client, ]); if (startCustomizations) { From 75ed5cef21745f3f2c8cff56482342765f373b21 Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 26 Mar 2025 02:34:25 -0500 Subject: [PATCH 02/22] test --- arduino-ide-extension/package.json | 2 +- .../src/test/node/boards-service-impl.slow-test.ts | 1 - arduino-ide-extension/src/test/node/node-test-bindings.ts | 2 +- 3 files changed, 2 insertions(+), 3 deletions(-) diff --git a/arduino-ide-extension/package.json b/arduino-ide-extension/package.json index c536375b8..45e852988 100644 --- a/arduino-ide-extension/package.json +++ b/arduino-ide-extension/package.json @@ -140,7 +140,7 @@ "reporter": "spec", "colors": true, "watch-extensions": "js", - "timeout": 20000 + "timeout": 10000 }, "files": [ "lib", diff --git a/arduino-ide-extension/src/test/node/boards-service-impl.slow-test.ts b/arduino-ide-extension/src/test/node/boards-service-impl.slow-test.ts index cd6086e64..f5b29a5bf 100644 --- a/arduino-ide-extension/src/test/node/boards-service-impl.slow-test.ts +++ b/arduino-ide-extension/src/test/node/boards-service-impl.slow-test.ts @@ -35,7 +35,6 @@ describe('boards-service-impl', () => { describe('search', () => { it('should run search', async function () { - this.timeout(20_000); const result = await boardService.search({}); expect(result).is.not.empty; }); diff --git a/arduino-ide-extension/src/test/node/node-test-bindings.ts b/arduino-ide-extension/src/test/node/node-test-bindings.ts index cd4b29fb1..690d19442 100644 --- a/arduino-ide-extension/src/test/node/node-test-bindings.ts +++ b/arduino-ide-extension/src/test/node/node-test-bindings.ts @@ -317,7 +317,7 @@ export async function startDaemon( configService.onStart(); daemon.onStart(); await Promise.all([ - waitForEvent(daemon.onDaemonStarted, 20_000), + waitForEvent(daemon.onDaemonStarted, 10_000), coreClientProvider.client, ]); if (startCustomizations) { From 7750a3ffbc88d3d4d4a39c85b5d2491d9f2d2a6f Mon Sep 17 00:00:00 2001 From: Your Name Date: Wed, 26 Mar 2025 02:47:53 -0500 Subject: [PATCH 03/22] arm64 --- arduino-ide-extension/package.json | 2 +- .../src/test/node/boards-service-impl.slow-test.ts | 1 + arduino-ide-extension/src/test/node/node-test-bindings.ts | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/arduino-ide-extension/package.json b/arduino-ide-extension/package.json index 45e852988..c536375b8 100644 --- a/arduino-ide-extension/package.json +++ b/arduino-ide-extension/package.json @@ -140,7 +140,7 @@ "reporter": "spec", "colors": true, "watch-extensions": "js", - "timeout": 10000 + "timeout": 20000 }, "files": [ "lib", diff --git a/arduino-ide-extension/src/test/node/boards-service-impl.slow-test.ts b/arduino-ide-extension/src/test/node/boards-service-impl.slow-test.ts index f5b29a5bf..cd6086e64 100644 --- a/arduino-ide-extension/src/test/node/boards-service-impl.slow-test.ts +++ b/arduino-ide-extension/src/test/node/boards-service-impl.slow-test.ts @@ -35,6 +35,7 @@ describe('boards-service-impl', () => { describe('search', () => { it('should run search', async function () { + this.timeout(20_000); const result = await boardService.search({}); expect(result).is.not.empty; }); diff --git a/arduino-ide-extension/src/test/node/node-test-bindings.ts b/arduino-ide-extension/src/test/node/node-test-bindings.ts index 690d19442..cd4b29fb1 100644 --- a/arduino-ide-extension/src/test/node/node-test-bindings.ts +++ b/arduino-ide-extension/src/test/node/node-test-bindings.ts @@ -317,7 +317,7 @@ export async function startDaemon( configService.onStart(); daemon.onStart(); await Promise.all([ - waitForEvent(daemon.onDaemonStarted, 10_000), + waitForEvent(daemon.onDaemonStarted, 20_000), coreClientProvider.client, ]); if (startCustomizations) { From ea0ac8dd08f5108a1341e26d92d8847ba69d7d97 Mon Sep 17 00:00:00 2001 From: {your_name} <{your_email}> Date: Wed, 26 Mar 2025 03:41:23 -0500 Subject: [PATCH 04/22] test --- .github/workflows/buildarm.yml | 130 +++++++++++++++++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 .github/workflows/buildarm.yml diff --git a/.github/workflows/buildarm.yml b/.github/workflows/buildarm.yml new file mode 100644 index 000000000..d130ac657 --- /dev/null +++ b/.github/workflows/buildarm.yml @@ -0,0 +1,130 @@ +name: Arduino IDE ARM64 + +on: + push: + branches: + - main + - '[0-9]+.[0-9]+.x' + paths-ignore: + - '.github/**' + - '!.github/workflows/buildarm.yml' + - '.vscode/**' + - 'docs/**' + - 'scripts/**' + - '!scripts/merge-channel-files.js' + - 'static/**' + - '*.md' + tags: + - '[0-9]+.[0-9]+.[0-9]+*' + workflow_dispatch: + inputs: + paid-runners: + description: Include builds on non-free runners + type: boolean + default: false + pull_request: + paths-ignore: + - '.github/**' + - '!.github/workflows/buildarm.yml' + - '.vscode/**' + - 'docs/**' + - 'scripts/**' + - '!scripts/merge-channel-files.js' + - 'static/**' + - '*.md' + +env: + GO_VERSION: '1.21' + NODE_VERSION: '18.17' + YARN_VERSION: '1.22' + JOB_TRANSFER_ARTIFACT_PREFIX: buildarm-artifacts- + BASE_BUILD_DATA: | + - config: + name: Linux ARM64 + runs-on: [self-hosted, arm64-runner] + container: | + null + job-transfer-artifact-suffix: Linux_arm64 + mergeable-channel-file: 'false' + artifacts: + - path: '*Linux_arm64.zip' + name: Linux_ARM64_zip + - path: '*Linux_arm64.AppImage' + name: Linux_ARM64_app_image + +jobs: + run-determination: + runs-on: ubuntu-latest + outputs: + result: ${{ steps.determination.outputs.result }} + permissions: {} + steps: + - name: Determine if the rest of the workflow should run + id: determination + run: | + RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x" + if [[ + "${{ github.event_name }}" != "create" || + "${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX + ]]; then + RESULT="true" + else + RESULT="false" + fi + echo "result=$RESULT" >> $GITHUB_OUTPUT + + build: + name: build (${{ matrix.config.name }}) + needs: run-determination + env: + BUILD_ARTIFACTS_PATH: electron-app/dist/build-artifacts + strategy: + matrix: + config: ${{ fromJson(env.BASE_BUILD_DATA) }} + runs-on: ${{ matrix.config.runs-on }} + container: ${{ fromJSON(matrix.config.container) }} + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Install Node.js + uses: actions/setup-node@v4 + with: + node-version: ${{ env.NODE_VERSION }} + registry-url: 'https://registry.npmjs.org' + + - name: Install Yarn + run: | + npm install --global "yarn@${{ env.YARN_VERSION }}" + + - name: Install Python 3.x + uses: actions/setup-python@v5 + with: + python-version: '3.11.x' + + - name: Install Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GO_VERSION }} + + - name: Install Taskfile + uses: arduino/setup-task@v2 + with: + repo-token: ${{ secrets.GITHUB_TOKEN }} + version: 3.x + + - name: Package + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + yarn install + yarn --cwd arduino-ide-extension build + yarn --cwd electron-app rebuild + yarn --cwd electron-app build + yarn --cwd electron-app package + + - name: Upload builds to job transfer artifact + uses: actions/upload-artifact@v4 + with: + name: ${{ env.JOB_TRANSFER_ARTIFACT_PREFIX }}${{ matrix.config.job-transfer-artifact-suffix }} + path: ${{ env.BUILD_ARTIFACTS_PATH }} From c54b34ffc6d61a91d1d4ff90c94405da7c837be6 Mon Sep 17 00:00:00 2001 From: {your_name} <{your_email}> Date: Wed, 26 Mar 2025 03:57:45 -0500 Subject: [PATCH 05/22] test --- .github/workflows/buildarm.yml | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/.github/workflows/buildarm.yml b/.github/workflows/buildarm.yml index d130ac657..c46ece046 100644 --- a/.github/workflows/buildarm.yml +++ b/.github/workflows/buildarm.yml @@ -38,19 +38,6 @@ env: NODE_VERSION: '18.17' YARN_VERSION: '1.22' JOB_TRANSFER_ARTIFACT_PREFIX: buildarm-artifacts- - BASE_BUILD_DATA: | - - config: - name: Linux ARM64 - runs-on: [self-hosted, arm64-runner] - container: | - null - job-transfer-artifact-suffix: Linux_arm64 - mergeable-channel-file: 'false' - artifacts: - - path: '*Linux_arm64.zip' - name: Linux_ARM64_zip - - path: '*Linux_arm64.AppImage' - name: Linux_ARM64_app_image jobs: run-determination: @@ -80,7 +67,18 @@ jobs: BUILD_ARTIFACTS_PATH: electron-app/dist/build-artifacts strategy: matrix: - config: ${{ fromJson(env.BASE_BUILD_DATA) }} + config: + - name: Linux ARM64 + runs-on: [self-hosted, arm64-runner] + container: | + null + job-transfer-artifact-suffix: Linux_arm64 + mergeable-channel-file: 'false' + artifacts: + - path: '*Linux_arm64.zip' + name: Linux_ARM64_zip + - path: '*Linux_arm64.AppImage' + name: Linux_ARM64_app_image runs-on: ${{ matrix.config.runs-on }} container: ${{ fromJSON(matrix.config.container) }} steps: From c2eaad194b3b8d18c0562c059a252087433aab9f Mon Sep 17 00:00:00 2001 From: {your_name} <{your_email}> Date: Wed, 26 Mar 2025 04:14:42 -0500 Subject: [PATCH 06/22] test2 --- .github/workflows/buildarm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/buildarm.yml b/.github/workflows/buildarm.yml index c46ece046..6e456bec7 100644 --- a/.github/workflows/buildarm.yml +++ b/.github/workflows/buildarm.yml @@ -69,7 +69,7 @@ jobs: matrix: config: - name: Linux ARM64 - runs-on: [self-hosted, arm64-runner] + runs-on: [self-hosted, ARM64] container: | null job-transfer-artifact-suffix: Linux_arm64 From 0db41f86db79d096b4bea1b204003f5b47c198d7 Mon Sep 17 00:00:00 2001 From: {your_name} <{your_email}> Date: Wed, 26 Mar 2025 04:42:55 -0500 Subject: [PATCH 07/22] test3 --- .github/workflows/buildarm.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/buildarm.yml b/.github/workflows/buildarm.yml index 6e456bec7..dad88ea75 100644 --- a/.github/workflows/buildarm.yml +++ b/.github/workflows/buildarm.yml @@ -98,7 +98,7 @@ jobs: - name: Install Python 3.x uses: actions/setup-python@v5 with: - python-version: '3.11.x' + python-version: '3.x' - name: Install Go uses: actions/setup-go@v5 From 188f596916d4aab63db3927c214c88881323cd6b Mon Sep 17 00:00:00 2001 From: {your_name} <{your_email}> Date: Wed, 26 Mar 2025 05:00:26 -0500 Subject: [PATCH 08/22] test4 --- .github/workflows/buildarm.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/buildarm.yml b/.github/workflows/buildarm.yml index dad88ea75..77aaccc91 100644 --- a/.github/workflows/buildarm.yml +++ b/.github/workflows/buildarm.yml @@ -85,6 +85,11 @@ jobs: - name: Checkout uses: actions/checkout@v4 + - name: Install Chromium + run: | + sudo apt-get update + sudo apt-get install -y chromium-browser + - name: Install Node.js uses: actions/setup-node@v4 with: @@ -111,10 +116,15 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} version: 3.x + - name: Set Chromium executable path for Puppeteer + run: | + export PUPPETEER_EXECUTABLE_PATH=$(which chromium-browser) + - name: Package env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | + export PUPPETEER_SKIP_DOWNLOAD=true yarn install yarn --cwd arduino-ide-extension build yarn --cwd electron-app rebuild From ff9c109d2a682354c3cc50444507207f4f953a35 Mon Sep 17 00:00:00 2001 From: {your_name} <{your_email}> Date: Wed, 26 Mar 2025 05:04:39 -0500 Subject: [PATCH 09/22] test5 --- self_hosted_runner.patch | 91 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 91 insertions(+) create mode 100644 self_hosted_runner.patch diff --git a/self_hosted_runner.patch b/self_hosted_runner.patch new file mode 100644 index 000000000..50c9d8a7a --- /dev/null +++ b/self_hosted_runner.patch @@ -0,0 +1,91 @@ +diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml +index 1c830648..ab6ac95a 100644 +--- a/.github/workflows/build.yml ++++ b/.github/workflows/build.yml +@@ -67,17 +67,18 @@ jobs: + strategy: + matrix: + config: +- - os: windows-2019 +- certificate-secret: WINDOWS_SIGNING_CERTIFICATE_PFX # Name of the secret that contains the certificate. +- certificate-password-secret: WINDOWS_SIGNING_CERTIFICATE_PASSWORD # Name of the secret that contains the certificate password. +- certificate-extension: pfx # File extension for the certificate. +- - os: ubuntu-20.04 +- - os: macos-latest +- # APPLE_SIGNING_CERTIFICATE_P12 secret was produced by following the procedure from: +- # https://www.kencochrane.com/2020/08/01/build-and-sign-golang-binaries-for-macos-with-github-actions/#exporting-the-developer-certificate +- certificate-secret: APPLE_SIGNING_CERTIFICATE_P12 +- certificate-password-secret: KEYCHAIN_PASSWORD +- certificate-extension: p12 ++# - os: windows-2019 ++# certificate-secret: WINDOWS_SIGNING_CERTIFICATE_PFX # Name of the secret that contains the certificate. ++# certificate-password-secret: WINDOWS_SIGNING_CERTIFICATE_PASSWORD # Name of the secret that contains the certificate password. ++# certificate-extension: pfx # File extension for the certificate. ++# - os: ubuntu-20.04 ++# - os: macos-latest ++# # APPLE_SIGNING_CERTIFICATE_P12 secret was produced by following the procedure from: ++# # https://www.kencochrane.com/2020/08/01/build-and-sign-golang-binaries-for-macos-with-github-actions/#exporting-the-developer-certificate ++# certificate-secret: APPLE_SIGNING_CERTIFICATE_P12 ++# certificate-password-secret: KEYCHAIN_PASSWORD ++# certificate-extension: p12 ++ - os: self-hosted + runs-on: ${{ matrix.config.os }} + timeout-minutes: 90 + +@@ -93,6 +94,7 @@ jobs: + cache: 'yarn' + + - name: Install Python 3.x ++ if: matrix.config.os != 'self-hosted' + uses: actions/setup-python@v4 + with: + python-version: '3.x' +@@ -166,6 +168,10 @@ jobs: + name: Linux_X86-64_zip + - path: '*Linux_64bit.AppImage' + name: Linux_X86-64_app_image ++ - path: '*Linux_arm64.zip' ++ name: Linux_arm64_zip ++ - path: '*Linux_arm64.AppImage' ++ name: Linux_arm64_app_image + - path: '*macOS_64bit.dmg' + name: macOS_dmg + - path: '*macOS_64bit.zip' +diff --git a/arduino-ide-extension/src/test/node/boards-service-impl.slow-test.ts b/arduino-ide-extension/src/test/node/boards-service-impl.slow-test.ts +index fbd5aeb4..a3b865bb 100644 +--- a/arduino-ide-extension/src/test/node/boards-service-impl.slow-test.ts ++++ b/arduino-ide-extension/src/test/node/boards-service-impl.slow-test.ts +@@ -20,6 +20,7 @@ describe('boards-service-impl', () => { + + describe('search', () => { + it('should run search', async function () { ++ this.timeout(20_000); + const result = await boardService.search({}); + expect(result).is.not.empty; + }); +diff --git a/arduino-ide-extension/src/test/node/node-test-bindings.ts b/arduino-ide-extension/src/test/node/node-test-bindings.ts +index 2b4c651f..c61b00f5 100644 +--- a/arduino-ide-extension/src/test/node/node-test-bindings.ts ++++ b/arduino-ide-extension/src/test/node/node-test-bindings.ts +@@ -318,7 +318,7 @@ export async function startDaemon( + configService.onStart(); + daemon.onStart(); + await Promise.all([ +- waitForEvent(daemon.onDaemonStarted, 10_000), ++ waitForEvent(daemon.onDaemonStarted, 20_000), + coreClientProvider.client, + ]); + if (startCustomizations) { +diff --git a/arduino-ide-extension/package.json b/arduino-ide-extension/package.json +index eccac3c5..d30a39e3 100644 +--- a/arduino-ide-extension/package.json ++++ b/arduino-ide-extension/package.json +@@ -140,7 +140,7 @@ + "reporter": "spec", + "colors": true, + "watch-extensions": "js", +- "timeout": 10000 ++ "timeout": 20000 + }, + "files": [ + "lib", From 499b7ce38e5d6d2cf066b1f3ba82d85d0694cf4d Mon Sep 17 00:00:00 2001 From: {your_name} <{your_email}> Date: Wed, 26 Mar 2025 05:08:36 -0500 Subject: [PATCH 10/22] test6 --- .github/workflows/buildarm.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/buildarm.yml b/.github/workflows/buildarm.yml index 77aaccc91..a3a3e9ea4 100644 --- a/.github/workflows/buildarm.yml +++ b/.github/workflows/buildarm.yml @@ -104,6 +104,11 @@ jobs: uses: actions/setup-python@v5 with: python-version: '3.x' + - name: Install Python 3 Distutils + run: | + sudo apt-get update + sudo apt-get install -y python3-distutils + - name: Install Go uses: actions/setup-go@v5 From dae1b8d34f832e897d0601429722419abee202b8 Mon Sep 17 00:00:00 2001 From: {your_name} <{your_email}> Date: Wed, 26 Mar 2025 05:13:07 -0500 Subject: [PATCH 11/22] test7 --- .github/workflows/buildarm.yml | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/.github/workflows/buildarm.yml b/.github/workflows/buildarm.yml index a3a3e9ea4..d1f87f917 100644 --- a/.github/workflows/buildarm.yml +++ b/.github/workflows/buildarm.yml @@ -85,10 +85,10 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Install Chromium + - name: Install System Dependencies run: | sudo apt-get update - sudo apt-get install -y chromium-browser + sudo apt-get install -y chromium-browser python3-distutils build-essential libssl-dev - name: Install Node.js uses: actions/setup-node@v4 @@ -104,11 +104,6 @@ jobs: uses: actions/setup-python@v5 with: python-version: '3.x' - - name: Install Python 3 Distutils - run: | - sudo apt-get update - sudo apt-get install -y python3-distutils - - name: Install Go uses: actions/setup-go@v5 @@ -123,14 +118,14 @@ jobs: - name: Set Chromium executable path for Puppeteer run: | - export PUPPETEER_EXECUTABLE_PATH=$(which chromium-browser) + echo "PUPPETEER_EXECUTABLE_PATH=$(which chromium-browser)" >> $GITHUB_ENV - - name: Package + - name: Install Dependencies & Build env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | export PUPPETEER_SKIP_DOWNLOAD=true - yarn install + yarn install --check-files yarn --cwd arduino-ide-extension build yarn --cwd electron-app rebuild yarn --cwd electron-app build From fd5854b13d82956104126877874b00c7b1e3be2b Mon Sep 17 00:00:00 2001 From: neochaos42 <125705606+neochaos42@users.noreply.github.com> Date: Wed, 26 Mar 2025 05:16:09 -0500 Subject: [PATCH 12/22] Update buildarm.yml --- .github/workflows/buildarm.yml | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/buildarm.yml b/.github/workflows/buildarm.yml index d1f87f917..3a059d110 100644 --- a/.github/workflows/buildarm.yml +++ b/.github/workflows/buildarm.yml @@ -63,6 +63,7 @@ jobs: build: name: build (${{ matrix.config.name }}) needs: run-determination + if: needs.run-determination.outputs.result == 'true' env: BUILD_ARTIFACTS_PATH: electron-app/dist/build-artifacts strategy: @@ -82,13 +83,13 @@ jobs: runs-on: ${{ matrix.config.runs-on }} container: ${{ fromJSON(matrix.config.container) }} steps: - - name: Checkout + - name: Checkout Repository uses: actions/checkout@v4 - - name: Install System Dependencies + - name: Install Dependencies run: | sudo apt-get update - sudo apt-get install -y chromium-browser python3-distutils build-essential libssl-dev + sudo apt-get install -y chromium-browser python3-distutils python3-pip build-essential libssl-dev - name: Install Node.js uses: actions/setup-node@v4 @@ -116,22 +117,28 @@ jobs: repo-token: ${{ secrets.GITHUB_TOKEN }} version: 3.x - - name: Set Chromium executable path for Puppeteer + - name: Set Chromium Executable Path for Puppeteer run: | echo "PUPPETEER_EXECUTABLE_PATH=$(which chromium-browser)" >> $GITHUB_ENV - - name: Install Dependencies & Build - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Install Project Dependencies run: | export PUPPETEER_SKIP_DOWNLOAD=true - yarn install --check-files + yarn install --frozen-lockfile --check-files + + - name: Fix Potential Node-Gyp Issues + run: | + npm rebuild node-gyp + yarn rebuild + + - name: Build Project + run: | yarn --cwd arduino-ide-extension build yarn --cwd electron-app rebuild yarn --cwd electron-app build yarn --cwd electron-app package - - name: Upload builds to job transfer artifact + - name: Upload Builds to Job Transfer Artifact uses: actions/upload-artifact@v4 with: name: ${{ env.JOB_TRANSFER_ARTIFACT_PREFIX }}${{ matrix.config.job-transfer-artifact-suffix }} From ab8d2947a7ccfa8931da6efba92a8fa39c89a518 Mon Sep 17 00:00:00 2001 From: {your_name} <{your_email}> Date: Wed, 26 Mar 2025 05:21:17 -0500 Subject: [PATCH 13/22] test --- .github/workflows/buildarm.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/buildarm.yml b/.github/workflows/buildarm.yml index d1f87f917..c1cbb94bc 100644 --- a/.github/workflows/buildarm.yml +++ b/.github/workflows/buildarm.yml @@ -88,7 +88,11 @@ jobs: - name: Install System Dependencies run: | sudo apt-get update - sudo apt-get install -y chromium-browser python3-distutils build-essential libssl-dev + sudo apt-get install -y chromium-browser python3-distutils build-essential libssl-dev make gcc g++ + + - name: Configure Python for node-gyp + run: | + sudo npm config set python $(which python3) - name: Install Node.js uses: actions/setup-node@v4 From 33355751e8b8c5a545c1b2783d3131ed049b1bed Mon Sep 17 00:00:00 2001 From: neochaos42 <125705606+neochaos42@users.noreply.github.com> Date: Wed, 26 Mar 2025 05:23:35 -0500 Subject: [PATCH 14/22] Update buildarm.yml --- .github/workflows/buildarm.yml | 4 ---- 1 file changed, 4 deletions(-) diff --git a/.github/workflows/buildarm.yml b/.github/workflows/buildarm.yml index 40d3b8d6a..4cda51d29 100644 --- a/.github/workflows/buildarm.yml +++ b/.github/workflows/buildarm.yml @@ -89,15 +89,11 @@ jobs: - name: Install Dependencies run: | sudo apt-get update -<<<<<<< HEAD sudo apt-get install -y chromium-browser python3-distutils build-essential libssl-dev make gcc g++ - name: Configure Python for node-gyp run: | sudo npm config set python $(which python3) -======= - sudo apt-get install -y chromium-browser python3-distutils python3-pip build-essential libssl-dev ->>>>>>> fd5854b13d82956104126877874b00c7b1e3be2b - name: Install Node.js uses: actions/setup-node@v4 From caa8f5d5a81315d7f3c7d181e25bf4e21ed584fd Mon Sep 17 00:00:00 2001 From: {your_name} <{your_email}> Date: Wed, 26 Mar 2025 22:18:02 -0500 Subject: [PATCH 15/22] test again --- .github/workflows/build.yml | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5bb25811a..ffa453c51 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,7 +9,7 @@ on: paths-ignore: - '.github/**' - '!.github/workflows/build.yml' - - '.vscode/**' + - '.vscode/**'' - 'docs/**' - 'scripts/**' - '!scripts/merge-channel-files.js' @@ -133,6 +133,16 @@ env: name: macOS_arm64_dmg - path: '*macOS_arm64.zip' name: macOS_arm64_zip + - config: + name: ARM Ubuntu 22.04 + runs-on: ubuntu-22.04-arm64 + container: | + null + job-transfer-artifact-suffix: ARM_64bit + mergeable-channel-file: 'false' + artifacts: + - path: '*ARM_64bit.tar.gz' + name: ARM_64bit_tarball PAID_RUNNER_BUILD_DATA: | # This system was implemented to allow selective use of paid GitHub-hosted runners, due to the Apple Silicon runner # incurring a charge at that time. Free Apple Silicon runners are now available so the configuration was moved to @@ -289,8 +299,7 @@ jobs: # to skip passing signing credentials to electron-builder IS_WINDOWS_CONFIG: ${{ matrix.config.name == 'Windows' }} INSTALLER_CERT_WINDOWS_CER: "/tmp/cert.cer" - # We are hardcoding the path for signtool because is not present on the windows PATH env var by default. - # Keep in mind that this path could change when upgrading to a new runner version + # We are hardcoding the path for signtool because it is not present on the Windows PATH env var by default. SIGNTOOL_PATH: "C:/Program Files (x86)/Windows Kits/10/bin/10.0.19041.0/x86/signtool.exe" WIN_CERT_PASSWORD: ${{ secrets[matrix.config.certificate-password-secret] }} WIN_CERT_CONTAINER_NAME: ${{ secrets[matrix.config.certificate-container] }} @@ -308,6 +317,10 @@ jobs: timeout-minutes: 90 steps: + - name: Install Chromium (ARM only) + if: matrix.config.name == 'ARM Ubuntu 22.04' + run: sudo apt-get update && sudo apt-get install -y chromium-browser + - name: Symlink custom working directory shell: cmd if: runner.os == 'Windows' && matrix.config.working-directory @@ -317,15 +330,12 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Install Node.js if: runner.name != 'WINDOWS-SIGN-PC' uses: actions/setup-node@v4 with: node-version: ${{ env.NODE_VERSION }} registry-url: 'https://registry.npmjs.org' - # Yarn is a prerequisite for the action's cache feature, so caching should be disabled when running in the - # container where Yarn is not pre-installed. cache: ${{ fromJSON(matrix.config.container) == null && 'yarn' || null }} - name: Install Yarn From 947812cd1651f267ba451135d91a6fc387df3b01 Mon Sep 17 00:00:00 2001 From: {your_name} <{your_email}> Date: Wed, 26 Mar 2025 22:19:20 -0500 Subject: [PATCH 16/22] test yet again --- .github/workflows/build.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index ffa453c51..f3753d1d1 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -9,14 +9,12 @@ on: paths-ignore: - '.github/**' - '!.github/workflows/build.yml' - - '.vscode/**'' + - '.vscode/**' - 'docs/**' - 'scripts/**' - '!scripts/merge-channel-files.js' - 'static/**' - '*.md' - tags: - - '[0-9]+.[0-9]+.[0-9]+*' workflow_dispatch: inputs: paid-runners: From 2dd78d168e54f1044dae1fc6dd0bf752c3f75ef6 Mon Sep 17 00:00:00 2001 From: {your_name} <{your_email}> Date: Wed, 26 Mar 2025 22:24:18 -0500 Subject: [PATCH 17/22] test more --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f3753d1d1..25271029f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -133,7 +133,7 @@ env: name: macOS_arm64_zip - config: name: ARM Ubuntu 22.04 - runs-on: ubuntu-22.04-arm64 + runs-on: ubuntu-22.04-arm container: | null job-transfer-artifact-suffix: ARM_64bit From 2c5905ae9ac2b1ab2fb57dd215fd0fb541244433 Mon Sep 17 00:00:00 2001 From: neochaos42 <125705606+neochaos42@users.noreply.github.com> Date: Wed, 26 Mar 2025 23:08:11 -0500 Subject: [PATCH 18/22] Delete .github/workflows/build.yml.rej --- .github/workflows/build.yml.rej | 51 --------------------------------- 1 file changed, 51 deletions(-) delete mode 100644 .github/workflows/build.yml.rej diff --git a/.github/workflows/build.yml.rej b/.github/workflows/build.yml.rej deleted file mode 100644 index a0f7586a2..000000000 --- a/.github/workflows/build.yml.rej +++ /dev/null @@ -1,51 +0,0 @@ ---- .github/workflows/build.yml -+++ .github/workflows/build.yml -@@ -67,17 +67,18 @@ jobs: - strategy: - matrix: - config: -- - os: windows-2019 -- certificate-secret: WINDOWS_SIGNING_CERTIFICATE_PFX # Name of the secret that contains the certificate. -- certificate-password-secret: WINDOWS_SIGNING_CERTIFICATE_PASSWORD # Name of the secret that contains the certificate password. -- certificate-extension: pfx # File extension for the certificate. -- - os: ubuntu-20.04 -- - os: macos-latest -- # APPLE_SIGNING_CERTIFICATE_P12 secret was produced by following the procedure from: -- # https://www.kencochrane.com/2020/08/01/build-and-sign-golang-binaries-for-macos-with-github-actions/#exporting-the-developer-certificate -- certificate-secret: APPLE_SIGNING_CERTIFICATE_P12 -- certificate-password-secret: KEYCHAIN_PASSWORD -- certificate-extension: p12 -+# - os: windows-2019 -+# certificate-secret: WINDOWS_SIGNING_CERTIFICATE_PFX # Name of the secret that contains the certificate. -+# certificate-password-secret: WINDOWS_SIGNING_CERTIFICATE_PASSWORD # Name of the secret that contains the certificate password. -+# certificate-extension: pfx # File extension for the certificate. -+# - os: ubuntu-20.04 -+# - os: macos-latest -+# # APPLE_SIGNING_CERTIFICATE_P12 secret was produced by following the procedure from: -+# # https://www.kencochrane.com/2020/08/01/build-and-sign-golang-binaries-for-macos-with-github-actions/#exporting-the-developer-certificate -+# certificate-secret: APPLE_SIGNING_CERTIFICATE_P12 -+# certificate-password-secret: KEYCHAIN_PASSWORD -+# certificate-extension: p12 -+ - os: self-hosted - runs-on: ${{ matrix.config.os }} - timeout-minutes: 90 - -@@ -93,6 +94,7 @@ jobs: - cache: 'yarn' - - - name: Install Python 3.x -+ if: matrix.config.os != 'self-hosted' - uses: actions/setup-python@v4 - with: - python-version: '3.x' -@@ -166,6 +168,10 @@ jobs: - name: Linux_X86-64_zip - - path: '*Linux_64bit.AppImage' - name: Linux_X86-64_app_image -+ - path: '*Linux_arm64.zip' -+ name: Linux_arm64_zip -+ - path: '*Linux_arm64.AppImage' -+ name: Linux_arm64_app_image - - path: '*macOS_64bit.dmg' - name: macOS_dmg - - path: '*macOS_64bit.zip' From 176c7481b24e04696edf1bf1ecc843f7b05388e7 Mon Sep 17 00:00:00 2001 From: neochaos42 <125705606+neochaos42@users.noreply.github.com> Date: Wed, 26 Mar 2025 23:08:23 -0500 Subject: [PATCH 19/22] Delete .github/workflows/buildarm.yml --- .github/workflows/buildarm.yml | 149 --------------------------------- 1 file changed, 149 deletions(-) delete mode 100644 .github/workflows/buildarm.yml diff --git a/.github/workflows/buildarm.yml b/.github/workflows/buildarm.yml deleted file mode 100644 index 4cda51d29..000000000 --- a/.github/workflows/buildarm.yml +++ /dev/null @@ -1,149 +0,0 @@ -name: Arduino IDE ARM64 - -on: - push: - branches: - - main - - '[0-9]+.[0-9]+.x' - paths-ignore: - - '.github/**' - - '!.github/workflows/buildarm.yml' - - '.vscode/**' - - 'docs/**' - - 'scripts/**' - - '!scripts/merge-channel-files.js' - - 'static/**' - - '*.md' - tags: - - '[0-9]+.[0-9]+.[0-9]+*' - workflow_dispatch: - inputs: - paid-runners: - description: Include builds on non-free runners - type: boolean - default: false - pull_request: - paths-ignore: - - '.github/**' - - '!.github/workflows/buildarm.yml' - - '.vscode/**' - - 'docs/**' - - 'scripts/**' - - '!scripts/merge-channel-files.js' - - 'static/**' - - '*.md' - -env: - GO_VERSION: '1.21' - NODE_VERSION: '18.17' - YARN_VERSION: '1.22' - JOB_TRANSFER_ARTIFACT_PREFIX: buildarm-artifacts- - -jobs: - run-determination: - runs-on: ubuntu-latest - outputs: - result: ${{ steps.determination.outputs.result }} - permissions: {} - steps: - - name: Determine if the rest of the workflow should run - id: determination - run: | - RELEASE_BRANCH_REGEX="refs/heads/[0-9]+.[0-9]+.x" - if [[ - "${{ github.event_name }}" != "create" || - "${{ github.ref }}" =~ $RELEASE_BRANCH_REGEX - ]]; then - RESULT="true" - else - RESULT="false" - fi - echo "result=$RESULT" >> $GITHUB_OUTPUT - - build: - name: build (${{ matrix.config.name }}) - needs: run-determination - if: needs.run-determination.outputs.result == 'true' - env: - BUILD_ARTIFACTS_PATH: electron-app/dist/build-artifacts - strategy: - matrix: - config: - - name: Linux ARM64 - runs-on: [self-hosted, ARM64] - container: | - null - job-transfer-artifact-suffix: Linux_arm64 - mergeable-channel-file: 'false' - artifacts: - - path: '*Linux_arm64.zip' - name: Linux_ARM64_zip - - path: '*Linux_arm64.AppImage' - name: Linux_ARM64_app_image - runs-on: ${{ matrix.config.runs-on }} - container: ${{ fromJSON(matrix.config.container) }} - steps: - - name: Checkout Repository - uses: actions/checkout@v4 - - - name: Install Dependencies - run: | - sudo apt-get update - sudo apt-get install -y chromium-browser python3-distutils build-essential libssl-dev make gcc g++ - - - name: Configure Python for node-gyp - run: | - sudo npm config set python $(which python3) - - - name: Install Node.js - uses: actions/setup-node@v4 - with: - node-version: ${{ env.NODE_VERSION }} - registry-url: 'https://registry.npmjs.org' - - - name: Install Yarn - run: | - npm install --global "yarn@${{ env.YARN_VERSION }}" - - - name: Install Python 3.x - uses: actions/setup-python@v5 - with: - python-version: '3.x' - - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: ${{ env.GO_VERSION }} - - - name: Install Taskfile - uses: arduino/setup-task@v2 - with: - repo-token: ${{ secrets.GITHUB_TOKEN }} - version: 3.x - - - name: Set Chromium Executable Path for Puppeteer - run: | - echo "PUPPETEER_EXECUTABLE_PATH=$(which chromium-browser)" >> $GITHUB_ENV - - - name: Install Project Dependencies - run: | - export PUPPETEER_SKIP_DOWNLOAD=true - yarn install --frozen-lockfile --check-files - - - name: Fix Potential Node-Gyp Issues - run: | - npm rebuild node-gyp - yarn rebuild - - - name: Build Project - run: | - yarn --cwd arduino-ide-extension build - yarn --cwd electron-app rebuild - yarn --cwd electron-app build - yarn --cwd electron-app package - - - name: Upload Builds to Job Transfer Artifact - uses: actions/upload-artifact@v4 - with: - name: ${{ env.JOB_TRANSFER_ARTIFACT_PREFIX }}${{ matrix.config.job-transfer-artifact-suffix }} - path: ${{ env.BUILD_ARTIFACTS_PATH }} From d0e172887f49e3b5190a977265464ca5555bb6b0 Mon Sep 17 00:00:00 2001 From: neochaos42 <125705606+neochaos42@users.noreply.github.com> Date: Wed, 26 Mar 2025 23:20:39 -0500 Subject: [PATCH 20/22] Delete self_hosted_runner.patch --- self_hosted_runner.patch | 91 ---------------------------------------- 1 file changed, 91 deletions(-) delete mode 100644 self_hosted_runner.patch diff --git a/self_hosted_runner.patch b/self_hosted_runner.patch deleted file mode 100644 index 50c9d8a7a..000000000 --- a/self_hosted_runner.patch +++ /dev/null @@ -1,91 +0,0 @@ -diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml -index 1c830648..ab6ac95a 100644 ---- a/.github/workflows/build.yml -+++ b/.github/workflows/build.yml -@@ -67,17 +67,18 @@ jobs: - strategy: - matrix: - config: -- - os: windows-2019 -- certificate-secret: WINDOWS_SIGNING_CERTIFICATE_PFX # Name of the secret that contains the certificate. -- certificate-password-secret: WINDOWS_SIGNING_CERTIFICATE_PASSWORD # Name of the secret that contains the certificate password. -- certificate-extension: pfx # File extension for the certificate. -- - os: ubuntu-20.04 -- - os: macos-latest -- # APPLE_SIGNING_CERTIFICATE_P12 secret was produced by following the procedure from: -- # https://www.kencochrane.com/2020/08/01/build-and-sign-golang-binaries-for-macos-with-github-actions/#exporting-the-developer-certificate -- certificate-secret: APPLE_SIGNING_CERTIFICATE_P12 -- certificate-password-secret: KEYCHAIN_PASSWORD -- certificate-extension: p12 -+# - os: windows-2019 -+# certificate-secret: WINDOWS_SIGNING_CERTIFICATE_PFX # Name of the secret that contains the certificate. -+# certificate-password-secret: WINDOWS_SIGNING_CERTIFICATE_PASSWORD # Name of the secret that contains the certificate password. -+# certificate-extension: pfx # File extension for the certificate. -+# - os: ubuntu-20.04 -+# - os: macos-latest -+# # APPLE_SIGNING_CERTIFICATE_P12 secret was produced by following the procedure from: -+# # https://www.kencochrane.com/2020/08/01/build-and-sign-golang-binaries-for-macos-with-github-actions/#exporting-the-developer-certificate -+# certificate-secret: APPLE_SIGNING_CERTIFICATE_P12 -+# certificate-password-secret: KEYCHAIN_PASSWORD -+# certificate-extension: p12 -+ - os: self-hosted - runs-on: ${{ matrix.config.os }} - timeout-minutes: 90 - -@@ -93,6 +94,7 @@ jobs: - cache: 'yarn' - - - name: Install Python 3.x -+ if: matrix.config.os != 'self-hosted' - uses: actions/setup-python@v4 - with: - python-version: '3.x' -@@ -166,6 +168,10 @@ jobs: - name: Linux_X86-64_zip - - path: '*Linux_64bit.AppImage' - name: Linux_X86-64_app_image -+ - path: '*Linux_arm64.zip' -+ name: Linux_arm64_zip -+ - path: '*Linux_arm64.AppImage' -+ name: Linux_arm64_app_image - - path: '*macOS_64bit.dmg' - name: macOS_dmg - - path: '*macOS_64bit.zip' -diff --git a/arduino-ide-extension/src/test/node/boards-service-impl.slow-test.ts b/arduino-ide-extension/src/test/node/boards-service-impl.slow-test.ts -index fbd5aeb4..a3b865bb 100644 ---- a/arduino-ide-extension/src/test/node/boards-service-impl.slow-test.ts -+++ b/arduino-ide-extension/src/test/node/boards-service-impl.slow-test.ts -@@ -20,6 +20,7 @@ describe('boards-service-impl', () => { - - describe('search', () => { - it('should run search', async function () { -+ this.timeout(20_000); - const result = await boardService.search({}); - expect(result).is.not.empty; - }); -diff --git a/arduino-ide-extension/src/test/node/node-test-bindings.ts b/arduino-ide-extension/src/test/node/node-test-bindings.ts -index 2b4c651f..c61b00f5 100644 ---- a/arduino-ide-extension/src/test/node/node-test-bindings.ts -+++ b/arduino-ide-extension/src/test/node/node-test-bindings.ts -@@ -318,7 +318,7 @@ export async function startDaemon( - configService.onStart(); - daemon.onStart(); - await Promise.all([ -- waitForEvent(daemon.onDaemonStarted, 10_000), -+ waitForEvent(daemon.onDaemonStarted, 20_000), - coreClientProvider.client, - ]); - if (startCustomizations) { -diff --git a/arduino-ide-extension/package.json b/arduino-ide-extension/package.json -index eccac3c5..d30a39e3 100644 ---- a/arduino-ide-extension/package.json -+++ b/arduino-ide-extension/package.json -@@ -140,7 +140,7 @@ - "reporter": "spec", - "colors": true, - "watch-extensions": "js", -- "timeout": 10000 -+ "timeout": 20000 - }, - "files": [ - "lib", From 35e6a5c81816b1f0d0a1d53ab9821c62e0d06bd4 Mon Sep 17 00:00:00 2001 From: neochaos42 <125705606+neochaos42@users.noreply.github.com> Date: Wed, 26 Mar 2025 23:21:35 -0500 Subject: [PATCH 21/22] Delete arduino-ide-extension/src/test/node/boards-service-impl.slow-test.ts.oqt7Fz9 --- .../src/test/node/boards-service-impl.slow-test.ts.oqt7Fz9 | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 arduino-ide-extension/src/test/node/boards-service-impl.slow-test.ts.oqt7Fz9 diff --git a/arduino-ide-extension/src/test/node/boards-service-impl.slow-test.ts.oqt7Fz9 b/arduino-ide-extension/src/test/node/boards-service-impl.slow-test.ts.oqt7Fz9 deleted file mode 100644 index e69de29bb..000000000 From 5b2ea0e58f004e0ef757868d2226d011524cf1c9 Mon Sep 17 00:00:00 2001 From: {your_name} <{your_email}> Date: Wed, 26 Mar 2025 23:50:20 -0500 Subject: [PATCH 22/22] Update --- .github/workflows/build.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 25271029f..b6e51a66a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -15,6 +15,8 @@ on: - '!scripts/merge-channel-files.js' - 'static/**' - '*.md' + tags: + - '[0-9]+.[0-9]+.[0-9]+*' workflow_dispatch: inputs: paid-runners: @@ -298,6 +300,7 @@ jobs: IS_WINDOWS_CONFIG: ${{ matrix.config.name == 'Windows' }} INSTALLER_CERT_WINDOWS_CER: "/tmp/cert.cer" # We are hardcoding the path for signtool because it is not present on the Windows PATH env var by default. + # Keep in mind that this path could change when upgrading to a new runner version SIGNTOOL_PATH: "C:/Program Files (x86)/Windows Kits/10/bin/10.0.19041.0/x86/signtool.exe" WIN_CERT_PASSWORD: ${{ secrets[matrix.config.certificate-password-secret] }} WIN_CERT_CONTAINER_NAME: ${{ secrets[matrix.config.certificate-container] }} @@ -334,6 +337,8 @@ jobs: with: node-version: ${{ env.NODE_VERSION }} registry-url: 'https://registry.npmjs.org' + # Yarn is a prerequisite for the action's cache feature, so caching should be disabled when running in the + # container where Yarn is not pre-installed. cache: ${{ fromJSON(matrix.config.container) == null && 'yarn' || null }} - name: Install Yarn