Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
45c4f99
Correctly remove the OS X artifact.
ubidefeo Aug 29, 2025
fcd698d
WIP: attempt to fix cleaning artifacts
ubidefeo Aug 29, 2025
1eae595
Upgraded delete-artifacts to v5 for compatibility.
ubidefeo Aug 29, 2025
9a8c980
Tweaking delete-artifact@v5
ubidefeo Aug 29, 2025
eef6e08
Cleaned comment upon verifying working status.
ubidefeo Aug 29, 2025
53cb3a3
Merge pull request #199 from arduino/actions/fix-artifacts-clean
ubidefeo Aug 29, 2025
2863f86
First test of Linux arm64 build.
ubidefeo Aug 29, 2025
248bdd6
Added linux arm-64 to build targets.
ubidefeo Aug 29, 2025
9bdc33f
Attempt to build linux-arm64.
ubidefeo Aug 29, 2025
6287491
Split Linux build over 2 platforms to force arm64 rebuild.
ubidefeo Aug 29, 2025
d366ea1
Refine action.
ubidefeo Aug 29, 2025
53684ab
Test: overwriting artifacts.
ubidefeo Aug 29, 2025
1cca8c1
Updated linux image to run arm64 build on.
ubidefeo Aug 30, 2025
058c2bf
Testing on Linux 22.04 arm64.
ubidefeo Aug 30, 2025
5385a1a
Testing arm64 only with specific settings.
ubidefeo Aug 30, 2025
1231193
Shifting Linux arm64 deps build to external rebuild script.
ubidefeo Aug 30, 2025
a0486db
Checking for aarch64 as well as arm64 on Linux.
ubidefeo Aug 30, 2025
ffe558b
Updated notarize dependency.
ubidefeo Aug 30, 2025
8846339
Tidying up scripts.
ubidefeo Aug 30, 2025
55fc3ff
Enable all builds to test.
ubidefeo Aug 30, 2025
3a37b7e
Trying to fix the double-zip issue.
ubidefeo Aug 30, 2025
ea39f21
Trying to fix the double-zip issue.
ubidefeo Aug 30, 2025
b8beaa1
test: Build electron into folders to avoid double-zip.
ubidefeo Aug 30, 2025
b1a2658
Restored double zip to preserve permissions.
ubidefeo Aug 30, 2025
11451c5
Prevent extra artefacts from being uploaded.
ubidefeo Aug 31, 2025
3cb28eb
Prevent extra artefacts from being uploaded.
ubidefeo Aug 31, 2025
107ccab
Fixing artifacts generation/download/upload.
ubidefeo Aug 31, 2025
806db36
Fixing artifacts generation/download/upload.
ubidefeo Aug 31, 2025
b212ae7
Actions/build refactor (#200)
ubidefeo Aug 31, 2025
d48ac45
Force overwrite assets, upgrade svenstaro/upload-release-action.
ubidefeo Sep 1, 2025
07006ad
yMerge branch 'development' into actions/build-refactor
ubidefeo Sep 1, 2025
8d28ef9
Merge pull request #202 from arduino/actions/build-refactor
ubidefeo Sep 1, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 28 additions & 19 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ on:

env:
JOB_TRANSFER_ARTIFACT: build-artifacts
NODE_VERSION: 18.17
NODE_VERSION: 20.18

jobs:
build:
Expand All @@ -23,12 +23,14 @@ jobs:
fail-fast: false
matrix:
config:
- os: macos-latest
id: macos-universal
- os: [self-hosted, windows-sign-pc]
id: windows
- os: ubuntu-latest
id: linux
- os: macos-latest
id: macos-universal
id: linux-x64
- os: ubuntu-22.04-arm
id: linux-arm64
runs-on: ${{ matrix.config.os }}
timeout-minutes: 90

Expand Down Expand Up @@ -98,6 +100,7 @@ jobs:
with:
name: ${{ env.JOB_TRANSFER_ARTIFACT }}-${{ matrix.config.id }}
path: dist
overwrite: true

artifacts:
name: ${{ matrix.artifact.name }} artifact
Expand All @@ -108,34 +111,41 @@ jobs:
strategy:
matrix:
artifact:
- path: "*-linux_x64.zip"
name: Arduino-Lab-for-MicroPython_Linux_X86-64
id: linux
- path: "*-mac_universal.zip"
name: Arduino-Lab-for-MicroPython_macOS_Universal
id: macos-universal
- path: "*-win_x64.zip"
name: Arduino-Lab-for-MicroPython_Windows_X86-64
id: windows
- path: "*-linux_x64.zip"
name: Arduino-Lab-for-MicroPython_Linux_X86-64
id: linux-x64
- path: "*-linux_arm64.zip"
name: Arduino-Lab-for-MicroPython_Linux_ARM64
id: linux-arm64

# keep for future implementation
# Windows - installers (future)
# - path: "*Windows_64bit.exe"
# name: Windows_X86-64_interactive_installer
# id: windows
# - path: "*Windows_64bit.msi"
# name: Windows_X86-64_MSI
# id: windows
- path: "*-win_x64.zip"
name: Arduino-Lab-for-MicroPython_Windows_X86-64
id: windows


steps:
- name: Download job transfer artifact
uses: actions/download-artifact@v4
with:
name: ${{ env.JOB_TRANSFER_ARTIFACT }}-${{ matrix.artifact.id }}
path: ${{ env.JOB_TRANSFER_ARTIFACT }}

- name: Upload tester build artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact.name }}
path: ${{ env.JOB_TRANSFER_ARTIFACT }}/${{ matrix.artifact.path }}
overwrite: true

