Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
203 changes: 96 additions & 107 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,18 +17,18 @@ jobs:
fail-fast: false
matrix:
include:
- name: Windows (Intel)
os: windows-2022
# - name: Windows (Intel)
# os: windows-2022
- name: Windows (ARM)
os: windows-11-arm
- name: Linux (Intel)
os: ubuntu-22.04
- name: Linux (ARM)
os: ubuntu-22.04-arm
- name: macOS (Intel)
os: macos-15-intel
- name: macOS (ARM)
os: macos-15
# - name: Linux (Intel)
# os: ubuntu-22.04
# - name: Linux (ARM)
# os: ubuntu-22.04-arm
# - name: macOS (Intel)
# os: macos-15-intel
Comment on lines 17 to +29
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The release matrix has been reduced to only "Windows (ARM)" by commenting out Windows/Linux/macOS Intel/ARM entries. This will stop producing release artifacts for the other platforms; if the intent is to add Windows ARM support, keep the other matrix entries enabled (or move them behind an explicit flag/condition) so CD still builds the full set of releases.

Copilot uses AI. Check for mistakes.
# - name: macOS (ARM)
# os: macos-15
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
APPLE_ID: ${{ secrets.APPLE_ID }}
Expand Down Expand Up @@ -72,28 +72,17 @@ jobs:
- name: Install bun (Windows ARM only)
if: ${{ matrix.name == 'Windows (ARM)' }}
run: |
curl -L https://github.com/oven-sh/bun/releases/latest/download/bun-windows-x64-baseline.zip -o bun.zip
curl -L https://github.com/oven-sh/bun/releases/latest/download/bun-windows-aarch64.zip -o bun.zip
unzip -j bun.zip -d $env:USERPROFILE\.bun
del bun.zip
echo "$env:USERPROFILE\.bun" >> $env:GITHUB_PATH
- name: Make sure that we can sign OpenCOR (Windows ARM only)
if: ${{ matrix.name == 'Windows (ARM)' }}
run: |
curl -L https://npmmirror.com/mirrors/electron-builder-binaries/winCodeSign-2.6.0/winCodeSign-2.6.0.7z -o winCodeSign.7z
7z x winCodeSign.7z -oC:\Users\runneradmin\AppData\Local\electron-builder\Cache\winCodeSign\winCodeSign-2.6.0
cd C:\Users\runneradmin\AppData\Local\electron-builder\Cache\winCodeSign\winCodeSign-2.6.0\windows-10
mv x64 arm64
- name: Install libopenjp2-tools (Linux ARM only)
if: ${{ matrix.name == 'Linux (ARM)' }}
run: |
sudo apt update
sudo apt install libopenjp2-tools
- name: OpenCOR dependencies
Comment on lines 83 to 84
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CD now installs bun via oven-sh/setup-bun@v2 on Windows ARM and runs bun install without --cpu=arm64, while the CI workflow still uses a Windows ARM workaround (manual bun install + bun install --cpu=arm64). This inconsistency can lead to different dependency resolution/build outputs between CI and release; consider updating both workflows together (either remove the workaround everywhere or keep the same ARM-specific install flags in CD).

Suggested change
sudo apt install libopenjp2-tools
- name: OpenCOR dependencies
sudo apt install libopenjp2-tools
- name: OpenCOR dependencies (Windows ARM)
if: ${{ matrix.name == 'Windows (ARM)' }}
run: bun install --cpu=arm64
- name: OpenCOR dependencies
if: ${{ matrix.name != 'Windows (ARM)' }}

