chore: update to Electron 32 (#218245)

* chore: update electron@31.0.1

* chore: bump electron@31.1.0

* chore: update sysroot download url

* chore: bump electron@31.3.0

* chore: update rpm deps for arm64

* chore: bump electron@31.4.0

* chore: bump electron@32.0.0

* fix: compile stage

* fix: install on windows

* fix: override node-addon-api to support c++20 with gcc-11

Brings in fed13534c5
to support compilation with gcc>=11

* ci: use gnu++2a for gcc <=9

* ci: fix sdl pipeline

* ci: web stage

* ci: fix alpine stage

* ci: fix legacy server stage

* fix: node-addon-api resolution for remote

* ci: fix legacy arm stage

* chore: sync npm dependencies

* chore: bump electron@32.0.1

* ci: fix monaco editor checks

* ci: fix legacy server stage

* ci: possible concurrent execution

* ci: use foreground scripts on windows

* chore: bump electron@32.0.2

* fix: compilation

Refs 204011c3f2

* Revert "wco - hardcode devtools location on Linux (#227084)"

This reverts commit dfb96d11d3.

* chore: bump electron@32.1.2

* ci: remove workaround for missing c++20 flags

* ci: use gnu++2a for gcc <=9

* chore: bump distro

* ci: use gnu++17 for legacy arm servers

* fixup! override node-addon-api to support c++20 with gcc-11

Scope to only the affected package versions

* chore: bump @vscode/policy-watcher

* chore: bump @vscode/sqlite3

* chore: bump node.js v20.17.0

* chore: bump distro

* chore: update @vscode/windows-ca-certs

* chore: update builds for electron@32.1.2

* chore: bump distro

* chore: bump dependencies

* ci: fix arm legacy servers
This commit is contained in:
Robo
2024-10-04 19:19:06 +09:00
committed by GitHub
parent 4b03030ec2
commit 8422282f04
37 changed files with 338 additions and 307 deletions

View File

@@ -13,7 +13,7 @@ import { DebianArchString } from './types';
import * as ansiColors from 'ansi-colors';
// Based on https://source.chromium.org/chromium/chromium/src/+/main:build/linux/sysroot_scripts/install-sysroot.py.
const URL_PREFIX = 'https://msftelectron.blob.core.windows.net';
const URL_PREFIX = 'https://msftelectronbuild.z5.web.core.windows.net';
const URL_PATH = 'sysroots/toolchain';
const REPO_ROOT = path.dirname(path.dirname(path.dirname(__dirname)));
@@ -45,8 +45,7 @@ function getElectronVersion(): Record<string, string> {
}
function getSha(filename: fs.PathLike): string {
// CodeQL [SM04514] Hash logic cannot be changed due to external dependency, also the code is only used during build.
const hash = createHash('sha1');
const hash = createHash('sha256');
// Read file 1 MB at a time
const fd = fs.openSync(filename, 'r');
const buffer = Buffer.alloc(1024 * 1024);
@@ -129,7 +128,7 @@ async function fetchUrl(options: IFetchOptions, retries = 10, retryDelay = 1000)
}
type SysrootDictEntry = {
Sha1Sum: string;
Sha256Sum: string;
SysrootDir: string;
Tarball: string;
};
@@ -186,9 +185,9 @@ export async function getChromiumSysroot(arch: DebianArchString): Promise<string
const sysrootArch = `bullseye_${arch}`;
const sysrootDict: SysrootDictEntry = sysrootInfo[sysrootArch];
const tarballFilename = sysrootDict['Tarball'];
const tarballSha = sysrootDict['Sha1Sum'];
const tarballSha = sysrootDict['Sha256Sum'];
const sysroot = path.join(tmpdir(), sysrootDict['SysrootDir']);
const url = [URL_PREFIX, URL_PATH, tarballSha, tarballFilename].join('/');
const url = [URL_PREFIX, URL_PATH, tarballSha].join('/');
const stamp = path.join(sysroot, '.stamp');
if (fs.existsSync(stamp) && fs.readFileSync(stamp).toString() === url) {
return sysroot;