build: use one build target (#48527)

This reverts commit Optimizes our builds for use with siso/avoids file contention on Windows
This commit is contained in:
John Kleinschmidt
2025-10-20 15:57:50 -04:00
committed by GitHub
parent 0c27c1a395
commit 2a0c368105
3 changed files with 35 additions and 31 deletions

View File

@@ -60,7 +60,11 @@ runs:
sudo launchctl limit maxfiles 65536 200000 sudo launchctl limit maxfiles 65536 200000
fi fi
NINJA_SUMMARIZE_BUILD=1 e build if [ "${{ inputs.is-release }}" = "true" ]; then
NINJA_SUMMARIZE_BUILD=1 e build --target electron:release_build
else
NINJA_SUMMARIZE_BUILD=1 e build --target electron:testing_build
fi
cp out/Default/.ninja_log out/electron_ninja_log cp out/Default/.ninja_log out/electron_ninja_log
node electron/script/check-symlinks.js node electron/script/check-symlinks.js
@@ -74,11 +78,10 @@ runs:
else else
echo "Skipping build-stats.mjs upload because DD_API_KEY is not set" echo "Skipping build-stats.mjs upload because DD_API_KEY is not set"
fi fi
- name: Build Electron dist.zip ${{ inputs.step-suffix }} - name: Verify dist.zip ${{ inputs.step-suffix }}
shell: bash shell: bash
run: | run: |
cd src cd src
e build --target electron:electron_dist_zip
if [ "${{ inputs.is-asan }}" != "true" ]; then if [ "${{ inputs.is-asan }}" != "true" ]; then
target_os=${{ inputs.target-platform == 'macos' && 'mac' || inputs.target-platform }} target_os=${{ inputs.target-platform == 'macos' && 'mac' || inputs.target-platform }}
if [ "${{ inputs.artifact-platform }}" = "mas" ]; then if [ "${{ inputs.artifact-platform }}" = "mas" ]; then
@@ -86,11 +89,10 @@ runs:
fi fi
electron/script/zip_manifests/check-zip-manifest.py out/Default/dist.zip electron/script/zip_manifests/dist_zip.$target_os.${{ inputs.target-arch }}.manifest electron/script/zip_manifests/check-zip-manifest.py out/Default/dist.zip electron/script/zip_manifests/dist_zip.$target_os.${{ inputs.target-arch }}.manifest
fi fi
- name: Build Mksnapshot ${{ inputs.step-suffix }} - name: Fixup Mksnapshot ${{ inputs.step-suffix }}
shell: bash shell: bash
run: | run: |
cd src cd src
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 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 # Remove unused args from mksnapshot_args
SEDOPTION="-i" SEDOPTION="-i"
@@ -142,11 +144,6 @@ runs:
fi fi
electron/script/zip_manifests/check-zip-manifest.py out/Default/chromedriver.zip electron/script/zip_manifests/chromedriver_zip.$target_os.${{ inputs.target-arch }}.manifest electron/script/zip_manifests/check-zip-manifest.py out/Default/chromedriver.zip electron/script/zip_manifests/chromedriver_zip.$target_os.${{ inputs.target-arch }}.manifest
fi fi
- name: Build Node.js headers ${{ inputs.step-suffix }}
shell: bash
run: |
cd src
e build --target electron:node_headers
- name: Create installed_software.json ${{ inputs.step-suffix }} - name: Create installed_software.json ${{ inputs.step-suffix }}
shell: powershell shell: powershell
if: ${{ inputs.is-release == 'true' && inputs.target-platform == 'win' }} if: ${{ inputs.is-release == 'true' && inputs.target-platform == 'win' }}
@@ -166,17 +163,11 @@ runs:
# Needed for msdia140.dll on 64-bit windows # Needed for msdia140.dll on 64-bit windows
cd src cd src
export PATH="$PATH:$(pwd)/third_party/llvm-build/Release+Asserts/bin" export PATH="$PATH:$(pwd)/third_party/llvm-build/Release+Asserts/bin"
- name: Generate & Zip Symbols ${{ inputs.step-suffix }} - name: Zip Symbols ${{ inputs.step-suffix }}
shell: bash shell: bash
run: | run: |
# Generate breakpad symbols on release builds
if [ "${{ inputs.generate-symbols }}" = "true" ]; then
e build --target electron:electron_symbols
fi
cd src cd src
export BUILD_PATH="$(pwd)/out/Default" export BUILD_PATH="$(pwd)/out/Default"
e build --target electron:licenses
e build --target electron:electron_version_file
if [ "${{ inputs.is-release }}" = "true" ]; then if [ "${{ inputs.is-release }}" = "true" ]; then
DELETE_DSYMS_AFTER_ZIP=1 electron/script/zip-symbols.py -b $BUILD_PATH DELETE_DSYMS_AFTER_ZIP=1 electron/script/zip-symbols.py -b $BUILD_PATH
else else
@@ -189,18 +180,6 @@ runs:
cd src cd src
gn gen out/ffmpeg --args="import(\"//electron/build/args/ffmpeg.gn\") use_remoteexec=true use_siso=true $GN_EXTRA_ARGS" gn gen out/ffmpeg --args="import(\"//electron/build/args/ffmpeg.gn\") use_remoteexec=true use_siso=true $GN_EXTRA_ARGS"
e build --target electron:electron_ffmpeg_zip -C ../../out/ffmpeg e build --target electron:electron_ffmpeg_zip -C ../../out/ffmpeg
- name: Generate Hunspell Dictionaries ${{ inputs.step-suffix }}
shell: bash
if: ${{ inputs.is-release == 'true' && inputs.target-platform == 'linux' }}
run: |
e build --target electron:hunspell_dictionaries_zip
- name: Generate Libcxx ${{ inputs.step-suffix }}
shell: bash
if: ${{ inputs.is-release == 'true' && inputs.target-platform == 'linux' }}
run: |
e build --target electron:libcxx_headers_zip
e build --target electron:libcxxabi_headers_zip
e build --target electron:libcxx_objects_zip
- name: Remove Clang problem matcher - name: Remove Clang problem matcher
shell: bash shell: bash
run: echo "::remove-matcher owner=clang::" run: echo "::remove-matcher owner=clang::"

View File

@@ -1624,6 +1624,29 @@ group("node_headers") {
public_deps = [ ":tar_node_headers" ] public_deps = [ ":tar_node_headers" ]
} }
group("testing_build") {
public_deps = [
":electron_dist_zip",
":electron_mksnapshot_zip",
":node_headers",
]
}
group("release_build") {
public_deps = [ ":testing_build" ]
if (is_official_build) {
public_deps += [ ":electron_symbols" ]
}
if (is_linux) {
public_deps += [
":hunspell_dictionaries_zip",
":libcxx_headers_zip",
":libcxx_objects_zip",
":libcxxabi_headers_zip",
]
}
}
if (is_linux && is_official_build) { if (is_linux && is_official_build) {
strip_binary("strip_electron_binary") { strip_binary("strip_electron_binary") {
binary_input = "$root_out_dir/$electron_project_name" binary_input = "$root_out_dir/$electron_project_name"

View File

@@ -33,7 +33,9 @@ const gnCheckDirs = [
'//electron:electron_lib', '//electron:electron_lib',
'//electron:electron_app', '//electron:electron_app',
'//electron/shell/common:mojo', '//electron/shell/common:mojo',
'//electron/shell/common:plugin' '//electron/shell/common:plugin',
'//electron:testing_build',
'//electron:release_build'
]; ];
for (const dir of gnCheckDirs) { for (const dir of gnCheckDirs) {