Copilot uses AI. Check for mistakes.
if: ${{ matrix.name != 'Windows (ARM)' }}
run: bun install
- name: OpenCOR dependencies (Windows ARM only)
if: ${{ matrix.name == 'Windows (ARM)' }}
run: bun install --cpu=arm64
- name: Build OpenCOR
env:
VITE_FIREBASE_API_KEY: ${{ secrets.VITE_FIREBASE_API_KEY }}
Expand All @@ -103,88 +92,88 @@ jobs:
run: bun run build
- name: Release OpenCOR
run: bun release
web_app:
if: ${{ github.repository == 'opencor/webapp' }}
name: Web app
runs-on: ubuntu-22.04
steps:
- name: Set the timezone to New Zealand
uses: szenius/set-timezone@v2.0
with:
timezoneLinux: 'Pacific/Auckland'
- name: Check out OpenCOR
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
- name: Install bun
run: npm install -g bun
- name: OpenCOR dependencies
run: bun install
- name: Build OpenCOR's Web app
env:
VITE_FIREBASE_API_KEY: ${{ secrets.VITE_FIREBASE_API_KEY }}
VITE_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.VITE_FIREBASE_MESSAGING_SENDER_ID }}
VITE_FIREBASE_APP_ID: ${{ secrets.VITE_FIREBASE_APP_ID }}
VITE_FIREBASE_MEASUREMENT_ID: ${{ secrets.VITE_FIREBASE_MEASUREMENT_ID }}
run: bun build:web
- name: Deploy to https://opencor.ws/app/
uses: milanmk/actions-file-deployer@master
with:
remote-protocol: sftp
remote-host: ${{ secrets.REMOTE_HOST }}
remote-user: ${{ secrets.REMOTE_USER }}
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
local-path: ./src/renderer/dist
remote-path: /home/www/opencor.ws/app
sync: full
- name: Archive OpenCOR's Web app
run: bun archive:web
- name: Release OpenCOR's Web app
uses: softprops/action-gh-release@v2
with:
files: dist/OpenCOR-*-WebApp.tar.gz
npm:
runs-on: ubuntu-22.04
steps:
- name: Set the timezone to New Zealand
uses: szenius/set-timezone@v2.0
with:
timezoneLinux: 'Pacific/Auckland'
- name: Check out OpenCOR
uses: actions/checkout@v4
- name: Install Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
registry-url: 'https://registry.npmjs.org'
- name: Update npm
# Install the latest version of npm since we need npm 11.5.1 or later to publish to npm using OIDC (see
# https://docs.npmjs.com/trusted-publishers).
run: npm install -g npm@latest
- name: Install bun
run: npm install -g bun
- name: OpenCOR dependencies
run: |
cd src/renderer
bun install
- name: Build OpenCOR as a component
env:
VITE_FIREBASE_API_KEY: ${{ secrets.VITE_FIREBASE_API_KEY }}
VITE_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.VITE_FIREBASE_MESSAGING_SENDER_ID }}
VITE_FIREBASE_APP_ID: ${{ secrets.VITE_FIREBASE_APP_ID }}
VITE_FIREBASE_MEASUREMENT_ID: ${{ secrets.VITE_FIREBASE_MEASUREMENT_ID }}
run: |
cd src/renderer
bun build:lib
- name: Publish OpenCOR
# bun cannot currently be used to publish to npm using OIDC (see https://github.com/oven-sh/bun/issues/22423 and
# https://github.com/oven-sh/bun/issues/15601), so we use npm instead. To publish using OIDC implies automatic
# provenance generation, so no need to specify --provenance (see https://docs.npmjs.com/trusted-publishers).
# Provenance requires "repository.url" in package.json to match the repository from which we are publishing. In
# our case, it means that we can only publish to npm from the "opencor/webapp" repository. (Provenance can be
# disabled, but we prefer to be open.)
run: |
cd src/renderer
npm publish --access public --no-git-checks
# web_app:
# if: ${{ github.repository == 'opencor/webapp' }}
# name: Web app
# runs-on: ubuntu-22.04
# steps:
# - name: Set the timezone to New Zealand
# uses: szenius/set-timezone@v2.0
# with:
# timezoneLinux: 'Pacific/Auckland'
# - name: Check out OpenCOR
# uses: actions/checkout@v4
# - name: Install Node.js
# uses: actions/setup-node@v4
# with:
# node-version: 'lts/*'
# - name: Install bun
# run: npm install -g bun
# - name: OpenCOR dependencies
# run: bun install
# - name: Build OpenCOR's Web app
# env:
# VITE_FIREBASE_API_KEY: ${{ secrets.VITE_FIREBASE_API_KEY }}
# VITE_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.VITE_FIREBASE_MESSAGING_SENDER_ID }}
# VITE_FIREBASE_APP_ID: ${{ secrets.VITE_FIREBASE_APP_ID }}
# VITE_FIREBASE_MEASUREMENT_ID: ${{ secrets.VITE_FIREBASE_MEASUREMENT_ID }}
# run: bun build:web
# - name: Deploy to https://opencor.ws/app/
# uses: milanmk/actions-file-deployer@master
# with:
# remote-protocol: sftp
# remote-host: ${{ secrets.REMOTE_HOST }}
# remote-user: ${{ secrets.REMOTE_USER }}
# ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
# local-path: ./src/renderer/dist
# remote-path: /home/www/opencor.ws/app
# sync: full
# - name: Archive OpenCOR's Web app
# run: bun archive:web
# - name: Release OpenCOR's Web app
# uses: softprops/action-gh-release@v2
# with:
# files: dist/OpenCOR-*-WebApp.tar.gz
# npm:
Comment on lines 93 to +137
Copy link

Copilot AI Feb 26, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The "web_app" and "npm" jobs have been entirely commented out. That effectively disables web app deployment and npm publishing from this workflow; if this is intentional, it should be removed or guarded behind an explicit if:/input rather than left as a large commented block, and the PR title/description should reflect the behavior change.

Copilot uses AI. Check for mistakes.
# runs-on: ubuntu-22.04
# steps:
# - name: Set the timezone to New Zealand
# uses: szenius/set-timezone@v2.0
# with:
# timezoneLinux: 'Pacific/Auckland'
# - name: Check out OpenCOR
# uses: actions/checkout@v4
# - name: Install Node.js
# uses: actions/setup-node@v4
# with:
# node-version: 'lts/*'
# registry-url: 'https://registry.npmjs.org'
# - name: Update npm
# # Install the latest version of npm since we need npm 11.5.1 or later to publish to npm using OIDC (see
# # https://docs.npmjs.com/trusted-publishers).
# run: npm install -g npm@latest
# - name: Install bun
# run: npm install -g bun
# - name: OpenCOR dependencies
# run: |
# cd src/renderer
# bun install
# - name: Build OpenCOR as a component
# env:
# VITE_FIREBASE_API_KEY: ${{ secrets.VITE_FIREBASE_API_KEY }}
# VITE_FIREBASE_MESSAGING_SENDER_ID: ${{ secrets.VITE_FIREBASE_MESSAGING_SENDER_ID }}
# VITE_FIREBASE_APP_ID: ${{ secrets.VITE_FIREBASE_APP_ID }}
# VITE_FIREBASE_MEASUREMENT_ID: ${{ secrets.VITE_FIREBASE_MEASUREMENT_ID }}
# run: |
# cd src/renderer
# bun build:lib
# - name: Publish OpenCOR
# # bun cannot currently be used to publish to npm using OIDC (see https://github.com/oven-sh/bun/issues/22423 and
# # https://github.com/oven-sh/bun/issues/15601), so we use npm instead. To publish using OIDC implies automatic
# # provenance generation, so no need to specify --provenance (see https://docs.npmjs.com/trusted-publishers).
# # Provenance requires "repository.url" in package.json to match the repository from which we are publishing. In
# # our case, it means that we can only publish to npm from the "opencor/webapp" repository. (Provenance can be
# # disabled, but we prefer to be open.)
# run: |
# cd src/renderer
# npm publish --access public --no-git-checks
6 changes: 1 addition & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,16 +50,12 @@ jobs:
- name: Install bun (Windows ARM only)
if: ${{ matrix.name == 'Windows (ARM)' }}
run: |
curl -L https://github.com/oven-sh/bun/releases/latest/download/bun-windows-x64-baseline.zip -o bun.zip
curl -L https://github.com/oven-sh/bun/releases/latest/download/bun-windows-aarch64.zip -o bun.zip
unzip -j bun.zip -d $env:USERPROFILE\.bun
del bun.zip
echo "$env:USERPROFILE\.bun" >> $env:GITHUB_PATH
- name: OpenCOR dependencies
if: ${{ matrix.name != 'Windows (ARM)' }}
run: bun install
- name: OpenCOR dependencies (Windows ARM only)
if: ${{ matrix.name == 'Windows (ARM)' }}
run: bun install --cpu=arm64
- name: Build OpenCOR
if: ${{ matrix.name != 'Code formatting' && matrix.name != 'Linting' }}
run: bun run build
Expand Down