From f3f25fd0208e6cefea0f0b0c3853d404979a4be3 Mon Sep 17 00:00:00 2001 From: "trop[bot]" <37223003+trop[bot]@users.noreply.github.com> Date: Fri, 10 Oct 2025 13:05:29 -0400 Subject: [PATCH] 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 --- .github/actions/build-electron/action.yml | 4 +--- .github/actions/install-build-tools/action.yml | 2 +- .github/workflows/pipeline-segment-electron-test.yml | 8 ++------ 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/.github/actions/build-electron/action.yml b/.github/actions/build-electron/action.yml index 70849249f3d8..cd3d7565f41c 100644 --- a/.github/actions/build-electron/action.yml +++ b/.github/actions/build-electron/action.yml @@ -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 diff --git a/.github/actions/install-build-tools/action.yml b/.github/actions/install-build-tools/action.yml index 9156c0938468..868cdc63a44b 100644 --- a/.github/actions/install-build-tools/action.yml +++ b/.github/actions/install-build-tools/action.yml @@ -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 diff --git a/.github/workflows/pipeline-segment-electron-test.yml b/.github/workflows/pipeline-segment-electron-test.yml index 37ff67cfcf26..a3b2ddd90270 100644 --- a/.github/workflows/pipeline-segment-electron-test.yml +++ b/.github/workflows/pipeline-segment-electron-test.yml @@ -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: |