Skip to content

Add Linux Arm64 runners #2669

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 23 commits into from
Closed
Changes from 1 commit
Commits
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
Prev Previous commit
Next Next commit
test
  • Loading branch information
{your_name} committed Mar 26, 2025
commit ea0ac8dd08f5108a1341e26d92d8847ba69d7d97
130 changes: 130 additions & 0 deletions .github/workflows/buildarm.yml
Original file line number Diff line number Diff line change
@@ -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 }}