Skip to content

Add ARM support on Windows and Linux #224

Add ARM support on Windows and Linux

Add ARM support on Windows and Linux #224

Workflow file for this run

name: CI
on:
pull_request:
branches: [main]
workflow_dispatch:
jobs:
ci:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- name: Windows (Intel)
os: windows-2022
- name: Windows (ARM)
os: windows-2019
- name: Linux (Intel)
os: ubuntu-22.04
- name: Linux (ARM)
os: ubuntu-22.04-arm
- name: macOS (Intel)
os: macos-13
- name: macOS (ARM)
os: macos-14
- name: Code formatting
os: ubuntu-22.04
- name: Linting
os: ubuntu-22.04
steps:
- name: Check out OpenCOR
uses: actions/checkout@v4
- name: Install CMake and Ninja
uses: lukka/get-cmake@latest
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: Install pnpm
run: npm install -g pnpm
- name: OpenCOR dependencies
run: pnpm install
- name: Fix OpenCOR's dependencies (Windows on ARM only)
if: ${{ matrix.name == 'Windows (ARM)' }}
run: |
choco install wget unzip
cd node_modules/electron
Remove-Item -Recurse -Force dist
mkdir dist
cd dist
wget https://github.com/electron/electron/releases/download/v34.0.2/electron-v34.0.2-win32-arm64.zip -O electron.zip
unzip electron.zip
del electron.zip
- name: Build OpenCOR (all platforms except Windows on ARM)
if: ${{ (matrix.name != 'Code formatting') && (matrix.name != 'Linting') }}
run: pnpm build
- name: Build OpenCOR (all platforms except Windows on ARM)
if: ${{ (matrix.name != 'Windows (ARM)') && (matrix.name != 'Code formatting') && (matrix.name != 'Linting') }}
run: pnpm build
- name: Build OpenCOR (Windows on ARM only)
if: ${{ matrix.name == 'Windows (ARM)' }}
run: |
pnpm cmake-js build -a arm64 -B Release -O out/libOpenCOR
pnpm electron-vite build
- name: Build OpenCOR's Web app
if: ${{ (matrix.name != 'Code formatting') && (matrix.name != 'Linting') }}
run: pnpm build:web
- name: Code formatting
if: matrix.name == 'Code formatting'
run: pnpm format:check
- name: Linting
if: matrix.name == 'Linting'
run: pnpm lint
- name: Clean OpenCOR
run: pnpm clean