forked from opencor/webapp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI/CD: special treatment for Windows on ARM.
Indeed, GHA doesn't currently have WoA runners.
- Loading branch information
Showing
2 changed files
with
50 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,10 @@ on: | |
types: [created] | ||
workflow_dispatch: | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
cd: | ||
name: ${{ matrix.name }} | ||
|
@@ -15,22 +19,16 @@ jobs: | |
include: | ||
- name: Windows (Intel) | ||
os: windows-2022 | ||
node_architecture: x64 | ||
- name: Windows (ARM) | ||
os: windows-2019 | ||
node_architecture: arm64 | ||
- name: Linux (Intel) | ||
os: ubuntu-22.04 | ||
node_architecture: x64 | ||
- name: Linux (ARM) | ||
os: ubuntu-22.04-arm | ||
node_architecture: arm64 | ||
- name: macOS (Intel) | ||
os: macos-13 | ||
node_architecture: x64 | ||
- name: macOS (ARM) | ||
os: macos-14 | ||
node_architecture: arm64 | ||
env: | ||
APPLE_ID: ${{ secrets.APPLE_ID }} | ||
APPLE_APP_SPECIFIC_PASSWORD: ${{ secrets.APPLE_APP_SPECIFIC_PASSWORD }} | ||
|
@@ -41,6 +39,7 @@ jobs: | |
MACOS_CSC_LINK: DeveloperIDApplicationCertificate.p12 | ||
MACOS_CSC_KEY_PASSWORD: ${{ secrets.DEVELOPER_ID_APPLICATION_CERTIFICATE_PASSWORD }} | ||
DEVELOPER_ID_APPLICATION_CERTIFICATE_BASE64: ${{ secrets.DEVELOPER_ID_APPLICATION_CERTIFICATE_BASE64 }} | ||
ELECTRON_VERSION: 34.0.2 | ||
steps: | ||
- name: Set the timezone to New Zealand | ||
uses: szenius/[email protected] | ||
|
@@ -66,7 +65,6 @@ jobs: | |
- name: Install Node.js | ||
uses: actions/setup-node@v4 | ||
with: | ||
architecture: ${{ matrix.node_architecture }} | ||
node-version: 'lts/*' | ||
- name: Install pnpm | ||
run: npm install -g pnpm | ||
|
@@ -77,8 +75,26 @@ jobs: | |
sudo apt install libopenjp2-tools | ||
- name: OpenCOR dependencies | ||
run: pnpm install | ||
- name: Package OpenCOR | ||
- name: Fix OpenCOR's dependencies (Windows on ARM only) | ||
if: ${{ (matrix.name == 'Windows (ARM)') }} | ||
run: | | ||
choco install wget unzip | ||
cd node_modules/electron | ||
rm -fr dist | ||
mkdir dist | ||
cd dist | ||
wget https://github.com/electron/electron/releases/download/v$ELECTRON_VERSION/electron-v$ELECTRON_VERSION-win32-arm64.zip -O electron.zip | ||
unzip electron.zip | ||
rm electron.zip | ||
- name: Package OpenCOR (all platforms except Windows on ARM) | ||
if: ${{ matrix.name != 'Windows (ARM)' }} | ||
run: pnpm package | ||
- name: Package 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 | ||
pnpm electron-builder --arm64 | ||
- name: Remove blockmap files | ||
shell: bash | ||
run: find ./dist -name '*.blockmap' -delete | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters