From 5abefc5dc3e591973bdec20f78acc34baa84cf2c Mon Sep 17 00:00:00 2001 From: Shelley Vohr Date: Wed, 12 Jun 2024 22:12:30 -0500 Subject: [PATCH] build: use `GN_EXTRA_ARGS` on macOS (#42473) * build: use GN_EXTRA_ARGS on macOS * Switch back to main --- .../config/release/arm64/evm.mas.json | 26 ------------------- .../workflows/config/release/x64/evm.mas.json | 26 ------------------- .../config/testing/arm64/evm.mas.json | 25 ------------------ .../workflows/config/testing/x64/evm.mas.json | 26 ------------------- .github/workflows/macos-pipeline.yml | 11 ++++---- 5 files changed, 5 insertions(+), 109 deletions(-) delete mode 100644 .github/workflows/config/release/arm64/evm.mas.json delete mode 100644 .github/workflows/config/release/x64/evm.mas.json delete mode 100644 .github/workflows/config/testing/arm64/evm.mas.json delete mode 100644 .github/workflows/config/testing/x64/evm.mas.json diff --git a/.github/workflows/config/release/arm64/evm.mas.json b/.github/workflows/config/release/arm64/evm.mas.json deleted file mode 100644 index d6af529f3131..000000000000 --- a/.github/workflows/config/release/arm64/evm.mas.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "root": "/Users/runner/work/electron/electron/", - "remotes": { - "electron": { - "origin": "https://github.com/electron/electron.git" - } - }, - "gen": { - "args": [ - "import(\"//electron/build/args/release.gn\")", - "use_remoteexec = true", - "target_cpu = \"arm64\"", - "is_mas_build = true" - ], - "out": "Default" - }, - "env": { - "CHROMIUM_BUILDTOOLS_PATH": "/Users/runner/work/electron/electron/src/buildtools", - "GIT_CACHE_PATH": "/Users/runner/work/electron/electron/.git-cache" - }, - "$schema": "file:///home/builduser/.electron_build_tools/evm-config.schema.json", - "configValidationLevel": "strict", - "reclient": "remote_exec", - "goma": "none", - "preserveXcode": 5 -} diff --git a/.github/workflows/config/release/x64/evm.mas.json b/.github/workflows/config/release/x64/evm.mas.json deleted file mode 100644 index a2f4fc551efe..000000000000 --- a/.github/workflows/config/release/x64/evm.mas.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "root": "/Users/runner/work/electron/electron/", - "remotes": { - "electron": { - "origin": "https://github.com/electron/electron.git" - } - }, - "gen": { - "args": [ - "import(\"//electron/build/args/release.gn\")", - "use_remoteexec = true", - "target_cpu = \"x64\"", - "is_mas_build = true" - ], - "out": "Default" - }, - "env": { - "CHROMIUM_BUILDTOOLS_PATH": "/Users/runner/work/electron/electron/src/buildtools", - "GIT_CACHE_PATH": "/Users/runner/work/electron/electron/.git-cache" - }, - "$schema": "file:///home/builduser/.electron_build_tools/evm-config.schema.json", - "configValidationLevel": "strict", - "reclient": "remote_exec", - "goma": "none", - "preserveXcode": 5 -} diff --git a/.github/workflows/config/testing/arm64/evm.mas.json b/.github/workflows/config/testing/arm64/evm.mas.json deleted file mode 100644 index 4d2ae3b32788..000000000000 --- a/.github/workflows/config/testing/arm64/evm.mas.json +++ /dev/null @@ -1,25 +0,0 @@ -{ - "root": "/Users/runner/work/electron/electron/", - "remotes": { - "electron": { - "origin": "https://github.com/electron/electron.git" - } - }, - "gen": { - "args": [ - "import(\"//electron/build/args/testing.gn\")", - "use_remoteexec = true", - "is_mas_build = true" - ], - "out": "Default" - }, - "env": { - "CHROMIUM_BUILDTOOLS_PATH": "/Users/runner/work/electron/electron/src/buildtools", - "GIT_CACHE_PATH": "/Users/runner/work/electron/electron/.git-cache" - }, - "$schema": "file:///home/builduser/.electron_build_tools/evm-config.schema.json", - "configValidationLevel": "strict", - "reclient": "remote_exec", - "goma": "none", - "preserveXcode": 5 -} diff --git a/.github/workflows/config/testing/x64/evm.mas.json b/.github/workflows/config/testing/x64/evm.mas.json deleted file mode 100644 index bdc3a60ca036..000000000000 --- a/.github/workflows/config/testing/x64/evm.mas.json +++ /dev/null @@ -1,26 +0,0 @@ -{ - "root": "/Users/runner/work/electron/electron/", - "remotes": { - "electron": { - "origin": "https://github.com/electron/electron.git" - } - }, - "gen": { - "args": [ - "import(\"//electron/build/args/testing.gn\")", - "use_remoteexec = true", - "target_cpu = \"x64\"", - "is_mas_build = true" - ], - "out": "Default" - }, - "env": { - "CHROMIUM_BUILDTOOLS_PATH": "/Users/runner/work/electron/electron/src/buildtools", - "GIT_CACHE_PATH": "/Users/runner/work/electron/electron/.git-cache" - }, - "$schema": "file:///home/builduser/.electron_build_tools/evm-config.schema.json", - "configValidationLevel": "strict", - "reclient": "remote_exec", - "goma": "none", - "preserveXcode": 5 -} diff --git a/.github/workflows/macos-pipeline.yml b/.github/workflows/macos-pipeline.yml index 7b83bb121f51..64572ca5737e 100644 --- a/.github/workflows/macos-pipeline.yml +++ b/.github/workflows/macos-pipeline.yml @@ -41,7 +41,7 @@ env: ELECTRON_GITHUB_TOKEN: ${{ secrets.ELECTRON_GITHUB_TOKEN }} GN_CONFIG: ${{ inputs.gn-config }} # Disable pre-compiled headers to reduce out size - only useful for rebuilds - GN_BUILDFLAG_ARGS: 'enable_precompiled_headers = false' + GN_BUILDFLAG_ARGS: 'enable_precompiled_headers=false' GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac' # Only disable this in the Asan build CHECK_DIST_MANIFEST: true @@ -212,7 +212,6 @@ jobs: npm i -g @electron/build-tools e auto-update disable e init --root=$(pwd) --out=Default ${{ inputs.gn-build-type }} --import ${{ inputs.gn-build-type }} --target-cpu ${{ matrix.build-arch }} - e use ${{ inputs.gn-build-type }} - name: Checkout Electron uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 with: @@ -553,11 +552,11 @@ jobs: with: name: generated_artifacts_darwin_${{ env.TARGET_ARCH }} path: ./generated_artifacts_darwin_${{ env.TARGET_ARCH }} - - name: Create MAS Config + - name: Set GN_EXTRA_ARGS for MAS Build run: | - mv src/electron/.github/workflows/config/${{ inputs.gn-build-type }}/${{ matrix.build-arch }}/evm.mas.json $HOME/.electron_build_tools/configs/evm.mas.json echo "MAS_BUILD=true" >> $GITHUB_ENV - e use mas + GN_EXTRA_ARGS='is_mas_build=true' + echo "GN_EXTRA_ARGS=$GN_EXTRA_ARGS" >> $GITHUB_ENV - name: Build Electron (mas) run: | rm -rf "src/out/Default/Electron Framework.framework" @@ -660,7 +659,7 @@ jobs: export BUILD_TOOLS_SHA=ef894bc3cfa99d84a3b731252da0f83f500e4032 npm i -g @electron/build-tools e auto-update disable - e init --root=$(pwd) --out=Default ${{ inputs.gn-build-type }} + e init --root=$(pwd) --out=Default ${{ inputs.gn-build-type }} --import ${{ inputs.gn-build-type }} --target-cpu ${{ matrix.target-arch }} - name: Checkout Electron uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 with: