mirror of
https://github.com/actualbudget/actual.git
synced 2026-10-12 02:10:19 +00:00
⬆️ Upgrade electron to 43 (#8769)
* upgrade electron to 43
* [AI] Use noble Playwright image for desktop jobs to compile against Electron 43 headers
Electron 43's V8 headers expand to 'class [[deprecated(...)]] __attribute__((visibility("default")))'
when node-gyp defines USING_V8_SHARED and V8_DEPRECATION_WARNINGS. gcc 11 and 12 (jammy) cannot
parse a GNU attribute after a standard attribute in a class-head; gcc 13 (noble) can. Verified by
compiling the headers with g++-11/12 (fail) and g++-13/14 (pass) in Ubuntu 22.04/24.04 containers.
Co-Authored-By: Claude Fable 5 <[email protected]>
* glboal setup for playwright due to new download behaviour
* Update VRT screenshots
Auto-generated by VRT workflow
PR: #8769
* upgrading runner
* add exit codes back
* build for arm64
---------
Co-authored-by: Claude Fable 5 <[email protected]>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
co-authored by
Claude Fable 5
github-actions[bot]
parent
06e23dc37b
commit
12a94d9343
@@ -134,7 +134,9 @@ jobs:
|
||||
contents: read
|
||||
id-token: write # Authenticate to Depot via GitHub OIDC for test reporting
|
||||
container:
|
||||
image: mcr.microsoft.com/playwright:v1.61.1-jammy
|
||||
# noble (gcc 13) is required to compile native modules against Electron 43+ headers;
|
||||
# jammy's gcc 11/12 cannot parse them. Keep in sync with the desktop-vrt job in vrt-update-generate.yml.
|
||||
image: mcr.microsoft.com/playwright:v1.61.1-noble
|
||||
steps:
|
||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
|
||||
with:
|
||||
|
||||
@@ -58,8 +58,8 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-22.04
|
||||
runner: depot-ubuntu-22.04-8
|
||||
- os: ubuntu-24.04
|
||||
runner: depot-ubuntu-24.04-8
|
||||
- os: windows-2022
|
||||
runner: depot-windows-2022-8
|
||||
- os: macos-latest
|
||||
@@ -105,6 +105,15 @@ jobs:
|
||||
with:
|
||||
# Avoid restoring potentially poisoned caches in release jobs.
|
||||
cache: 'false'
|
||||
- if: ${{ startsWith(matrix.os, 'ubuntu') }}
|
||||
name: Install arm64 cross-compilation toolchain
|
||||
run: |
|
||||
# better-sqlite3 has no Electron prebuilds for this Electron version,
|
||||
# so the arm64 AppImage's native modules are cross-compiled from
|
||||
# source. beforePackHook points CC_target/CXX_target at this
|
||||
# toolchain during the arm64 pass.
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y crossbuild-essential-arm64
|
||||
- name: Build Electron for Mac
|
||||
if: ${{ startsWith(matrix.os, 'macos') }}
|
||||
run: ./bin/package-electron --skip-translations
|
||||
|
||||
@@ -32,8 +32,8 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-22.04
|
||||
runner: depot-ubuntu-22.04-8
|
||||
- os: ubuntu-24.04
|
||||
runner: depot-ubuntu-24.04-8
|
||||
- os: windows-2022
|
||||
runner: depot-windows-2022-8
|
||||
- os: macos-latest
|
||||
@@ -70,6 +70,15 @@ jobs:
|
||||
VERSION=$(yarn workspace @actual-app/ci-actions tsx bin/get-next-package-version.ts --package-json ./packages/desktop-electron/package.json --type nightly)
|
||||
sed -i "s/%RELEASE_VERSION%/$VERSION/g; s/%RELEASE_DATE%/$TODAY/g" "$METAINFO_FILE"
|
||||
flatpak run --command=flatpak-builder-lint org.flatpak.Builder appstream "$METAINFO_FILE"
|
||||
- if: ${{ startsWith(matrix.os, 'ubuntu') }}
|
||||
name: Install arm64 cross-compilation toolchain
|
||||
run: |
|
||||
# better-sqlite3 has no Electron prebuilds for this Electron version,
|
||||
# so the arm64 AppImage's native modules are cross-compiled from
|
||||
# source. beforePackHook points CC_target/CXX_target at this
|
||||
# toolchain during the arm64 pass.
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y crossbuild-essential-arm64
|
||||
- name: Build Electron
|
||||
run: ./bin/package-electron --skip-translations
|
||||
|
||||
|
||||
@@ -26,8 +26,8 @@ jobs:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- os: ubuntu-22.04
|
||||
runner: depot-ubuntu-22.04-8
|
||||
- os: ubuntu-24.04
|
||||
runner: depot-ubuntu-24.04-8
|
||||
- os: windows-latest
|
||||
runner: depot-windows-2022-8
|
||||
- os: macos-latest
|
||||
@@ -73,6 +73,16 @@ jobs:
|
||||
sed -i "s/%RELEASE_VERSION%/$VERSION/g; s/%RELEASE_DATE%/$TODAY/g" "$METAINFO_FILE"
|
||||
flatpak run --command=flatpak-builder-lint org.flatpak.Builder appstream "$METAINFO_FILE"
|
||||
|
||||
- if: ${{ startsWith(matrix.os, 'ubuntu') }}
|
||||
name: Install arm64 cross-compilation toolchain
|
||||
run: |
|
||||
# better-sqlite3 has no Electron prebuilds for this Electron version,
|
||||
# so the arm64 AppImage's native modules are cross-compiled from
|
||||
# source. beforePackHook points CC_target/CXX_target at this
|
||||
# toolchain during the arm64 pass.
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y crossbuild-essential-arm64
|
||||
|
||||
- name: Update package versions
|
||||
run: |
|
||||
# Get new nightly version
|
||||
|
||||
@@ -14,7 +14,18 @@ const beforePackHook = async (context: AfterPackContext) => {
|
||||
|
||||
if (!electronVersion) {
|
||||
console.error('beforePackHook: Unable to find electron version.');
|
||||
process.exit(); // End the process - electron version is required
|
||||
process.exit(1); // End the process - electron version is required
|
||||
}
|
||||
|
||||
// gyp always compiles with CC_target/CXX_target when they are set, so they
|
||||
// must only point at the cross-compiler while building for a foreign
|
||||
// architecture — leaving them set would cross-compile the host-arch pass too.
|
||||
if (process.platform === 'linux' && arch === 'arm64') {
|
||||
process.env.CC_target = 'aarch64-linux-gnu-gcc';
|
||||
process.env.CXX_target = 'aarch64-linux-gnu-g++';
|
||||
} else {
|
||||
delete process.env.CC_target;
|
||||
delete process.env.CXX_target;
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -40,7 +51,7 @@ const beforePackHook = async (context: AfterPackContext) => {
|
||||
}
|
||||
} catch (err) {
|
||||
console.error('beforePackHook:', err);
|
||||
process.exit(); // End the process - unsuccessful build
|
||||
process.exit(1); // End the process - unsuccessful build
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 531 KiB After Width: | Height: | Size: 534 KiB |
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 534 KiB After Width: | Height: | Size: 538 KiB |
BIN
Binary file not shown.
|
Before Width: | Height: | Size: 535 KiB After Width: | Height: | Size: 539 KiB |
@@ -0,0 +1,16 @@
|
||||
import { execFileSync } from 'node:child_process';
|
||||
|
||||
// Electron >= 42 downloads its binary on the first launch instead of at
|
||||
// install time. Fetch it before the test workers start, otherwise parallel
|
||||
// workers race the download/extraction and `electron.launch` fails with
|
||||
// `spawn ETXTBSY`. The install script exits immediately when the binary is
|
||||
// already present.
|
||||
function globalSetup() {
|
||||
execFileSync(process.execPath, [require.resolve('electron/install.js')], {
|
||||
stdio: 'inherit',
|
||||
});
|
||||
}
|
||||
|
||||
// Playwright requires the setup function to be the default export.
|
||||
// oxlint-disable-next-line import/no-default-export
|
||||
export default globalSetup;
|
||||
@@ -27,7 +27,7 @@
|
||||
"@typescript/native-preview": "beta",
|
||||
"copyfiles": "^2.4.1",
|
||||
"cross-env": "^10.1.0",
|
||||
"electron": "41.10.3",
|
||||
"electron": "43.4.0",
|
||||
"electron-builder": "26.8.1",
|
||||
"typescript-strict-plugin": "^2.4.4"
|
||||
},
|
||||
|
||||
@@ -4,6 +4,7 @@ export default defineConfig({
|
||||
timeout: 60000, // 60 seconds
|
||||
retries: 1,
|
||||
testDir: 'e2e/',
|
||||
globalSetup: './e2e/global-setup.ts',
|
||||
reporter: process.env.CI
|
||||
? [['list'], ['junit', { outputFile: 'e2e/test-results/junit.xml' }]]
|
||||
: undefined,
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
---
|
||||
category: Maintenance
|
||||
authors: [MikesGlitch]
|
||||
---
|
||||
|
||||
Upgrade the desktop Electron runtime from 41 to 43
|
||||
@@ -13555,7 +13555,7 @@ __metadata:
|
||||
better-sqlite3: "npm:^12.11.1"
|
||||
copyfiles: "npm:^2.4.1"
|
||||
cross-env: "npm:^10.1.0"
|
||||
electron: "npm:41.10.3"
|
||||
electron: "npm:43.4.0"
|
||||
electron-builder: "npm:26.8.1"
|
||||
typescript-strict-plugin: "npm:^2.4.4"
|
||||
languageName: unknown
|
||||
@@ -14004,16 +14004,17 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"electron@npm:41.10.3":
|
||||
version: 41.10.3
|
||||
resolution: "electron@npm:41.10.3"
|
||||
"electron@npm:43.4.0":
|
||||
version: 43.4.0
|
||||
resolution: "electron@npm:43.4.0"
|
||||
dependencies:
|
||||
"@electron-internal/extract-zip": "npm:^1.0.1"
|
||||
"@electron/get": "npm:^5.0.0"
|
||||
"@types/node": "npm:^24.9.0"
|
||||
bin:
|
||||
electron: cli.js
|
||||
checksum: 10/cda634238f7b12f87d5374c0a3af1bfe19d2b38ec6c9e08ed10d288cf4baee73da1483a5adf2a4f5ab1df87fb4f8467c4a3ed27da22cadc5ffa1585aba248990
|
||||
install-electron: install.js
|
||||
checksum: 10/215b76f05bd23a04040091372fedfcf36d2365362b3f15ce955e0ec0c28fed0377283b7a763ade87c473dc8377a2082b070f92cd94877d40403cf7a3c71cb0a0
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
||||
Reference in New Issue
Block a user