build: use GN_EXTRA_ARGS on macOS (#42473)

* build: use GN_EXTRA_ARGS on macOS

* Switch back to main
This commit is contained in:
Shelley Vohr 2024-06-12 22:12:30 -05:00 committed by GitHub
parent 9d6c894e89
commit 5abefc5dc3
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 5 additions and 109 deletions

View file

@ -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
}

View file

@ -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
}

View file

@ -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
}

View file

@ -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
}

View file

@ -41,7 +41,7 @@ env:
ELECTRON_GITHUB_TOKEN: ${{ secrets.ELECTRON_GITHUB_TOKEN }} ELECTRON_GITHUB_TOKEN: ${{ secrets.ELECTRON_GITHUB_TOKEN }}
GN_CONFIG: ${{ inputs.gn-config }} GN_CONFIG: ${{ inputs.gn-config }}
# Disable pre-compiled headers to reduce out size - only useful for rebuilds # 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' GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac'
# Only disable this in the Asan build # Only disable this in the Asan build
CHECK_DIST_MANIFEST: true CHECK_DIST_MANIFEST: true
@ -212,7 +212,6 @@ jobs:
npm i -g @electron/build-tools npm i -g @electron/build-tools
e auto-update disable 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 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 - name: Checkout Electron
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
with: with:
@ -553,11 +552,11 @@ jobs:
with: with:
name: generated_artifacts_darwin_${{ env.TARGET_ARCH }} name: generated_artifacts_darwin_${{ env.TARGET_ARCH }}
path: ./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: | 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 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) - name: Build Electron (mas)
run: | run: |
rm -rf "src/out/Default/Electron Framework.framework" rm -rf "src/out/Default/Electron Framework.framework"
@ -660,7 +659,7 @@ jobs:
export BUILD_TOOLS_SHA=ef894bc3cfa99d84a3b731252da0f83f500e4032 export BUILD_TOOLS_SHA=ef894bc3cfa99d84a3b731252da0f83f500e4032
npm i -g @electron/build-tools npm i -g @electron/build-tools
e auto-update disable 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 - name: Checkout Electron
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
with: with: