build: fixup chromedriver and mksnapshot (#48507)

build: fixup chromedriver and mksnapshot (#48470)

* build: update build tools to get proper exit codes from e build

xref: https://github.com/electron/build-tools/pull/759

* build: target zips directly

mksnapshot and chromedriver have issues with siso trying to run a separate build and zip step, so just target the zip target

* build: don't unzip chromedriver and mksnapshot in tests

The contents of these files are not used in testing, so we shouldn't unzip them.

Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com>
Co-authored-by: John Kleinschmidt <jkleinsc@electronjs.org>
This commit is contained in:
trop[bot] 2025-10-10 13:05:29 -04:00 committed by GitHub
commit f3f25fd020
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 4 additions and 10 deletions

View file

@ -79,7 +79,7 @@ runs:
shell: bash
run: |
cd src
e build --target electron:electron_mksnapshot
e build --target electron:electron_mksnapshot_zip
ELECTRON_DEPOT_TOOLS_DISABLE_LOG=1 e d gn desc out/Default v8:run_mksnapshot_default args > out/Default/mksnapshot_args
# Remove unused args from mksnapshot_args
SEDOPTION="-i"
@ -89,7 +89,6 @@ runs:
sed $SEDOPTION '/.*builtins-pgo/d' out/Default/mksnapshot_args
sed $SEDOPTION '/--turbo-profiling-input/d' out/Default/mksnapshot_args
e build --target electron:electron_mksnapshot_zip
if [ "${{ inputs.target-platform }}" = "win" ]; then
cd out/Default
powershell Compress-Archive -update mksnapshot_args mksnapshot.zip
@ -123,7 +122,6 @@ runs:
shell: bash
run: |
cd src
e build --target electron:electron_chromedriver
e build --target electron:electron_chromedriver_zip
- name: Build Node.js headers ${{ inputs.step-suffix }}
shell: bash

View file

@ -15,7 +15,7 @@ runs:
git config --global core.preloadindex true
git config --global core.longpaths true
fi
export BUILD_TOOLS_SHA=c13f4bdb50e65da46a4703f8f882079dd21fd99e
export BUILD_TOOLS_SHA=706147b2376f55078f718576b28129a0457f1795
npm i -g @electron/build-tools
# Update depot_tools to ensure python
e d update_depot_tools

View file

@ -166,22 +166,18 @@ jobs:
path: ./src_artifacts_${{ matrix.build-type }}_${{ inputs.target-arch }}
- name: Restore Generated Artifacts
run: ./src/electron/script/actions/restore-artifacts.sh
- name: Unzip Dist, Mksnapshot & Chromedriver (win)
- name: Unzip Dist (win)
if: ${{ inputs.target-platform == 'win' }}
shell: powershell
run: |
Set-ExecutionPolicy Bypass -Scope Process -Force
cd src/out/Default
Expand-Archive -Force dist.zip -DestinationPath ./
Expand-Archive -Force chromedriver.zip -DestinationPath ./
Expand-Archive -Force mksnapshot.zip -DestinationPath ./
- name: Unzip Dist, Mksnapshot & Chromedriver (unix)
- name: Unzip Dist (unix)
if: ${{ inputs.target-platform != 'win' }}
run: |
cd src/out/Default
unzip -:o dist.zip
unzip -:o chromedriver.zip
unzip -:o mksnapshot.zip
- name: Import & Trust Self-Signed Codesigning Cert on MacOS
if: ${{ inputs.target-platform == 'macos' && inputs.target-arch == 'x64' }}
run: |