release:
needs: build
Expand All @@ -145,7 +155,9 @@ jobs:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
pattern: build-artifacts-*
path: artifacts
merge-multiple: true

- name: List artifacts
run: ls -R artifacts
Expand All @@ -156,13 +168,14 @@ jobs:
echo "TAG_NAME=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT

- name: Publish Release [GitHub]
uses: svenstaro/upload-release-action@2.2.0
uses: svenstaro/upload-release-action@2.11.2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
release_name: ${{ steps.tag_name.outputs.TAG_NAME }}
file: artifacts/**/*
tag: ${{ github.ref }}
file_glob: true
overwrite: true

clean:
# This job must run after all jobs that use the transfer artifact.
Expand All @@ -172,13 +185,9 @@ jobs:
- artifacts
if: always() && needs.build.result != 'skipped'
runs-on: ubuntu-latest

steps:
- name: Remove unneeded job transfer artifacts
uses: geekyeggo/delete-artifact@v2
uses: geekyeggo/delete-artifact@v5
with:
name: |
${{ env.JOB_TRANSFER_ARTIFACT }}-windows
${{ env.JOB_TRANSFER_ARTIFACT }}-linux
${{ env.JOB_TRANSFER_ARTIFACT }}-macos-x64
${{ env.JOB_TRANSFER_ARTIFACT }}-macos-arm64
name: ${{ env.JOB_TRANSFER_ARTIFACT }}-*

43 changes: 43 additions & 0 deletions build_resources/electron-rebuild.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
const { execSync } = require('child_process');
const fs = require('fs');
const os = require('os');

console.log('System info:', {
arch: process.arch,
platform: process.platform,
osArch: os.arch(),
osType: os.type()
});

if (process.platform === 'linux' && (process.arch === 'arm64' || os.arch() === 'arm64')) {
console.log('Configuring for ARM64 build...');

const npmrcContent = `target_arch=arm64
target_platform=linux
disturl=https://electronjs.org/headers
runtime=electron
cache=/tmp/.npm
build_from_source=true`;

fs.writeFileSync('.npmrc', npmrcContent);

// Clear cached builds
execSync('rm -rf node_modules/@serialport/bindings-cpp/build', { stdio: 'inherit' });

try {
execSync('npx @electron/rebuild --arch=arm64 --force', {
stdio: 'inherit',
env: {
...process.env,
TARGET_ARCH: 'arm64',
npm_config_target_arch: 'arm64',
ELECTRON_REBUILD_ARCH: 'arm64'
}
});
} catch (error) {
console.error('ARM64 rebuild failed');
process.exit(1);
}
} else {
execSync('npx @electron/rebuild', { stdio: 'inherit' });
}
2 changes: 1 addition & 1 deletion build_resources/notarize.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
// along with this program. If not, see <https://www.gnu.org/licenses/>.

const isCI = require('is-ci');
const { notarize } = require('electron-notarize');
const { notarize } = require('@electron/notarize');

exports.default = async function notarizing(context) {
if (!isCI) {
Expand Down
Loading