mirror of
https://github.com/electron/electron.git
synced 2026-02-26 03:01:17 -05:00
Compare commits
9 Commits
roller/nod
...
split-ipc-
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3c2d4f626a | ||
|
|
388469f6b5 | ||
|
|
c8aa24969e | ||
|
|
a5dc2bf113 | ||
|
|
0534f9f187 | ||
|
|
f59d8d618a | ||
|
|
6a730a8e80 | ||
|
|
e420260647 | ||
|
|
ed33b9ddca |
@@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
"name": "Electron Core Development Environment",
|
|
||||||
"dockerComposeFile": "docker-compose.yml",
|
"dockerComposeFile": "docker-compose.yml",
|
||||||
"service": "buildtools",
|
"service": "buildtools",
|
||||||
"onCreateCommand": ".devcontainer/on-create-command.sh",
|
"onCreateCommand": ".devcontainer/on-create-command.sh",
|
||||||
@@ -34,15 +33,27 @@
|
|||||||
"surajbarkale.ninja",
|
"surajbarkale.ninja",
|
||||||
"ms-vscode.cpptools",
|
"ms-vscode.cpptools",
|
||||||
"mutantdino.resourcemonitor",
|
"mutantdino.resourcemonitor",
|
||||||
"dsanders11.vscode-electron-build-tools",
|
|
||||||
"dbaeumer.vscode-eslint",
|
"dbaeumer.vscode-eslint",
|
||||||
"shakram02.bash-beautify",
|
"shakram02.bash-beautify",
|
||||||
"marshallofsound.gnls-electron"
|
"marshallofsound.gnls-electron",
|
||||||
],
|
],
|
||||||
"settings": {
|
"settings": {
|
||||||
"editor.tabSize": 2,
|
"editor.tabSize": 2,
|
||||||
"bashBeautify.tabSize": 2,
|
"bashBeautify.tabSize": 2,
|
||||||
"typescript.tsdk": "node_modules/typescript/lib",
|
"typescript.tsdk": "node_modules/typescript/lib",
|
||||||
|
"[gn]": {
|
||||||
|
"editor.formatOnSave": true
|
||||||
|
},
|
||||||
|
"[javascript]": {
|
||||||
|
"editor.codeActionsOnSave": {
|
||||||
|
"source.fixAll.eslint": true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"[typescript]": {
|
||||||
|
"editor.codeActionsOnSave": {
|
||||||
|
"source.fixAll.eslint": true
|
||||||
|
}
|
||||||
|
},
|
||||||
"javascript.preferences.quoteStyle": "single",
|
"javascript.preferences.quoteStyle": "single",
|
||||||
"typescript.preferences.quoteStyle": "single"
|
"typescript.preferences.quoteStyle": "single"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ version: '3'
|
|||||||
|
|
||||||
services:
|
services:
|
||||||
buildtools:
|
buildtools:
|
||||||
image: ghcr.io/electron/devcontainer:a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb
|
image: ghcr.io/electron/devcontainer:77262e58c37631ab082482f42c33cdf68c6c394b
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
- ..:/workspaces/gclient/src/electron:cached
|
- ..:/workspaces/gclient/src/electron:cached
|
||||||
|
|||||||
@@ -58,13 +58,13 @@ if [ ! -f $buildtools/configs/evm.testing.json ]; then
|
|||||||
},
|
},
|
||||||
\"\$schema\": \"file:///home/builduser/.electron_build_tools/evm-config.schema.json\",
|
\"\$schema\": \"file:///home/builduser/.electron_build_tools/evm-config.schema.json\",
|
||||||
\"configValidationLevel\": \"strict\",
|
\"configValidationLevel\": \"strict\",
|
||||||
\"remoteBuild\": \"reclient\",
|
\"reclient\": \"$1\",
|
||||||
\"preserveSDK\": 5
|
\"preserveXcode\": 5
|
||||||
}
|
}
|
||||||
" >$buildtools/configs/evm.testing.json
|
" >$buildtools/configs/evm.testing.json
|
||||||
}
|
}
|
||||||
|
|
||||||
write_config
|
write_config remote_exec
|
||||||
|
|
||||||
e use testing
|
e use testing
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
# These env vars are only necessary for creating Electron releases.
|
# These env vars are only necessary for creating Electron releases.
|
||||||
# See docs/development/releasing.md
|
# See docs/development/releasing.md
|
||||||
|
|
||||||
|
APPVEYOR_CLOUD_TOKEN=
|
||||||
ELECTRON_GITHUB_TOKEN=
|
ELECTRON_GITHUB_TOKEN=
|
||||||
|
|||||||
4
.github/CODEOWNERS
vendored
4
.github/CODEOWNERS
vendored
@@ -8,9 +8,13 @@
|
|||||||
DEPS @electron/wg-upgrades
|
DEPS @electron/wg-upgrades
|
||||||
|
|
||||||
# Releases WG
|
# Releases WG
|
||||||
|
/.github/workflows/update_appveyor_image.yml @electron/wg-releases
|
||||||
/docs/breaking-changes.md @electron/wg-releases
|
/docs/breaking-changes.md @electron/wg-releases
|
||||||
/npm/ @electron/wg-releases
|
/npm/ @electron/wg-releases
|
||||||
/script/release @electron/wg-releases
|
/script/release @electron/wg-releases
|
||||||
|
appveyor.yml @electron/wg-releases
|
||||||
|
appveyor-bake.yml @electron/wg-releases
|
||||||
|
appveyor-woa.yml @electron/wg-releases
|
||||||
|
|
||||||
# Security WG
|
# Security WG
|
||||||
/lib/browser/devtools.ts @electron/wg-security
|
/lib/browser/devtools.ts @electron/wg-security
|
||||||
|
|||||||
12
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
12
.github/ISSUE_TEMPLATE/bug_report.yml
vendored
@@ -58,16 +58,6 @@ body:
|
|||||||
label: Last Known Working Electron version
|
label: Last Known Working Electron version
|
||||||
description: What is the last version of Electron this worked in, if applicable?
|
description: What is the last version of Electron this worked in, if applicable?
|
||||||
placeholder: 16.0.0
|
placeholder: 16.0.0
|
||||||
- type: dropdown
|
|
||||||
attributes:
|
|
||||||
label: Does the issue also appear in Chromium / Google Chrome?
|
|
||||||
description: If it does, please report the issue in the [Chromium issue tracker](https://issues.chromium.org/issues), not against Electron. Electron will inherit the fix once Chromium resolves the issue.
|
|
||||||
options:
|
|
||||||
- I don't know how to test
|
|
||||||
- "Yes"
|
|
||||||
- "No"
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
label: Expected Behavior
|
label: Expected Behavior
|
||||||
@@ -83,7 +73,7 @@ body:
|
|||||||
- type: input
|
- type: input
|
||||||
attributes:
|
attributes:
|
||||||
label: Testcase Gist URL
|
label: Testcase Gist URL
|
||||||
description: Electron maintainers need a standalone test case to reproduce and fix your issue. Please use [Electron Fiddle](https://github.com/electron/fiddle) to create one and to publish it as a [GitHub gist](https://gist.github.com). Then put the gist URL here. Issues without testcase gists receive less attention and might be closed without a maintainer taking a closer look. To maximize how much attention your issue receives, please include a testcase gist right from the start.
|
description: If you can reproduce the issue in a standalone test case, please use [Electron Fiddle](https://github.com/electron/fiddle) to create one and to publish it as a [GitHub gist](https://gist.github.com) and put the gist URL here. This is **the best way** to ensure this issue is triaged quickly.
|
||||||
placeholder: https://gist.github.com/...
|
placeholder: https://gist.github.com/...
|
||||||
- type: textarea
|
- type: textarea
|
||||||
attributes:
|
attributes:
|
||||||
|
|||||||
1
.github/ISSUE_TEMPLATE/config.yml
vendored
1
.github/ISSUE_TEMPLATE/config.yml
vendored
@@ -1,4 +1,3 @@
|
|||||||
blank_issues_enabled: false
|
|
||||||
contact_links:
|
contact_links:
|
||||||
- name: Discord Chat
|
- name: Discord Chat
|
||||||
url: https://discord.gg/APGC3k5yaH
|
url: https://discord.gg/APGC3k5yaH
|
||||||
|
|||||||
14
.github/ISSUE_TEMPLATE/maintainer_issue.yml
vendored
14
.github/ISSUE_TEMPLATE/maintainer_issue.yml
vendored
@@ -1,14 +0,0 @@
|
|||||||
name: Maintainer Issue (not for public use)
|
|
||||||
description: Only to be created by Electron maintainers
|
|
||||||
body:
|
|
||||||
- type: checkboxes
|
|
||||||
attributes:
|
|
||||||
label: Confirmation
|
|
||||||
options:
|
|
||||||
- label: I am a [maintainer](https://github.com/orgs/electron/people) of the Electron project. (If not, please create a [different issue type](https://github.com/electron/electron/issues/new/).)
|
|
||||||
required: true
|
|
||||||
- type: textarea
|
|
||||||
attributes:
|
|
||||||
label: Description
|
|
||||||
validations:
|
|
||||||
required: true
|
|
||||||
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
2
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -13,7 +13,7 @@ Contributors guide: https://github.com/electron/electron/blob/main/CONTRIBUTING.
|
|||||||
- [ ] PR description included and stakeholders cc'd
|
- [ ] PR description included and stakeholders cc'd
|
||||||
- [ ] `npm test` passes
|
- [ ] `npm test` passes
|
||||||
- [ ] tests are [changed or added](https://github.com/electron/electron/blob/main/docs/development/testing.md)
|
- [ ] tests are [changed or added](https://github.com/electron/electron/blob/main/docs/development/testing.md)
|
||||||
- [ ] relevant API documentation, tutorials, and examples are updated and follow the [documentation style guide](https://github.com/electron/electron/blob/main/docs/development/style-guide.md)
|
- [ ] relevant documentation, tutorials, templates and examples are changed or added
|
||||||
- [ ] [PR release notes](https://github.com/electron/clerk/blob/main/README.md) describe the change in a way relevant to app developers, and are [capitalized, punctuated, and past tense](https://github.com/electron/clerk/blob/main/README.md#examples).
|
- [ ] [PR release notes](https://github.com/electron/clerk/blob/main/README.md) describe the change in a way relevant to app developers, and are [capitalized, punctuated, and past tense](https://github.com/electron/clerk/blob/main/README.md#examples).
|
||||||
|
|
||||||
#### Release Notes
|
#### Release Notes
|
||||||
|
|||||||
177
.github/actions/build-electron/action.yml
vendored
177
.github/actions/build-electron/action.yml
vendored
@@ -17,6 +17,9 @@ inputs:
|
|||||||
is-release:
|
is-release:
|
||||||
description: 'Is release build'
|
description: 'Is release build'
|
||||||
required: true
|
required: true
|
||||||
|
strip-binaries:
|
||||||
|
description: 'Strip binaries (Linux only)'
|
||||||
|
required: false
|
||||||
generate-symbols:
|
generate-symbols:
|
||||||
description: 'Generate symbols'
|
description: 'Generate symbols'
|
||||||
required: true
|
required: true
|
||||||
@@ -35,17 +38,7 @@ runs:
|
|||||||
run: |
|
run: |
|
||||||
GN_APPENDED_ARGS="$GN_EXTRA_ARGS target_cpu=\"x64\" v8_snapshot_toolchain=\"//build/toolchain/mac:clang_x64\""
|
GN_APPENDED_ARGS="$GN_EXTRA_ARGS target_cpu=\"x64\" v8_snapshot_toolchain=\"//build/toolchain/mac:clang_x64\""
|
||||||
echo "GN_EXTRA_ARGS=$GN_APPENDED_ARGS" >> $GITHUB_ENV
|
echo "GN_EXTRA_ARGS=$GN_APPENDED_ARGS" >> $GITHUB_ENV
|
||||||
- name: Set GN_EXTRA_ARGS for Windows
|
|
||||||
shell: bash
|
|
||||||
if: ${{inputs.target-arch != 'x64' && inputs.target-platform == 'win' }}
|
|
||||||
run: |
|
|
||||||
GN_APPENDED_ARGS="$GN_EXTRA_ARGS target_cpu=\"${{ inputs.target-arch }}\""
|
|
||||||
echo "GN_EXTRA_ARGS=$GN_APPENDED_ARGS" >> $GITHUB_ENV
|
|
||||||
- name: Add Clang problem matcher
|
|
||||||
shell: bash
|
|
||||||
run: echo "::add-matcher::src/electron/.github/problem-matchers/clang.json"
|
|
||||||
- name: Build Electron ${{ inputs.step-suffix }}
|
- name: Build Electron ${{ inputs.step-suffix }}
|
||||||
if: ${{ inputs.target-platform != 'win' }}
|
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
rm -rf "src/out/Default/Electron Framework.framework"
|
rm -rf "src/out/Default/Electron Framework.framework"
|
||||||
@@ -61,51 +54,22 @@ runs:
|
|||||||
sudo launchctl limit maxfiles 65536 200000
|
sudo launchctl limit maxfiles 65536 200000
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${{ inputs.is-release }}" = "true" ]; then
|
NINJA_SUMMARIZE_BUILD=1 e build -j $NUMBER_OF_NINJA_PROCESSES
|
||||||
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
|
||||||
|
- name: Strip Electron Binaries ${{ inputs.step-suffix }}
|
||||||
# Upload build stats to Datadog
|
shell: bash
|
||||||
if ! [ -z $DD_API_KEY ]; then
|
if: ${{ inputs.strip-binaries == 'true' }}
|
||||||
npx node electron/script/build-stats.mjs out/Default/siso.INFO --upload-stats || true
|
|
||||||
else
|
|
||||||
echo "Skipping build-stats.mjs upload because DD_API_KEY is not set"
|
|
||||||
fi
|
|
||||||
- name: Build Electron (Windows) ${{ inputs.step-suffix }}
|
|
||||||
if: ${{ inputs.target-platform == 'win' }}
|
|
||||||
shell: powershell
|
|
||||||
run: |
|
run: |
|
||||||
cd src\electron
|
cd src
|
||||||
git pack-refs
|
electron/script/copy-debug-symbols.py --target-cpu="${{ inputs.target-arch }}" --out-dir=out/Default/debug --compress
|
||||||
cd ..
|
electron/script/strip-binaries.py --target-cpu="${{ inputs.target-arch }}" --verbose
|
||||||
|
electron/script/add-debug-link.py --target-cpu="${{ inputs.target-arch }}" --debug-dir=out/Default/debug
|
||||||
$env:NINJA_SUMMARIZE_BUILD = 1
|
- name: Build Electron dist.zip ${{ inputs.step-suffix }}
|
||||||
if ("${{ inputs.is-release }}" -eq "true") {
|
|
||||||
e build --target electron:release_build
|
|
||||||
} else {
|
|
||||||
e build --target electron:testing_build
|
|
||||||
}
|
|
||||||
Copy-Item out\Default\.ninja_log out\electron_ninja_log
|
|
||||||
node electron\script\check-symlinks.js
|
|
||||||
|
|
||||||
# Upload build stats to Datadog
|
|
||||||
if ($env:DD_API_KEY) {
|
|
||||||
try {
|
|
||||||
npx node electron\script\build-stats.mjs out\Default\siso.exe.INFO --upload-stats ; $LASTEXITCODE = 0
|
|
||||||
} catch {
|
|
||||||
Write-Host "Build stats upload failed, continuing..."
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
Write-Host "Skipping build-stats.mjs upload because DD_API_KEY is not set"
|
|
||||||
}
|
|
||||||
- name: Verify dist.zip ${{ inputs.step-suffix }}
|
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd src
|
cd src
|
||||||
|
e build --target electron:electron_dist_zip -j $NUMBER_OF_NINJA_PROCESSES -d explain
|
||||||
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
|
||||||
@@ -113,10 +77,11 @@ 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: Fixup Mksnapshot ${{ inputs.step-suffix }}
|
- name: Build Mksnapshot ${{ inputs.step-suffix }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd src
|
cd src
|
||||||
|
e build --target electron:electron_mksnapshot -j $NUMBER_OF_NINJA_PROCESSES
|
||||||
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"
|
||||||
@@ -126,12 +91,24 @@ runs:
|
|||||||
sed $SEDOPTION '/.*builtins-pgo/d' out/Default/mksnapshot_args
|
sed $SEDOPTION '/.*builtins-pgo/d' out/Default/mksnapshot_args
|
||||||
sed $SEDOPTION '/--turbo-profiling-input/d' out/Default/mksnapshot_args
|
sed $SEDOPTION '/--turbo-profiling-input/d' out/Default/mksnapshot_args
|
||||||
|
|
||||||
|
if [ "${{ inputs.target-platform }}" = "linux" ]; then
|
||||||
|
if [ "${{ inputs.target-arch }}" = "arm" ]; then
|
||||||
|
electron/script/strip-binaries.py --file $PWD/out/Default/clang_x86_v8_arm/mksnapshot
|
||||||
|
electron/script/strip-binaries.py --file $PWD/out/Default/clang_x86_v8_arm/v8_context_snapshot_generator
|
||||||
|
elif [ "${{ inputs.target-arch }}" = "arm64" ]; then
|
||||||
|
electron/script/strip-binaries.py --file $PWD/out/Default/clang_x64_v8_arm64/mksnapshot
|
||||||
|
electron/script/strip-binaries.py --file $PWD/out/Default/clang_x64_v8_arm64/v8_context_snapshot_generator
|
||||||
|
else
|
||||||
|
electron/script/strip-binaries.py --file $PWD/out/Default/mksnapshot
|
||||||
|
electron/script/strip-binaries.py --file $PWD/out/Default/v8_context_snapshot_generator
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
e build --target electron:electron_mksnapshot_zip -j $NUMBER_OF_NINJA_PROCESSES
|
||||||
if [ "${{ inputs.target-platform }}" = "win" ]; then
|
if [ "${{ inputs.target-platform }}" = "win" ]; then
|
||||||
cd out/Default
|
cd out/Default
|
||||||
powershell Compress-Archive -update mksnapshot_args mksnapshot.zip
|
powershell Compress-Archive -update mksnapshot_args mksnapshot.zip
|
||||||
powershell mkdir mktmp\\gen\\v8
|
powershell Compress-Archive -update gen/v8/embedded.S mksnapshot.zip
|
||||||
powershell Copy-Item gen\\v8\\embedded.S mktmp\\gen\\v8
|
|
||||||
powershell Compress-Archive -update -Path mktmp\\gen mksnapshot.zip
|
|
||||||
else
|
else
|
||||||
(cd out/Default; zip mksnapshot.zip mksnapshot_args gen/v8/embedded.S)
|
(cd out/Default; zip mksnapshot.zip mksnapshot_args gen/v8/embedded.S)
|
||||||
fi
|
fi
|
||||||
@@ -159,39 +136,24 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd src
|
cd src
|
||||||
|
e build --target electron:electron_chromedriver -j $NUMBER_OF_NINJA_PROCESSES
|
||||||
e build --target electron:electron_chromedriver_zip
|
e build --target electron:electron_chromedriver_zip
|
||||||
|
- name: Build Node.js headers ${{ inputs.step-suffix }}
|
||||||
if [ "${{ inputs.is-asan }}" != "true" ]; then
|
shell: bash
|
||||||
target_os=${{ inputs.target-platform == 'macos' && 'mac' || inputs.target-platform }}
|
run: |
|
||||||
if [ "${{ inputs.artifact-platform }}" = "mas" ]; then
|
cd src
|
||||||
target_os="${target_os}_mas"
|
e build --target electron:node_headers
|
||||||
fi
|
- name: Generate & Zip Symbols ${{ inputs.step-suffix }}
|
||||||
electron/script/zip_manifests/check-zip-manifest.py out/Default/chromedriver.zip electron/script/zip_manifests/chromedriver_zip.$target_os.${{ inputs.target-arch }}.manifest
|
shell: bash
|
||||||
|
run: |
|
||||||
|
# Generate breakpad symbols on release builds
|
||||||
|
if [ "${{ inputs.generate-symbols }}" = "true" ]; then
|
||||||
|
e build --target electron:electron_symbols
|
||||||
fi
|
fi
|
||||||
- name: Create installed_software.json ${{ inputs.step-suffix }}
|
|
||||||
shell: powershell
|
|
||||||
if: ${{ inputs.is-release == 'true' && inputs.target-platform == 'win' }}
|
|
||||||
run: |
|
|
||||||
cd src
|
|
||||||
Get-CimInstance -Namespace root\cimv2 -Class Win32_product | Select vendor, description, @{l='install_location';e='InstallLocation'}, @{l='install_date';e='InstallDate'}, @{l='install_date_2';e='InstallDate2'}, caption, version, name, @{l='sku_number';e='SKUNumber'} | ConvertTo-Json | Out-File -Encoding utf8 -FilePath .\installed_software.json
|
|
||||||
- name: Profile Windows Toolchain ${{ inputs.step-suffix }}
|
|
||||||
shell: bash
|
|
||||||
if: ${{ inputs.is-release == 'true' && inputs.target-platform == 'win' }}
|
|
||||||
run: |
|
|
||||||
cd src
|
|
||||||
python3 electron/build/profile_toolchain.py --output-json=out/Default/windows_toolchain_profile.json
|
|
||||||
- name: Add msdia140.dll to Path ${{ inputs.step-suffix }}
|
|
||||||
shell: bash
|
|
||||||
if: ${{ inputs.is-release == 'true' && inputs.target-platform == 'win' }}
|
|
||||||
run: |
|
|
||||||
# Needed for msdia140.dll on 64-bit windows
|
|
||||||
cd src
|
|
||||||
export PATH="$PATH:$(pwd)/third_party/llvm-build/Release+Asserts/bin"
|
|
||||||
- name: Zip Symbols ${{ inputs.step-suffix }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
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
|
||||||
@@ -202,21 +164,29 @@ runs:
|
|||||||
if: ${{ inputs.is-release == 'true' }}
|
if: ${{ inputs.is-release == 'true' }}
|
||||||
run: |
|
run: |
|
||||||
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 $GN_EXTRA_ARGS"
|
||||||
e build --target electron:electron_ffmpeg_zip -C ../../out/ffmpeg
|
e build --target electron:electron_ffmpeg_zip -C ../../out/ffmpeg -j $NUMBER_OF_NINJA_PROCESSES
|
||||||
- name: Remove Clang problem matcher
|
- name: Generate Hunspell Dictionaries ${{ inputs.step-suffix }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "::remove-matcher owner=clang::"
|
if: ${{ inputs.is-release == 'true' && inputs.target-platform == 'linux' }}
|
||||||
|
run: |
|
||||||
|
e build --target electron:hunspell_dictionaries_zip -j $NUMBER_OF_NINJA_PROCESSES
|
||||||
|
- 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 -j $NUMBER_OF_NINJA_PROCESSES
|
||||||
|
e build --target electron:libcxxabi_headers_zip -j $NUMBER_OF_NINJA_PROCESSES
|
||||||
|
e build --target electron:libcxx_objects_zip -j $NUMBER_OF_NINJA_PROCESSES
|
||||||
- name: Generate TypeScript Definitions ${{ inputs.step-suffix }}
|
- name: Generate TypeScript Definitions ${{ inputs.step-suffix }}
|
||||||
if: ${{ inputs.is-release == 'true' }}
|
if: ${{ inputs.is-release == 'true' }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd src/electron
|
cd src/electron
|
||||||
node script/yarn.js create-typescript-definitions
|
node script/yarn create-typescript-definitions
|
||||||
- name: Publish Electron Dist ${{ inputs.step-suffix }}
|
- name: Publish Electron Dist ${{ inputs.step-suffix }}
|
||||||
if: ${{ inputs.is-release == 'true' }}
|
if: ${{ inputs.is-release == 'true' }}
|
||||||
shell: bash
|
shell: bash
|
||||||
id: github-upload
|
|
||||||
run: |
|
run: |
|
||||||
rm -rf src/out/Default/obj
|
rm -rf src/out/Default/obj
|
||||||
cd src/electron
|
cd src/electron
|
||||||
@@ -227,34 +197,7 @@ runs:
|
|||||||
echo 'Uploading Electron release distribution to GitHub releases'
|
echo 'Uploading Electron release distribution to GitHub releases'
|
||||||
script/release/uploaders/upload.py --verbose
|
script/release/uploaders/upload.py --verbose
|
||||||
fi
|
fi
|
||||||
- name: Generate artifact attestation
|
|
||||||
if: ${{ inputs.is-release == 'true' }}
|
|
||||||
uses: actions/attest-build-provenance@96278af6caaf10aea03fd8d33a09a777ca52d62f # v3.2.0
|
|
||||||
with:
|
|
||||||
subject-path: ${{ steps.github-upload.outputs.UPLOADED_PATHS }}
|
|
||||||
- name: Generate siso report
|
|
||||||
if: ${{ inputs.target-platform != 'win' && !cancelled() }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd src
|
|
||||||
e d siso report -C out/Default > siso_report.txt
|
|
||||||
SISO_REPORT_PATH=$(grep -o '/.*siso-report-[^ ]*' siso_report.txt)
|
|
||||||
echo "SISO_REPORT_PATH=$SISO_REPORT_PATH" >> $GITHUB_ENV
|
|
||||||
cat siso_report.txt
|
|
||||||
echo "SISO REPORT AT $SISO_REPORT_PATH"
|
|
||||||
- name: Generate siso report (Windows)
|
|
||||||
if: ${{ inputs.target-platform == 'win' && !cancelled() }}
|
|
||||||
shell: powershell
|
|
||||||
run: |
|
|
||||||
cd src
|
|
||||||
e d siso report -C out\Default > siso_report.txt
|
|
||||||
$SISO_REPORT_PATH = Get-Content "siso_report.txt" | Select-String "report file:\s*(.+)" | ForEach-Object {
|
|
||||||
$_.Matches.Groups[1].Value.Trim()
|
|
||||||
}
|
|
||||||
echo "SISO_REPORT_PATH=$SISO_REPORT_PATH"
|
|
||||||
echo "SISO_REPORT_PATH=$SISO_REPORT_PATH" >> $env:GITHUB_ENV
|
|
||||||
- name: Generate Artifact Key
|
- name: Generate Artifact Key
|
||||||
if: always() && !cancelled()
|
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
if [ "${{ inputs.is-asan }}" = "true" ]; then
|
if [ "${{ inputs.is-asan }}" = "true" ]; then
|
||||||
@@ -266,11 +209,9 @@ runs:
|
|||||||
# The current generated_artifacts_<< artifact.key >> name was taken from CircleCI
|
# The current generated_artifacts_<< artifact.key >> name was taken from CircleCI
|
||||||
# to ensure we don't break anything, but we may be able to improve that.
|
# to ensure we don't break anything, but we may be able to improve that.
|
||||||
- name: Move all Generated Artifacts to Upload Folder ${{ inputs.step-suffix }}
|
- name: Move all Generated Artifacts to Upload Folder ${{ inputs.step-suffix }}
|
||||||
if: always() && !cancelled()
|
|
||||||
shell: bash
|
shell: bash
|
||||||
run: ./src/electron/script/actions/move-artifacts.sh
|
run: ./src/electron/script/actions/move-artifacts.sh
|
||||||
- name: Upload Generated Artifacts ${{ inputs.step-suffix }}
|
- name: Upload Generated Artifacts ${{ inputs.step-suffix }}
|
||||||
if: always() && !cancelled()
|
|
||||||
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
|
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808
|
||||||
with:
|
with:
|
||||||
name: generated_artifacts_${{ env.ARTIFACT_KEY }}
|
name: generated_artifacts_${{ env.ARTIFACT_KEY }}
|
||||||
|
|||||||
83
.github/actions/build-git-cache/action.yml
vendored
83
.github/actions/build-git-cache/action.yml
vendored
@@ -1,83 +0,0 @@
|
|||||||
name: 'Build Git Cache'
|
|
||||||
description: 'Runs a gclient sync to build the git cache for Electron'
|
|
||||||
inputs:
|
|
||||||
target-platform:
|
|
||||||
description: 'Target platform, should be linux, win, macos'
|
|
||||||
runs:
|
|
||||||
using: "composite"
|
|
||||||
steps:
|
|
||||||
- name: Set GIT_CACHE_PATH to make gclient to use the cache
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "GIT_CACHE_PATH=$(pwd)/git-cache" >> $GITHUB_ENV
|
|
||||||
- name: Set Chromium Git Cookie
|
|
||||||
uses: ./src/electron/.github/actions/set-chromium-cookie
|
|
||||||
- name: Install Build Tools
|
|
||||||
uses: ./src/electron/.github/actions/install-build-tools
|
|
||||||
- name: Set up cache drive
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
if [ "${{ inputs.target-platform }}" = "win" ]; then
|
|
||||||
echo "CACHE_DRIVE=/mnt/win-cache" >> $GITHUB_ENV
|
|
||||||
else
|
|
||||||
echo "CACHE_DRIVE=/mnt/cross-instance-cache" >> $GITHUB_ENV
|
|
||||||
fi
|
|
||||||
- name: Check cross instance cache disk space
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
# if there is less than 35 GB free space then creating the cache might fail so exit early
|
|
||||||
freespace=`df -m $CACHE_DRIVE | grep -w $CACHE_DRIVE | awk '{print $4}'`
|
|
||||||
freespace_human=`df -h $CACHE_DRIVE | grep -w $CACHE_DRIVE | awk '{print $4}'`
|
|
||||||
if [ $freespace -le 35000 ]; then
|
|
||||||
echo "The cross mount cache has $freespace_human free space which is not enough - exiting"
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
echo "The cross mount cache has $freespace_human free space - continuing"
|
|
||||||
fi
|
|
||||||
- name: Restore gitcache
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
GIT_CACHE_TAR="$CACHE_DRIVE/gitcache.tar"
|
|
||||||
if [ ! -f "$GIT_CACHE_TAR" ]; then
|
|
||||||
echo "Git cache tar file does not exist, skipping restore"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
echo "Restoring git cache from $GIT_CACHE_TAR to $GIT_CACHE_PATH"
|
|
||||||
mkdir -p $GIT_CACHE_PATH
|
|
||||||
tar -xf $GIT_CACHE_TAR -C $GIT_CACHE_PATH
|
|
||||||
- name: Gclient Sync
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
e d gclient config \
|
|
||||||
--name "src/electron" \
|
|
||||||
--unmanaged \
|
|
||||||
${GCLIENT_EXTRA_ARGS} \
|
|
||||||
"$GITHUB_SERVER_URL/$GITHUB_REPOSITORY"
|
|
||||||
|
|
||||||
if [ "$TARGET_OS" != "" ]; then
|
|
||||||
echo "target_os=['$TARGET_OS']" >> ./.gclient
|
|
||||||
fi
|
|
||||||
|
|
||||||
ELECTRON_USE_THREE_WAY_MERGE_FOR_PATCHES=1 e d gclient sync --with_branch_heads --with_tags --nohooks -vv
|
|
||||||
- name: Compress Git Cache Directory
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "Uncompressed gitcache size: $(du -sh $GIT_CACHE_PATH | cut -f1 -d' ')"
|
|
||||||
cd $GIT_CACHE_PATH
|
|
||||||
tar -cf ../gitcache.tar .
|
|
||||||
cd ..
|
|
||||||
echo "Compressed gitcache to $(du -sh gitcache.tar | cut -f1 -d' ')"
|
|
||||||
# remove the old cache file if it exists
|
|
||||||
if [ -f $CACHE_DRIVE/gitcache.tar ]; then
|
|
||||||
echo "Removing old gitcache.tar from $CACHE_DRIVE"
|
|
||||||
rm $CACHE_DRIVE/gitcache.tar
|
|
||||||
fi
|
|
||||||
cp ./gitcache.tar $CACHE_DRIVE/
|
|
||||||
- name: Wait for active SSH sessions
|
|
||||||
shell: bash
|
|
||||||
if: always() && !cancelled()
|
|
||||||
run: |
|
|
||||||
while [ -f /var/.ssh-lock ]
|
|
||||||
do
|
|
||||||
sleep 60
|
|
||||||
done
|
|
||||||
106
.github/actions/checkout/action.yml
vendored
106
.github/actions/checkout/action.yml
vendored
@@ -9,8 +9,6 @@ inputs:
|
|||||||
description: 'Whether to persist the cache to the shared drive'
|
description: 'Whether to persist the cache to the shared drive'
|
||||||
required: false
|
required: false
|
||||||
default: 'true'
|
default: 'true'
|
||||||
target-platform:
|
|
||||||
description: 'Target platform, should be linux, win, macos'
|
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
@@ -20,34 +18,38 @@ runs:
|
|||||||
echo "GIT_CACHE_PATH=$(pwd)/git-cache" >> $GITHUB_ENV
|
echo "GIT_CACHE_PATH=$(pwd)/git-cache" >> $GITHUB_ENV
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
uses: ./src/electron/.github/actions/install-dependencies
|
uses: ./src/electron/.github/actions/install-dependencies
|
||||||
- name: Set Chromium Git Cookie
|
|
||||||
uses: ./src/electron/.github/actions/set-chromium-cookie
|
|
||||||
- name: Install Build Tools
|
- name: Install Build Tools
|
||||||
uses: ./src/electron/.github/actions/install-build-tools
|
uses: ./src/electron/.github/actions/install-build-tools
|
||||||
|
- name: Get Depot Tools
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
if [[ ! -d depot_tools ]]; then
|
||||||
|
git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||||
|
|
||||||
|
# Ensure depot_tools does not update.
|
||||||
|
test -d depot_tools && cd depot_tools
|
||||||
|
touch .disable_auto_update
|
||||||
|
fi
|
||||||
|
- name: Add Depot Tools to PATH
|
||||||
|
shell: bash
|
||||||
|
run: echo "$(pwd)/depot_tools" >> $GITHUB_PATH
|
||||||
- name: Generate DEPS Hash
|
- name: Generate DEPS Hash
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
node src/electron/script/generate-deps-hash.js
|
node src/electron/script/generate-deps-hash.js
|
||||||
DEPSHASH="v1-src-cache-$(cat src/electron/.depshash)"
|
echo "DEPSHASH=v1-src-cache-$(cat src/electron/.depshash)" >> $GITHUB_ENV
|
||||||
echo "DEPSHASH=$DEPSHASH" >> $GITHUB_ENV
|
|
||||||
echo "CACHE_FILE=$DEPSHASH.tar" >> $GITHUB_ENV
|
|
||||||
if [ "${{ inputs.target-platform }}" = "win" ]; then
|
|
||||||
echo "CACHE_DRIVE=/mnt/win-cache" >> $GITHUB_ENV
|
|
||||||
else
|
|
||||||
echo "CACHE_DRIVE=/mnt/cross-instance-cache" >> $GITHUB_ENV
|
|
||||||
fi
|
|
||||||
- name: Generate SAS Key
|
- name: Generate SAS Key
|
||||||
if: ${{ inputs.generate-sas-token == 'true' }}
|
if: ${{ inputs.generate-sas-token == 'true' }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
curl --unix-socket /var/run/sas/sas.sock --fail "http://foo/$CACHE_FILE?platform=${{ inputs.target-platform }}&getAccountName=true" > sas-token
|
curl --unix-socket /var/run/sas/sas.sock --fail "http://foo/$DEPSHASH.tar" > sas-token
|
||||||
- name: Save SAS Key
|
- name: Save SAS Key
|
||||||
if: ${{ inputs.generate-sas-token == 'true' }}
|
if: ${{ inputs.generate-sas-token == 'true' }}
|
||||||
uses: actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
|
uses: actions/cache/save@v4
|
||||||
with:
|
with:
|
||||||
path: sas-token
|
path: |
|
||||||
key: sas-key-${{ inputs.target-platform }}-${{ github.run_number }}-${{ github.run_attempt }}
|
sas-token
|
||||||
enableCrossOsArchive: true
|
key: sas-key-${{ github.run_number }}-${{ github.run_attempt }}
|
||||||
- name: Check If Cache Exists
|
- name: Check If Cache Exists
|
||||||
id: check-cache
|
id: check-cache
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -56,7 +58,7 @@ runs:
|
|||||||
echo "Not using cache this time..."
|
echo "Not using cache this time..."
|
||||||
echo "cache_exists=false" >> $GITHUB_OUTPUT
|
echo "cache_exists=false" >> $GITHUB_OUTPUT
|
||||||
else
|
else
|
||||||
cache_path=$CACHE_DRIVE/$CACHE_FILE
|
cache_path=/mnt/cross-instance-cache/$DEPSHASH.tar
|
||||||
echo "Using cache key: $DEPSHASH"
|
echo "Using cache key: $DEPSHASH"
|
||||||
echo "Checking for cache in: $cache_path"
|
echo "Checking for cache in: $cache_path"
|
||||||
if [ ! -f "$cache_path" ] || [ `du $cache_path | cut -f1` = "0" ]; then
|
if [ ! -f "$cache_path" ] || [ `du $cache_path | cut -f1` = "0" ]; then
|
||||||
@@ -71,30 +73,15 @@ runs:
|
|||||||
if: steps.check-cache.outputs.cache_exists == 'false' && inputs.use-cache == 'true'
|
if: steps.check-cache.outputs.cache_exists == 'false' && inputs.use-cache == 'true'
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
# if there is less than 35 GB free space then creating the cache might fail so exit early
|
# if there is less than 20 GB free space then creating the cache might fail so exit early
|
||||||
freespace=`df -m $CACHE_DRIVE | grep -w $CACHE_DRIVE | awk '{print $4}'`
|
freespace=`df -m /mnt/cross-instance-cache | grep -w /mnt/cross-instance-cache | awk '{print $4}'`
|
||||||
freespace_human=`df -h $CACHE_DRIVE | grep -w $CACHE_DRIVE | awk '{print $4}'`
|
freespace_human=`df -h /mnt/cross-instance-cache | grep -w /mnt/cross-instance-cache | awk '{print $4}'`
|
||||||
if [ $freespace -le 35000 ]; then
|
if [ $freespace -le 20000 ]; then
|
||||||
echo "The cross mount cache has $freespace_human free space which is not enough - exiting"
|
echo "The cross mount cache has $freespace_human free space which is not enough - exiting"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
echo "The cross mount cache has $freespace_human free space - continuing"
|
echo "The cross mount cache has $freespace_human free space - continuing"
|
||||||
fi
|
fi
|
||||||
- name: Add patch conflict problem matcher
|
|
||||||
shell: bash
|
|
||||||
run: echo "::add-matcher::src/electron/.github/problem-matchers/patch-conflict.json"
|
|
||||||
- name: Restore gitcache
|
|
||||||
if: steps.check-cache.outputs.cache_exists == 'false'
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
GIT_CACHE_TAR="$CACHE_DRIVE/gitcache.tar"
|
|
||||||
if [ ! -f "$GIT_CACHE_TAR" ]; then
|
|
||||||
echo "Git cache tar file does not exist, skipping restore"
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
echo "Restoring git cache from $GIT_CACHE_TAR to $GIT_CACHE_PATH"
|
|
||||||
mkdir -p $GIT_CACHE_PATH
|
|
||||||
tar -xf $GIT_CACHE_TAR -C $GIT_CACHE_PATH
|
|
||||||
- name: Gclient Sync
|
- name: Gclient Sync
|
||||||
if: steps.check-cache.outputs.cache_exists == 'false'
|
if: steps.check-cache.outputs.cache_exists == 'false'
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -110,14 +97,19 @@ runs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
ELECTRON_USE_THREE_WAY_MERGE_FOR_PATCHES=1 e d gclient sync --with_branch_heads --with_tags -vv
|
ELECTRON_USE_THREE_WAY_MERGE_FOR_PATCHES=1 e d gclient sync --with_branch_heads --with_tags -vv
|
||||||
if [[ "${{ inputs.is-release }}" != "true" ]]; then
|
if [ "${{ inputs.is-release }}" != "true" && -n "${{ env.PATCH_UP_APP_CREDS }}" ]; then
|
||||||
# Re-export all the patches to check if there were changes.
|
# Re-export all the patches to check if there were changes.
|
||||||
python3 src/electron/script/export_all_patches.py src/electron/patches/config.json
|
python3 src/electron/script/export_all_patches.py src/electron/patches/config.json
|
||||||
cd src/electron
|
cd src/electron
|
||||||
git update-index --refresh || true
|
git update-index --refresh || true
|
||||||
if ! git diff-index --quiet HEAD --; then
|
if ! git diff-index --quiet HEAD --; then
|
||||||
# There are changes to the patches. Make a git commit with the updated patches
|
# There are changes to the patches. Make a git commit with the updated patches
|
||||||
if node ./script/patch-up.js; then
|
git add patches
|
||||||
|
GIT_COMMITTER_NAME="PatchUp" GIT_COMMITTER_EMAIL="73610968+patchup[bot]@users.noreply.github.com" git commit -m "chore: update patches" --author="PatchUp <73610968+patchup[bot]@users.noreply.github.com>"
|
||||||
|
# Export it
|
||||||
|
mkdir -p ../../patches
|
||||||
|
git format-patch -1 --stdout --keep-subject --no-stat --full-index > ../../patches/update-patches.patch
|
||||||
|
if node ./script/push-patch.js; then
|
||||||
echo
|
echo
|
||||||
echo "======================================================================"
|
echo "======================================================================"
|
||||||
echo "Changes to the patches when applying, we have auto-pushed the diff to the current branch"
|
echo "Changes to the patches when applying, we have auto-pushed the diff to the current branch"
|
||||||
@@ -125,11 +117,6 @@ runs:
|
|||||||
echo "======================================================================"
|
echo "======================================================================"
|
||||||
exit 1
|
exit 1
|
||||||
else
|
else
|
||||||
git add patches
|
|
||||||
GIT_COMMITTER_NAME="PatchUp" GIT_COMMITTER_EMAIL="73610968+patchup[bot]@users.noreply.github.com" git commit -m "chore: update patches" --author="PatchUp <73610968+patchup[bot]@users.noreply.github.com>"
|
|
||||||
# Export it
|
|
||||||
mkdir -p ../../patches
|
|
||||||
git format-patch -1 --stdout --keep-subject --no-stat --full-index > ../../patches/update-patches.patch
|
|
||||||
echo
|
echo
|
||||||
echo "======================================================================"
|
echo "======================================================================"
|
||||||
echo "There were changes to the patches when applying."
|
echo "There were changes to the patches when applying."
|
||||||
@@ -139,21 +126,9 @@ runs:
|
|||||||
cat ../../patches/update-patches.patch
|
cat ../../patches/update-patches.patch
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
else
|
|
||||||
echo "No changes to patches detected"
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
- name: Remove patch conflict problem matchers
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "::remove-matcher owner=merge-conflict::"
|
|
||||||
echo "::remove-matcher owner=patch-conflict::"
|
|
||||||
echo "::remove-matcher owner=patch-needs-update::"
|
|
||||||
- name: Upload patches stats
|
|
||||||
if: ${{ inputs.target-platform == 'linux' && github.ref == 'refs/heads/main' }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
node src/electron/script/patches-stats.mjs --upload-stats || true
|
|
||||||
# delete all .git directories under src/ except for
|
# delete all .git directories under src/ except for
|
||||||
# third_party/angle/ and third_party/dawn/ because of build time generation of files
|
# third_party/angle/ and third_party/dawn/ because of build time generation of files
|
||||||
# gen/angle/commit.h depends on third_party/angle/.git/HEAD
|
# gen/angle/commit.h depends on third_party/angle/.git/HEAD
|
||||||
@@ -173,6 +148,7 @@ runs:
|
|||||||
run: |
|
run: |
|
||||||
rm -rf src/android_webview
|
rm -rf src/android_webview
|
||||||
rm -rf src/ios/chrome
|
rm -rf src/ios/chrome
|
||||||
|
rm -rf src/third_party/blink/web_tests
|
||||||
rm -rf src/third_party/blink/perf_tests
|
rm -rf src/third_party/blink/perf_tests
|
||||||
rm -rf src/chrome/test/data/xr/webvr_info
|
rm -rf src/chrome/test/data/xr/webvr_info
|
||||||
rm -rf src/third_party/angle/third_party/VK-GL-CTS/src
|
rm -rf src/third_party/angle/third_party/VK-GL-CTS/src
|
||||||
@@ -187,14 +163,14 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "Uncompressed src size: $(du -sh src | cut -f1 -d' ')"
|
echo "Uncompressed src size: $(du -sh src | cut -f1 -d' ')"
|
||||||
tar -cf $CACHE_FILE src
|
tar -cf $DEPSHASH.tar src
|
||||||
echo "Compressed src to $(du -sh $CACHE_FILE | cut -f1 -d' ')"
|
echo "Compressed src to $(du -sh $DEPSHASH.tar | cut -f1 -d' ')"
|
||||||
cp ./$CACHE_FILE $CACHE_DRIVE/
|
cp ./$DEPSHASH.tar /mnt/cross-instance-cache/
|
||||||
- name: Persist Src Cache
|
- name: Persist Src Cache
|
||||||
if: ${{ steps.check-cache.outputs.cache_exists == 'false' && inputs.use-cache == 'true' }}
|
if: ${{ steps.check-cache.outputs.cache_exists == 'false' && inputs.use-cache == 'true' }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
final_cache_path=$CACHE_DRIVE/$CACHE_FILE
|
final_cache_path=/mnt/cross-instance-cache/$DEPSHASH.tar
|
||||||
echo "Using cache key: $DEPSHASH"
|
echo "Using cache key: $DEPSHASH"
|
||||||
echo "Checking path: $final_cache_path"
|
echo "Checking path: $final_cache_path"
|
||||||
if [ ! -f "$final_cache_path" ]; then
|
if [ ! -f "$final_cache_path" ]; then
|
||||||
@@ -203,11 +179,3 @@ runs:
|
|||||||
else
|
else
|
||||||
echo "Cache key persisted in $final_cache_path"
|
echo "Cache key persisted in $final_cache_path"
|
||||||
fi
|
fi
|
||||||
- name: Wait for active SSH sessions
|
|
||||||
shell: bash
|
|
||||||
if: always() && !cancelled()
|
|
||||||
run: |
|
|
||||||
while [ -f /var/.ssh-lock ]
|
|
||||||
do
|
|
||||||
sleep 60
|
|
||||||
done
|
|
||||||
|
|||||||
51
.github/actions/cipd-install/action.yml
vendored
51
.github/actions/cipd-install/action.yml
vendored
@@ -1,51 +0,0 @@
|
|||||||
name: 'CIPD install'
|
|
||||||
description: 'Installs the specified CIPD package'
|
|
||||||
inputs:
|
|
||||||
cipd-root-prefix-path:
|
|
||||||
description: 'Path to prepend to installation directory'
|
|
||||||
default: ''
|
|
||||||
dependency:
|
|
||||||
description: 'Name of dependency to install'
|
|
||||||
deps-file:
|
|
||||||
description: 'Location of DEPS file that defines the dependency'
|
|
||||||
installation-dir:
|
|
||||||
description: 'Location to install dependency'
|
|
||||||
target-platform:
|
|
||||||
description: 'Target platform, should be linux, win, macos'
|
|
||||||
package:
|
|
||||||
description: 'Package to install'
|
|
||||||
dependency-version:
|
|
||||||
description: 'Version of the dependency to install'
|
|
||||||
default: ''
|
|
||||||
runs:
|
|
||||||
using: "composite"
|
|
||||||
steps:
|
|
||||||
- name: Delete wrong ${{ inputs.dependency }}
|
|
||||||
shell: bash
|
|
||||||
run : |
|
|
||||||
rm -rf ${{ inputs.cipd-root-prefix-path }}${{ inputs.installation-dir }}
|
|
||||||
- name: Create ensure file for ${{ inputs.dependency }}
|
|
||||||
if: ${{ inputs.dependency-version == '' }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo '${{ inputs.package }}' `e d gclient getdep --deps-file=${{ inputs.deps-file }} -r '${{ inputs.installation-dir }}:${{ inputs.package }}'` > ${{ inputs.dependency }}_ensure_file
|
|
||||||
cat ${{ inputs.dependency }}_ensure_file
|
|
||||||
|
|
||||||
- name: Create ensure file for ${{ inputs.dependency }} from dependency-version
|
|
||||||
if: ${{ inputs.dependency-version != '' }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo '${{ inputs.package }} ${{ inputs.dependency-version }}' > ${{ inputs.dependency }}_ensure_file
|
|
||||||
cat ${{ inputs.dependency }}_ensure_file
|
|
||||||
- name: CIPD installation of ${{ inputs.dependency }} (macOS)
|
|
||||||
if: ${{ inputs.target-platform != 'win' }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "ensuring ${{ inputs.dependency }}"
|
|
||||||
e d cipd ensure --root ${{ inputs.cipd-root-prefix-path }}${{ inputs.installation-dir }} -ensure-file ${{ inputs.dependency }}_ensure_file
|
|
||||||
- name: CIPD installation of ${{ inputs.dependency }} (Windows)
|
|
||||||
if: ${{ inputs.target-platform == 'win' }}
|
|
||||||
shell: powershell
|
|
||||||
run: |
|
|
||||||
echo "ensuring ${{ inputs.dependency }} on Windows"
|
|
||||||
e d cipd ensure --root ${{ inputs.cipd-root-prefix-path }}${{ inputs.installation-dir }} -ensure-file ${{ inputs.dependency }}_ensure_file
|
|
||||||
61
.github/actions/fix-sync-macos/action.yml
vendored
Normal file
61
.github/actions/fix-sync-macos/action.yml
vendored
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
name: 'Fix Sync macOS'
|
||||||
|
description: 'Checks out Electron and stores it in the AKS Cache'
|
||||||
|
runs:
|
||||||
|
using: "composite"
|
||||||
|
steps:
|
||||||
|
- name: Fix Sync
|
||||||
|
shell: bash
|
||||||
|
# This step is required to correct for differences between "gclient sync"
|
||||||
|
# on Linux and the expected state on macOS. This requires:
|
||||||
|
# 1. Fixing Clang Install (wrong binary)
|
||||||
|
# 2. Fixing esbuild (wrong binary)
|
||||||
|
# 3. Fixing rustc (wrong binary)
|
||||||
|
# 4. Fixing gn (wrong binary)
|
||||||
|
# 5. Fix reclient (wrong binary)
|
||||||
|
# 6. Fixing dsymutil (wrong binary)
|
||||||
|
# 7. Ensuring we are using the correct ninja and adding it to PATH
|
||||||
|
# 8. Fixing angle (wrong remote)
|
||||||
|
run : |
|
||||||
|
SEDOPTION="-i ''"
|
||||||
|
rm -rf src/third_party/llvm-build
|
||||||
|
python3 src/tools/clang/scripts/update.py
|
||||||
|
|
||||||
|
echo 'infra/3pp/tools/esbuild/${platform}' `gclient getdep --deps-file=src/third_party/devtools-frontend/src/DEPS -r 'third_party/esbuild:infra/3pp/tools/esbuild/${platform}'` > esbuild_ensure_file
|
||||||
|
# Remove extra output from calling gclient getdep which always calls update_depot_tools
|
||||||
|
sed -i '' "s/Updating depot_tools... //g" esbuild_ensure_file
|
||||||
|
cipd ensure --root src/third_party/devtools-frontend/src/third_party/esbuild -ensure-file esbuild_ensure_file
|
||||||
|
|
||||||
|
rm -rf src/third_party/rust-toolchain
|
||||||
|
python3 src/tools/rust/update_rust.py
|
||||||
|
|
||||||
|
# Prevent calling gclient getdep which always calls update_depot_tools
|
||||||
|
echo 'gn/gn/mac-${arch}' `gclient getdep --deps-file=src/DEPS -r 'src/buildtools/mac:gn/gn/mac-${arch}'` > gn_ensure_file
|
||||||
|
sed -i '' "s/Updating depot_tools... //g" gn_ensure_file
|
||||||
|
cipd ensure --root src/buildtools/mac -ensure-file gn_ensure_file
|
||||||
|
|
||||||
|
# Prevent calling gclient getdep which always calls update_depot_tools
|
||||||
|
echo 'infra/rbe/client/${platform}' `gclient getdep --deps-file=src/DEPS -r 'src/buildtools/reclient:infra/rbe/client/${platform}'` > gn_ensure_file
|
||||||
|
sed -i '' "s/Updating depot_tools... //g" gn_ensure_file
|
||||||
|
cipd ensure --root src/buildtools/reclient -ensure-file gn_ensure_file
|
||||||
|
python3 src/buildtools/reclient_cfgs/configure_reclient_cfgs.py --rbe_instance "projects/rbe-chrome-untrusted/instances/default_instance" --reproxy_cfg_template reproxy.cfg.template --rewrapper_cfg_project "" --skip_remoteexec_cfg_fetch
|
||||||
|
|
||||||
|
if [ "${{ env.TARGET_ARCH }}" == "arm64" ]; then
|
||||||
|
DSYM_SHA_FILE=src/tools/clang/dsymutil/bin/dsymutil.arm64.sha1
|
||||||
|
else
|
||||||
|
DSYM_SHA_FILE=src/tools/clang/dsymutil/bin/dsymutil.x64.sha1
|
||||||
|
fi
|
||||||
|
python3 src/third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth --bucket chromium-browser-clang -s $DSYM_SHA_FILE -o src/tools/clang/dsymutil/bin/dsymutil
|
||||||
|
|
||||||
|
echo 'infra/3pp/tools/ninja/${platform}' `gclient getdep --deps-file=src/DEPS -r 'src/third_party/ninja:infra/3pp/tools/ninja/${platform}'` > ninja_ensure_file
|
||||||
|
sed $SEDOPTION "s/Updating depot_tools... //g" ninja_ensure_file
|
||||||
|
cipd ensure --root src/third_party/ninja -ensure-file ninja_ensure_file
|
||||||
|
|
||||||
|
echo "$(pwd)/src/third_party/ninja" >> $GITHUB_PATH
|
||||||
|
|
||||||
|
cd src/third_party/angle
|
||||||
|
rm -f .git/objects/info/alternates
|
||||||
|
git remote set-url origin https://chromium.googlesource.com/angle/angle.git
|
||||||
|
cp .git/config .git/config.backup
|
||||||
|
git remote remove origin
|
||||||
|
mv .git/config.backup .git/config
|
||||||
|
git fetch
|
||||||
138
.github/actions/fix-sync/action.yml
vendored
138
.github/actions/fix-sync/action.yml
vendored
@@ -1,138 +0,0 @@
|
|||||||
name: 'Fix Sync'
|
|
||||||
description: 'Ensures proper binaries are in place'
|
|
||||||
# This action is required to correct for differences between "gclient sync"
|
|
||||||
# on Linux and the expected state on macOS/windows. This requires:
|
|
||||||
# 1. Fixing Clang Install (wrong binary)
|
|
||||||
# 2. Fixing esbuild (wrong binary)
|
|
||||||
# 3. Fixing rustc (wrong binary)
|
|
||||||
# 4. Fixing gn (wrong binary)
|
|
||||||
# 5. Fix reclient (wrong binary)
|
|
||||||
# 6. Fixing dsymutil (wrong binary)
|
|
||||||
# 7. Ensuring we are using the correct ninja and adding it to PATH
|
|
||||||
# 8. Fixing angle (wrong remote)
|
|
||||||
# 9. Install windows toolchain on Windows
|
|
||||||
# 10. Fix node binary on Windows
|
|
||||||
# 11. Fix rc binary on Windows
|
|
||||||
inputs:
|
|
||||||
target-platform:
|
|
||||||
description: 'Target platform, should be linux, win, macos'
|
|
||||||
runs:
|
|
||||||
using: "composite"
|
|
||||||
steps:
|
|
||||||
- name: Fix llvm toolchain
|
|
||||||
if: ${{ inputs.target-platform != 'linux' }}
|
|
||||||
shell: bash
|
|
||||||
run : |
|
|
||||||
rm -rf src/third_party/llvm-build
|
|
||||||
python3 src/tools/clang/scripts/update.py
|
|
||||||
# Refs https://chromium-review.googlesource.com/c/chromium/src/+/6667681
|
|
||||||
python3 src/tools/clang/scripts/update.py --package objdump
|
|
||||||
- name: Fix esbuild
|
|
||||||
if: ${{ inputs.target-platform != 'linux' }}
|
|
||||||
uses: ./src/electron/.github/actions/cipd-install
|
|
||||||
with:
|
|
||||||
cipd-root-prefix-path: src/third_party/devtools-frontend/src/
|
|
||||||
dependency: esbuild
|
|
||||||
deps-file: src/third_party/devtools-frontend/src/DEPS
|
|
||||||
installation-dir: third_party/esbuild
|
|
||||||
target-platform: ${{ inputs.target-platform }}
|
|
||||||
package: infra/3pp/tools/esbuild/${platform}
|
|
||||||
- name: Fix rustc
|
|
||||||
if: ${{ inputs.target-platform != 'linux' }}
|
|
||||||
shell: bash
|
|
||||||
run : |
|
|
||||||
rm -rf src/third_party/rust-toolchain
|
|
||||||
python3 src/tools/rust/update_rust.py
|
|
||||||
- name: Fix gn (macOS)
|
|
||||||
if: ${{ inputs.target-platform == 'macos' }}
|
|
||||||
uses: ./src/electron/.github/actions/cipd-install
|
|
||||||
with:
|
|
||||||
dependency: gn
|
|
||||||
deps-file: src/DEPS
|
|
||||||
installation-dir: src/buildtools/mac
|
|
||||||
target-platform: ${{ inputs.target-platform }}
|
|
||||||
package: gn/gn/mac-${arch}
|
|
||||||
- name: Fix gn (Windows)
|
|
||||||
if: ${{ inputs.target-platform == 'win' }}
|
|
||||||
uses: ./src/electron/.github/actions/cipd-install
|
|
||||||
with:
|
|
||||||
dependency: gn
|
|
||||||
deps-file: src/DEPS
|
|
||||||
installation-dir: src/buildtools/win
|
|
||||||
target-platform: ${{ inputs.target-platform }}
|
|
||||||
package: gn/gn/windows-amd64
|
|
||||||
- name: Fix reclient
|
|
||||||
if: ${{ inputs.target-platform != 'linux' }}
|
|
||||||
uses: ./src/electron/.github/actions/cipd-install
|
|
||||||
with:
|
|
||||||
dependency: reclient
|
|
||||||
deps-file: src/DEPS
|
|
||||||
installation-dir: src/buildtools/reclient
|
|
||||||
target-platform: ${{ inputs.target-platform }}
|
|
||||||
package: infra/rbe/client/${platform}
|
|
||||||
- name: Configure reclient configs
|
|
||||||
if: ${{ inputs.target-platform != 'linux' }}
|
|
||||||
shell: bash
|
|
||||||
run : |
|
|
||||||
python3 src/buildtools/reclient_cfgs/configure_reclient_cfgs.py --rbe_instance "projects/rbe-chrome-untrusted/instances/default_instance" --reproxy_cfg_template reproxy.cfg.template --rewrapper_cfg_project "" --skip_remoteexec_cfg_fetch
|
|
||||||
- name: Fix dsymutil (macOS)
|
|
||||||
if: ${{ inputs.target-platform == 'macos' }}
|
|
||||||
shell: bash
|
|
||||||
run : |
|
|
||||||
# Fix dsymutil
|
|
||||||
if [ "${{ inputs.target-platform }}" = "macos" ]; then
|
|
||||||
if [ "${{ env.TARGET_ARCH }}" == "arm64" ]; then
|
|
||||||
DSYM_SHA_FILE=src/tools/clang/dsymutil/bin/dsymutil.arm64.sha1
|
|
||||||
else
|
|
||||||
DSYM_SHA_FILE=src/tools/clang/dsymutil/bin/dsymutil.x64.sha1
|
|
||||||
fi
|
|
||||||
python3 src/third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth --bucket chromium-browser-clang -s $DSYM_SHA_FILE -o src/tools/clang/dsymutil/bin/dsymutil
|
|
||||||
fi
|
|
||||||
- name: Fix ninja
|
|
||||||
if: ${{ inputs.target-platform != 'linux' }}
|
|
||||||
uses: ./src/electron/.github/actions/cipd-install
|
|
||||||
with:
|
|
||||||
dependency: ninja
|
|
||||||
deps-file: src/DEPS
|
|
||||||
installation-dir: src/third_party/ninja
|
|
||||||
target-platform: ${{ inputs.target-platform }}
|
|
||||||
package: infra/3pp/tools/ninja/${platform}
|
|
||||||
- name: Set ninja in path
|
|
||||||
if: ${{ inputs.target-platform != 'linux' }}
|
|
||||||
shell: bash
|
|
||||||
run : |
|
|
||||||
echo "$(pwd)/src/third_party/ninja" >> $GITHUB_PATH
|
|
||||||
- name: Fix siso
|
|
||||||
uses: ./src/electron/.github/actions/cipd-install
|
|
||||||
with:
|
|
||||||
dependency: siso
|
|
||||||
deps-file: src/DEPS
|
|
||||||
installation-dir: src/third_party/siso/cipd
|
|
||||||
target-platform: ${{ inputs.target-platform }}
|
|
||||||
package: build/siso/${platform}
|
|
||||||
- name: Fixup angle git
|
|
||||||
if: ${{ inputs.target-platform != 'linux' }}
|
|
||||||
shell: bash
|
|
||||||
run : |
|
|
||||||
cd src/third_party/angle
|
|
||||||
rm -f .git/objects/info/alternates
|
|
||||||
git remote set-url origin https://chromium.googlesource.com/angle/angle.git
|
|
||||||
cp .git/config .git/config.backup
|
|
||||||
git remote remove origin
|
|
||||||
mv .git/config.backup .git/config
|
|
||||||
git fetch
|
|
||||||
- name: Get Windows toolchain
|
|
||||||
if: ${{ inputs.target-platform == 'win' }}
|
|
||||||
shell: powershell
|
|
||||||
run: e d vpython3 src\build\vs_toolchain.py update --force
|
|
||||||
- name: Download nodejs
|
|
||||||
if: ${{ inputs.target-platform == 'win' }}
|
|
||||||
shell: powershell
|
|
||||||
run: |
|
|
||||||
$nodedeps = e d gclient getdep --deps-file=src/DEPS -r src/third_party/node/win | ConvertFrom-JSON
|
|
||||||
python3 src\third_party\depot_tools\download_from_google_storage.py --no_resume --no_auth --bucket chromium-nodejs -o src\third_party\node\win\node.exe $nodedeps.object_name
|
|
||||||
- name: Install rc
|
|
||||||
if: ${{ inputs.target-platform == 'win' }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
python3 src/third_party/depot_tools/download_from_google_storage.py --no_resume --no_auth --bucket chromium-browser-clang/rc -s src/build/toolchain/win/rc/win/rc.exe.sha1
|
|
||||||
64
.github/actions/free-space-macos/action.yml
vendored
64
.github/actions/free-space-macos/action.yml
vendored
@@ -6,8 +6,6 @@ runs:
|
|||||||
- name: Free Space on MacOS
|
- name: Free Space on MacOS
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "Disk usage before cleanup:"
|
|
||||||
df -h
|
|
||||||
sudo mkdir -p $TMPDIR/del-target
|
sudo mkdir -p $TMPDIR/del-target
|
||||||
|
|
||||||
tmpify() {
|
tmpify() {
|
||||||
@@ -17,30 +15,28 @@ runs:
|
|||||||
}
|
}
|
||||||
|
|
||||||
strip_universal_deep() {
|
strip_universal_deep() {
|
||||||
if [ -d "$1" ]; then
|
opwd=$(pwd)
|
||||||
opwd=$(pwd)
|
cd $1
|
||||||
cd $1
|
f=$(find . -perm +111 -type f)
|
||||||
f=$(find . -perm +111 -type f)
|
for fp in $f
|
||||||
for fp in $f
|
do
|
||||||
do
|
if [[ $(file "$fp") == *"universal binary"* ]]; then
|
||||||
if [[ $(file "$fp") == *"universal binary"* ]]; then
|
if [ "`arch`" == "arm64" ]; then
|
||||||
if [ "`arch`" == "arm64" ]; then
|
if [[ $(file "$fp") == *"x86_64"* ]]; then
|
||||||
if [[ $(file "$fp") == *"x86_64"* ]]; then
|
sudo lipo -remove x86_64 "$fp" -o "$fp" || true
|
||||||
sudo lipo -remove x86_64 "$fp" -o "$fp" || true
|
fi
|
||||||
fi
|
else
|
||||||
else
|
if [[ $(file "$fp") == *"arm64e)"* ]]; then
|
||||||
if [[ $(file "$fp") == *"arm64e)"* ]]; then
|
sudo lipo -remove arm64e "$fp" -o "$fp" || true
|
||||||
sudo lipo -remove arm64e "$fp" -o "$fp" || true
|
fi
|
||||||
fi
|
if [[ $(file "$fp") == *"arm64)"* ]]; then
|
||||||
if [[ $(file "$fp") == *"arm64)"* ]]; then
|
sudo lipo -remove arm64 "$fp" -o "$fp" || true
|
||||||
sudo lipo -remove arm64 "$fp" -o "$fp" || true
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
cd $opwd
|
cd $opwd
|
||||||
fi
|
|
||||||
}
|
}
|
||||||
|
|
||||||
tmpify /Library/Developer/CoreSimulator
|
tmpify /Library/Developer/CoreSimulator
|
||||||
@@ -61,29 +57,9 @@ runs:
|
|||||||
sudo rm -rf $TMPDIR/del-target
|
sudo rm -rf $TMPDIR/del-target
|
||||||
|
|
||||||
sudo rm -rf /Applications/Safari.app
|
sudo rm -rf /Applications/Safari.app
|
||||||
sudo rm -rf /Applications/Xcode_16.1.app
|
|
||||||
sudo rm -rf /Applications/Xcode_16.2.app
|
|
||||||
sudo rm -rf /Applications/Xcode_16.3.app
|
|
||||||
sudo rm -rf /Applications/Xcode_26*
|
|
||||||
sudo rm -rf /Applications/Google Chrome.app
|
|
||||||
sudo rm -rf /Applications/Google Chrome for Testing.app
|
|
||||||
sudo rm -rf /Applications/Firefox.app
|
|
||||||
sudo rm -rf /Applications/Microsoft Edge.app
|
|
||||||
sudo rm -rf ~/project/src/third_party/catapult/tracing/test_data
|
sudo rm -rf ~/project/src/third_party/catapult/tracing/test_data
|
||||||
sudo rm -rf ~/project/src/third_party/angle/third_party/VK-GL-CTS
|
sudo rm -rf ~/project/src/third_party/angle/third_party/VK-GL-CTS
|
||||||
sudo rm -rf /Users/runner/Library/Android
|
|
||||||
sudo rm -rf $JAVA_HOME_11_arm64
|
|
||||||
sudo rm -rf $JAVA_HOME_17_arm64
|
|
||||||
sudo rm -rf $JAVA_HOME_21_arm64
|
|
||||||
sudo rm -rf $JAVA_HOME_25_arm64
|
|
||||||
sudo rm -rf /Users/runner/.dotnet/
|
|
||||||
sudo rm -rf /Users/runner/.rustup
|
|
||||||
|
|
||||||
# remove homebrew packages we don't need
|
|
||||||
brew uninstall -f --zap aws-sam-cli session-manager-plugin gcc gcc@13 gcc@14 llvm@18 gradle maven ant azure-cli
|
|
||||||
brew autoremove
|
|
||||||
|
|
||||||
# lipo off some huge binaries arm64 versions to save space
|
# lipo off some huge binaries arm64 versions to save space
|
||||||
strip_universal_deep $(xcode-select -p)/../SharedFrameworks
|
strip_universal_deep $(xcode-select -p)/../SharedFrameworks
|
||||||
# strip_arm_deep /System/Volumes/Data/Library/Developer/CommandLineTools/usr
|
# strip_arm_deep /System/Volumes/Data/Library/Developer/CommandLineTools/usr
|
||||||
sudo mdutil -a -i off
|
|
||||||
14
.github/actions/generate-types/action.yml
vendored
14
.github/actions/generate-types/action.yml
vendored
@@ -13,16 +13,12 @@ runs:
|
|||||||
- name: Generating Types for SHA in ${{ inputs.sha-file }}
|
- name: Generating Types for SHA in ${{ inputs.sha-file }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
export ELECTRON_DIR=$(pwd)
|
git checkout $(cat ${{ inputs.sha-file }})
|
||||||
if [ "${{ inputs.sha-file }}" == ".dig-old" ]; then
|
rm -rf node_modules
|
||||||
cd /tmp
|
yarn install --frozen-lockfile --ignore-scripts
|
||||||
git clone https://github.com/electron/electron.git
|
|
||||||
cd electron
|
|
||||||
fi
|
|
||||||
git checkout $(cat $ELECTRON_DIR/${{ inputs.sha-file }})
|
|
||||||
node script/yarn.js install --immutable
|
|
||||||
echo "#!/usr/bin/env node\nglobal.x=1" > node_modules/typescript/bin/tsc
|
echo "#!/usr/bin/env node\nglobal.x=1" > node_modules/typescript/bin/tsc
|
||||||
node node_modules/.bin/electron-docs-parser --dir=./ --outDir=./ --moduleVersion=0.0.0-development
|
node node_modules/.bin/electron-docs-parser --dir=./ --outDir=./ --moduleVersion=0.0.0-development
|
||||||
node node_modules/.bin/electron-typescript-definitions --api=electron-api.json --outDir=artifacts
|
node node_modules/.bin/electron-typescript-definitions --api=electron-api.json --outDir=artifacts
|
||||||
mv artifacts/electron.d.ts $ELECTRON_DIR/artifacts/${{ inputs.filename }}
|
mv artifacts/electron.d.ts artifacts/${{ inputs.filename }}
|
||||||
|
git checkout .
|
||||||
working-directory: ./electron
|
working-directory: ./electron
|
||||||
|
|||||||
18
.github/actions/install-build-tools/action.yml
vendored
18
.github/actions/install-build-tools/action.yml
vendored
@@ -10,23 +10,11 @@ runs:
|
|||||||
git config --global core.filemode false
|
git config --global core.filemode false
|
||||||
git config --global core.autocrlf false
|
git config --global core.autocrlf false
|
||||||
git config --global branch.autosetuprebase always
|
git config --global branch.autosetuprebase always
|
||||||
git config --global core.fscache true
|
|
||||||
git config --global core.longpaths true
|
|
||||||
git config --global core.preloadindex true
|
|
||||||
git config --global core.longpaths true
|
|
||||||
fi
|
fi
|
||||||
export BUILD_TOOLS_SHA=a0cc95a1884a631559bcca0c948465b725d9295a
|
export BUILD_TOOLS_SHA=8246e57791b0af4ae5975eb96f09855f9269b1cd
|
||||||
npm i -g @electron/build-tools
|
npm i -g @electron/build-tools
|
||||||
# Update depot_tools to ensure python
|
|
||||||
e d update_depot_tools
|
|
||||||
e auto-update disable
|
e auto-update disable
|
||||||
# Disable further updates of depot_tools
|
|
||||||
e d auto-update disable
|
|
||||||
if [ "$(expr substr $(uname -s) 1 10)" == "MSYS_NT-10" ]; then
|
if [ "$(expr substr $(uname -s) 1 10)" == "MSYS_NT-10" ]; then
|
||||||
e d cipd.bat --version
|
e d cipd.bat --version
|
||||||
cp "C:\Python311\python.exe" "C:\Python311\python3.exe"
|
cp "C:\Python37\python.exe" "C:\Python37\python3.exe"
|
||||||
echo "C:\Users\ContainerAdministrator\.electron_build_tools\third_party\depot_tools" >> $GITHUB_PATH
|
fi
|
||||||
else
|
|
||||||
echo "$HOME/.electron_build_tools/third_party/depot_tools" >> $GITHUB_PATH
|
|
||||||
echo "$HOME/.electron_build_tools/third_party/depot_tools/python-bin" >> $GITHUB_PATH
|
|
||||||
fi
|
|
||||||
|
|||||||
16
.github/actions/install-dependencies/action.yml
vendored
16
.github/actions/install-dependencies/action.yml
vendored
@@ -6,8 +6,8 @@ runs:
|
|||||||
- name: Get yarn cache directory path
|
- name: Get yarn cache directory path
|
||||||
shell: bash
|
shell: bash
|
||||||
id: yarn-cache-dir-path
|
id: yarn-cache-dir-path
|
||||||
run: echo "dir=$(node src/electron/script/yarn.js config get cacheFolder)" >> $GITHUB_OUTPUT
|
run: echo "dir=$(node src/electron/script/yarn cache dir)" >> $GITHUB_OUTPUT
|
||||||
- uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
|
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
|
||||||
id: yarn-cache
|
id: yarn-cache
|
||||||
with:
|
with:
|
||||||
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||||
@@ -18,14 +18,4 @@ runs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd src/electron
|
cd src/electron
|
||||||
if [ "$TARGET_ARCH" = "x86" ]; then
|
node script/yarn install --frozen-lockfile --prefer-offline
|
||||||
export npm_config_arch="ia32"
|
|
||||||
fi
|
|
||||||
# if running on linux arm skip yarn Builds
|
|
||||||
ARCH=$(uname -m)
|
|
||||||
if [ "$ARCH" = "armv7l" ]; then
|
|
||||||
echo "Skipping yarn build on linux arm"
|
|
||||||
node script/yarn.js install --immutable --mode=skip-build
|
|
||||||
else
|
|
||||||
node script/yarn.js install --immutable
|
|
||||||
fi
|
|
||||||
|
|||||||
10
.github/actions/restore-cache-aks/action.yml
vendored
10
.github/actions/restore-cache-aks/action.yml
vendored
@@ -1,20 +1,12 @@
|
|||||||
name: 'Restore Cache AKS'
|
name: 'Restore Cache AKS'
|
||||||
description: 'Restores Electron src cache via AKS'
|
description: 'Restores Electron src cache via AKS'
|
||||||
inputs:
|
|
||||||
target-platform:
|
|
||||||
description: 'Target platform, should be linux, win, macos'
|
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- name: Restore and Ensure Src Cache
|
- name: Restore and Ensure Src Cache
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
if [ "${{ inputs.target-platform }}" = "win" ]; then
|
cache_path=/mnt/cross-instance-cache/$DEPSHASH.tar
|
||||||
cache_path=/mnt/win-cache/$DEPSHASH.tar
|
|
||||||
else
|
|
||||||
cache_path=/mnt/cross-instance-cache/$DEPSHASH.tar
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Using cache key: $DEPSHASH"
|
echo "Using cache key: $DEPSHASH"
|
||||||
echo "Checking for cache in: $cache_path"
|
echo "Checking for cache in: $cache_path"
|
||||||
if [ ! -f "$cache_path" ]; then
|
if [ ! -f "$cache_path" ]; then
|
||||||
|
|||||||
82
.github/actions/restore-cache-azcopy/action.yml
vendored
82
.github/actions/restore-cache-azcopy/action.yml
vendored
@@ -1,25 +1,22 @@
|
|||||||
name: 'Restore Cache AZCopy'
|
name: 'Restore Cache AZCopy'
|
||||||
description: 'Restores Electron src cache via AZCopy'
|
description: 'Restores Electron src cache via AZCopy'
|
||||||
inputs:
|
|
||||||
target-platform:
|
|
||||||
description: 'Target platform, should be linux, win, macos'
|
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
- name: Obtain SAS Key
|
- name: Obtain SAS Key
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
|
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
|
||||||
with:
|
with:
|
||||||
path: sas-token
|
path: |
|
||||||
key: sas-key-${{ inputs.target-platform }}-${{ github.run_number }}-1
|
sas-token
|
||||||
enableCrossOsArchive: true
|
key: sas-key-${{ github.run_number }}-1
|
||||||
- name: Obtain SAS Key
|
- name: Obtain SAS Key
|
||||||
continue-on-error: true
|
continue-on-error: true
|
||||||
uses: actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
|
uses: actions/cache/restore@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9
|
||||||
with:
|
with:
|
||||||
path: sas-token
|
path: |
|
||||||
key: sas-key-${{ inputs.target-platform }}-${{ github.run_number }}-${{ github.run_attempt }}
|
sas-token
|
||||||
enableCrossOsArchive: true
|
key: sas-key-${{ github.run_number }}-${{ github.run_attempt }}
|
||||||
- name: Download Src Cache from AKS
|
- name: Download Src Cache from AKS
|
||||||
# The cache will always exist here as a result of the checkout job
|
# The cache will always exist here as a result of the checkout job
|
||||||
# Either it was uploaded to Azure in the checkout job for this commit
|
# Either it was uploaded to Azure in the checkout job for this commit
|
||||||
@@ -29,31 +26,21 @@ runs:
|
|||||||
timeout_minutes: 30
|
timeout_minutes: 30
|
||||||
max_attempts: 3
|
max_attempts: 3
|
||||||
retry_on: error
|
retry_on: error
|
||||||
shell: bash
|
|
||||||
command: |
|
command: |
|
||||||
sas_token=$(cat sas-token)
|
sas_token=$(cat sas-token)
|
||||||
if [ -z "$sas_token" ]; then
|
if [ -z $sas-token ]; then
|
||||||
echo "SAS Token not found; exiting src cache download early..."
|
echo "SAS Token not found; exiting src cache download early..."
|
||||||
exit 1
|
exit 1
|
||||||
else
|
|
||||||
sas_token=$(jq -r '.sasToken' sas-token)
|
|
||||||
account_name=$(jq -r '.accountName' sas-token)
|
|
||||||
if [ "${{ inputs.target-platform }}" = "win" ]; then
|
|
||||||
azcopy copy --log-level=ERROR \
|
|
||||||
"https://$account_name.file.core.windows.net/${{ env.AZURE_AKS_WIN_CACHE_SHARE_NAME }}/${{ env.CACHE_PATH }}?$sas_token" $DEPSHASH.tar
|
|
||||||
else
|
|
||||||
azcopy copy --log-level=ERROR \
|
|
||||||
"https://$account_name.file.core.windows.net/${{ env.AZURE_AKS_CACHE_SHARE_NAME }}/${{ env.CACHE_PATH }}?$sas_token" $DEPSHASH.tar
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
azcopy copy --log-level=ERROR \
|
||||||
|
"https://${{ env.AZURE_AKS_CACHE_STORAGE_ACCOUNT }}.file.core.windows.net/${{ env.AZURE_AKS_CACHE_SHARE_NAME }}/${{ env.CACHE_PATH }}?$sas_token" $DEPSHASH.tar
|
||||||
env:
|
env:
|
||||||
AZURE_AKS_CACHE_SHARE_NAME: linux-cache
|
AZURE_AKS_CACHE_STORAGE_ACCOUNT: f723719aa87a34622b5f7f3
|
||||||
AZURE_AKS_WIN_CACHE_SHARE_NAME: windows-cache
|
AZURE_AKS_CACHE_SHARE_NAME: pvc-f6a4089f-b082-4bee-a3f9-c3e1c0c02d8f
|
||||||
- name: Clean SAS Key
|
- name: Clean SAS Key
|
||||||
shell: bash
|
shell: bash
|
||||||
run: rm -f sas-token
|
run: rm -f sas-token
|
||||||
- name: Unzip and Ensure Src Cache
|
- name: Unzip and Ensure Src Cache
|
||||||
if: ${{ inputs.target-platform == 'macos' }}
|
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
echo "Downloaded cache is $(du -sh $DEPSHASH.tar | cut -f1)"
|
echo "Downloaded cache is $(du -sh $DEPSHASH.tar | cut -f1)"
|
||||||
@@ -81,45 +68,4 @@ runs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
echo "Wiping Electron Directory"
|
echo "Wiping Electron Directory"
|
||||||
rm -rf src/electron
|
rm -rf src/electron
|
||||||
|
|
||||||
- name: Unzip and Ensure Src Cache (Windows)
|
|
||||||
if: ${{ inputs.target-platform == 'win' }}
|
|
||||||
shell: powershell
|
|
||||||
run: |
|
|
||||||
$src_cache = "$env:DEPSHASH.tar"
|
|
||||||
$cache_size = $(Get-Item $src_cache).length
|
|
||||||
Write-Host "Downloaded cache is $cache_size"
|
|
||||||
if ($cache_size -eq 0) {
|
|
||||||
Write-Host "Cache is empty - exiting"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
$TEMP_DIR=New-Item -ItemType Directory -Path temp-cache
|
|
||||||
$TEMP_DIR_PATH = $TEMP_DIR.FullName
|
|
||||||
C:\ProgramData\Chocolatey\bin\7z.exe -y -snld20 x $src_cache -o"$TEMP_DIR_PATH"
|
|
||||||
|
|
||||||
- name: Move Src Cache (Windows)
|
|
||||||
if: ${{ inputs.target-platform == 'win' }}
|
|
||||||
uses: nick-fields/retry@7152eba30c6575329ac0576536151aca5a72780e # v3.0.0
|
|
||||||
with:
|
|
||||||
timeout_minutes: 30
|
|
||||||
max_attempts: 3
|
|
||||||
retry_on: error
|
|
||||||
shell: powershell
|
|
||||||
command: |
|
|
||||||
if (Test-Path "temp-cache\src") {
|
|
||||||
Write-Host "Relocating Cache"
|
|
||||||
Remove-Item -Recurse -Force src
|
|
||||||
Move-Item temp-cache\src src
|
|
||||||
|
|
||||||
Write-Host "Deleting zip file"
|
|
||||||
Remove-Item -Force $src_cache
|
|
||||||
}
|
|
||||||
if (-Not (Test-Path "src\third_party\blink")) {
|
|
||||||
Write-Host "Cache was not correctly restored - exiting"
|
|
||||||
exit 1
|
|
||||||
}
|
|
||||||
|
|
||||||
Write-Host "Wiping Electron Directory"
|
|
||||||
Remove-Item -Recurse -Force src\electron
|
|
||||||
58
.github/actions/set-chromium-cookie/action.yml
vendored
58
.github/actions/set-chromium-cookie/action.yml
vendored
@@ -1,58 +0,0 @@
|
|||||||
name: 'Set Chromium Git Cookie'
|
|
||||||
description: 'Sets an authenticated cookie from Chromium to allow for a higher request limit'
|
|
||||||
runs:
|
|
||||||
using: "composite"
|
|
||||||
steps:
|
|
||||||
- name: Set the git cookie from chromium.googlesource.com (Unix)
|
|
||||||
if: ${{ runner.os != 'Windows' }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
if [[ -z "${{ env.CHROMIUM_GIT_COOKIE }}" ]]; then
|
|
||||||
echo "CHROMIUM_GIT_COOKIE is not set - cannot authenticate."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
eval 'set +o history' 2>/dev/null || setopt HIST_IGNORE_SPACE 2>/dev/null
|
|
||||||
touch ~/.gitcookies
|
|
||||||
chmod 0600 ~/.gitcookies
|
|
||||||
|
|
||||||
git config --global http.cookiefile ~/.gitcookies
|
|
||||||
|
|
||||||
tr , \\t <<\__END__ >>~/.gitcookies
|
|
||||||
${{ env.CHROMIUM_GIT_COOKIE }}
|
|
||||||
__END__
|
|
||||||
eval 'set -o history' 2>/dev/null || unsetopt HIST_IGNORE_SPACE 2>/dev/null
|
|
||||||
|
|
||||||
RESPONSE=$(curl -s -b ~/.gitcookies https://chromium-review.googlesource.com/a/accounts/self)
|
|
||||||
if [[ $RESPONSE == ")]}'"* ]]; then
|
|
||||||
# Extract account email for verification
|
|
||||||
EMAIL=$(echo "$RESPONSE" | tail -c +5 | jq -r '.email // "No email found"')
|
|
||||||
echo "Cookie authentication successful - authenticated as: $EMAIL"
|
|
||||||
else
|
|
||||||
echo "Cookie authentication failed - ensure CHROMIUM_GIT_COOKIE is set correctly"
|
|
||||||
echo $RESPONSE
|
|
||||||
fi
|
|
||||||
- name: Set the git cookie from chromium.googlesource.com (Windows)
|
|
||||||
if: ${{ runner.os == 'Windows' }}
|
|
||||||
shell: cmd
|
|
||||||
run: |
|
|
||||||
if "%CHROMIUM_GIT_COOKIE_WINDOWS_STRING%"=="" (
|
|
||||||
echo CHROMIUM_GIT_COOKIE_WINDOWS_STRING is not set - cannot authenticate.
|
|
||||||
exit /b 0
|
|
||||||
)
|
|
||||||
|
|
||||||
git config --global http.cookiefile "%USERPROFILE%\.gitcookies"
|
|
||||||
powershell -noprofile -nologo -command Write-Output "${{ env.CHROMIUM_GIT_COOKIE_WINDOWS_STRING }}" >>"%USERPROFILE%\.gitcookies"
|
|
||||||
|
|
||||||
curl -s -b "%USERPROFILE%\.gitcookies" https://chromium-review.googlesource.com/a/accounts/self > response.txt
|
|
||||||
|
|
||||||
findstr /B /C:")]}'" response.txt > nul
|
|
||||||
if %ERRORLEVEL% EQU 0 (
|
|
||||||
echo Cookie authentication successful
|
|
||||||
powershell -NoProfile -Command "& {$content = Get-Content -Raw response.txt; $content = $content.Substring(4); try { $json = ConvertFrom-Json $content; if($json.email) { Write-Host 'Authenticated as:' $json.email } else { Write-Host 'No email found in response' } } catch { Write-Host 'Error parsing JSON:' $_ }}"
|
|
||||||
) else (
|
|
||||||
echo Cookie authentication failed - ensure CHROMIUM_GIT_COOKIE_WINDOWS_STRING is set correctly
|
|
||||||
type response.txt
|
|
||||||
)
|
|
||||||
|
|
||||||
del response.txt
|
|
||||||
20
.github/actions/ssh-debug/action.yml
vendored
20
.github/actions/ssh-debug/action.yml
vendored
@@ -1,20 +0,0 @@
|
|||||||
name: Debug via SSH
|
|
||||||
description: Setup a SSH server with a tunnel to access it to debug via SSH.
|
|
||||||
inputs:
|
|
||||||
tunnel:
|
|
||||||
description: 'Enable SSH tunneling via cloudflared'
|
|
||||||
required: true
|
|
||||||
default: 'false'
|
|
||||||
timeout:
|
|
||||||
description: 'SSH session timeout in seconds'
|
|
||||||
required: false
|
|
||||||
type: number
|
|
||||||
default: 3600
|
|
||||||
runs:
|
|
||||||
using: composite
|
|
||||||
steps:
|
|
||||||
- run: $GITHUB_ACTION_PATH/setup-ssh.sh
|
|
||||||
shell: bash
|
|
||||||
env:
|
|
||||||
TUNNEL: ${{ inputs.tunnel }}
|
|
||||||
TIMEOUT: ${{ inputs.timeout }}
|
|
||||||
4
.github/actions/ssh-debug/bashrc
vendored
4
.github/actions/ssh-debug/bashrc
vendored
@@ -1,4 +0,0 @@
|
|||||||
# If we're in an interactive SSH session and we're not already in tmux and there's no explicit SSH command, auto attach tmux
|
|
||||||
if [ -n "$SSH_TTY" ] && [ -z "$TMUX" ] && [ -z "$SSH_ORIGINAL_COMMAND" ]; then
|
|
||||||
exec tmux attach || exec tmux
|
|
||||||
fi
|
|
||||||
146
.github/actions/ssh-debug/setup-ssh.sh
vendored
146
.github/actions/ssh-debug/setup-ssh.sh
vendored
@@ -1,146 +0,0 @@
|
|||||||
#!/bin/bash -e
|
|
||||||
|
|
||||||
if [ "${TUNNEL}" != "true" ]; then
|
|
||||||
echo "SSH tunneling is disabled. Set enable-tunnel: true to enable remote access."
|
|
||||||
echo "Local SSH server would be available on localhost:2222 if this were a local environment."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo ::group::Configuring Tunnel
|
|
||||||
|
|
||||||
echo "SSH tunneling enabled. Setting up remote access..."
|
|
||||||
|
|
||||||
EXTERNAL_DEPS="curl jq ssh-keygen"
|
|
||||||
|
|
||||||
for dep in $EXTERNAL_DEPS; do
|
|
||||||
if ! command -v "${dep}" > /dev/null 2>&1; then
|
|
||||||
echo "Command ${dep} not installed on the system!" >&2
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
cd "$GITHUB_ACTION_PATH"
|
|
||||||
|
|
||||||
bashrc_path=$(pwd)/bashrc
|
|
||||||
|
|
||||||
# Source `bashrc` to auto start tmux on SSH login.
|
|
||||||
if ! grep -q "${bashrc_path}" ~/.bash_profile; then
|
|
||||||
echo >> ~/.bash_profile # On macOS runner there's no newline at the end of the file
|
|
||||||
echo "source \"${bashrc_path}\"" >> ~/.bash_profile
|
|
||||||
fi
|
|
||||||
|
|
||||||
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
|
|
||||||
ARCH=$(uname -m)
|
|
||||||
|
|
||||||
if [ "${ARCH}" = "x86_64" ]; then
|
|
||||||
ARCH="amd64"
|
|
||||||
elif [ "${ARCH}" = "aarch64" ]; then
|
|
||||||
ARCH="arm64"
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "${OS}" = "darwin" ] && ! command -v tmux > /dev/null 2>&1; then
|
|
||||||
echo "Installing tmux..."
|
|
||||||
brew install tmux
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$OS" = "darwin" ]; then
|
|
||||||
cloudflared_url="https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-${OS}-${ARCH}.tgz"
|
|
||||||
echo "Downloading \`cloudflared\` from <$cloudflared_url>..."
|
|
||||||
curl --location --silent --output cloudflared.tgz "${cloudflared_url}"
|
|
||||||
tar xf cloudflared.tgz
|
|
||||||
rm cloudflared.tgz
|
|
||||||
fi
|
|
||||||
|
|
||||||
chmod +x cloudflared
|
|
||||||
|
|
||||||
echo 'Creating SSH server key...'
|
|
||||||
ssh-keygen -q -f ssh_host_rsa_key -N ''
|
|
||||||
|
|
||||||
echo 'Creating SSH server config...'
|
|
||||||
sed "s,\$PWD,${PWD},;s,\$USER,${USER}," sshd_config.template > sshd_config
|
|
||||||
|
|
||||||
echo 'Starting SSH server...'
|
|
||||||
sudo /usr/sbin/sshd -f sshd_config -D &
|
|
||||||
sshd_pid=$!
|
|
||||||
|
|
||||||
echo "SSH server started successfully (PID: ${sshd_pid})"
|
|
||||||
|
|
||||||
echo 'Starting tmux session...'
|
|
||||||
(cd "${GITHUB_WORKSPACE}" && tmux new-session -d -s debug)
|
|
||||||
|
|
||||||
mkdir ~/.cloudflared
|
|
||||||
CLEAN_TUNNEL_CERT=$(printf '%s\n' "${CLOUDFLARE_TUNNEL_CERT}" | tr -d '\r' | sed '/^[[:space:]]*$/d')
|
|
||||||
|
|
||||||
echo "${CLEAN_TUNNEL_CERT}" > ~/.cloudflared/cert.pem
|
|
||||||
|
|
||||||
CLEAN_USER_CA_CERT=$(printf '%s\n' "${CLOUDFLARE_USER_CA_CERT}" | tr -d '\r' | sed '/^[[:space:]]*$/d')
|
|
||||||
|
|
||||||
echo "${CLEAN_USER_CA_CERT}" | sudo tee /etc/ssh/ca.pub > /dev/null
|
|
||||||
sudo chmod 644 /etc/ssh/ca.pub
|
|
||||||
|
|
||||||
random_suffix=$(openssl rand -hex 5 | cut -c1-10)
|
|
||||||
tunnel_name="${GITHUB_SHA}-${GITHUB_RUN_ID}-${random_suffix}"
|
|
||||||
tunnel_url="${tunnel_name}.${CLOUDFLARE_TUNNEL_HOSTNAME}"
|
|
||||||
|
|
||||||
if ./cloudflared tunnel list | grep -q "${tunnel_name}"; then
|
|
||||||
echo "Deleting existing tunnel: ${tunnel_name}"
|
|
||||||
./cloudflared tunnel delete ${tunnel_name}
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Creating new cloudflare tunnel: ${tunnel_name}"
|
|
||||||
./cloudflared tunnel create ${tunnel_name}
|
|
||||||
|
|
||||||
credentials_file=$(find ~/.cloudflared -name "*.json" | head -n 1)
|
|
||||||
if [ -z "${credentials_file}" ]; then
|
|
||||||
echo "Error: Could not find tunnel credentials file"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Found credentials file: ${credentials_file}"
|
|
||||||
|
|
||||||
echo 'Creating tunnel configuration...'
|
|
||||||
cat > tunnel_config.yml << EOF
|
|
||||||
tunnel: ${tunnel_name}
|
|
||||||
credentials-file: ${credentials_file}
|
|
||||||
|
|
||||||
ingress:
|
|
||||||
- hostname: ${tunnel_url}
|
|
||||||
service: ssh://localhost:2222
|
|
||||||
- service: http_status:404
|
|
||||||
EOF
|
|
||||||
|
|
||||||
echo 'Setting up DNS routing for tunnel...'
|
|
||||||
./cloudflared tunnel route dns ${tunnel_name} ${tunnel_url}
|
|
||||||
|
|
||||||
echo 'Running cloudflare tunnel...'
|
|
||||||
./cloudflared tunnel --no-autoupdate --config tunnel_config.yml run 2>&1 | tee cloudflared.log | sed -u 's/^/cloudflared: /' &
|
|
||||||
cloudflared_pid=$!
|
|
||||||
|
|
||||||
echo ::endgroup::
|
|
||||||
|
|
||||||
echo ::notice title=SSH Debug Session Ready::ssh ${tunnel_url}
|
|
||||||
|
|
||||||
|
|
||||||
(
|
|
||||||
echo ' '
|
|
||||||
echo ' '
|
|
||||||
echo '🔗 SSH Debug Session Ready!'
|
|
||||||
echo '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'
|
|
||||||
echo ' '
|
|
||||||
echo '📋 Infra WG can copy and run this command to connect:'
|
|
||||||
echo ' '
|
|
||||||
echo "ssh ${tunnel_url}"
|
|
||||||
echo ' '
|
|
||||||
echo "⏰ Session expires automatically in ${TIMEOUT} seconds"
|
|
||||||
echo '━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━'
|
|
||||||
echo ' '
|
|
||||||
echo ' '
|
|
||||||
) | cat
|
|
||||||
|
|
||||||
echo ::group::Starting Background Session
|
|
||||||
echo 'Starting SSH session in background...'
|
|
||||||
./ssh-session.sh "${sshd_pid}" "${cloudflared_pid}" "${TIMEOUT}" "${tunnel_name}" &
|
|
||||||
|
|
||||||
echo 'SSH session is running in background. GitHub Action will continue.'
|
|
||||||
echo 'Session will auto-cleanup after timeout or when processes end.'
|
|
||||||
echo ::endgroup::
|
|
||||||
52
.github/actions/ssh-debug/ssh-session.sh
vendored
52
.github/actions/ssh-debug/ssh-session.sh
vendored
@@ -1,52 +0,0 @@
|
|||||||
#!/bin/bash
|
|
||||||
|
|
||||||
SSHD_PID=$1
|
|
||||||
CLOUDFLARED_PID=$2
|
|
||||||
SESSION_TIMEOUT=${3:-10000}
|
|
||||||
TUNNEL_NAME=$4
|
|
||||||
|
|
||||||
cleanup() {
|
|
||||||
# Kill processes.
|
|
||||||
for pid in "$SLEEP_PID" "$SSHD_PID" "$CLOUDFLARED_PID"; do
|
|
||||||
if [ -n "$pid" ] && kill -0 "$pid" 2>/dev/null; then
|
|
||||||
kill "$pid" 2>/dev/null || true
|
|
||||||
fi
|
|
||||||
done
|
|
||||||
|
|
||||||
# Clean up tunnel.
|
|
||||||
if [ -n "$TUNNEL_NAME" ]; then
|
|
||||||
cd "$GITHUB_ACTION_PATH"
|
|
||||||
./cloudflared tunnel delete "$TUNNEL_NAME" 2>/dev/null || {
|
|
||||||
echo "Failed to delete tunnel"
|
|
||||||
}
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "Session ended at $(date)"
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
# Trap signals to ensure cleanup.
|
|
||||||
trap cleanup SIGTERM SIGINT SIGQUIT SIGHUP EXIT
|
|
||||||
|
|
||||||
# Wait for timeout or until processes die.
|
|
||||||
sleep "$SESSION_TIMEOUT" &
|
|
||||||
SLEEP_PID=$!
|
|
||||||
|
|
||||||
# Monitor processes
|
|
||||||
while kill -0 "$SLEEP_PID" 2>/dev/null; do
|
|
||||||
# Check SSH daemon.
|
|
||||||
if ! kill -0 "$SSHD_PID" 2>/dev/null; then
|
|
||||||
echo "SSH daemon died at $(date)"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check cloudflared,
|
|
||||||
if ! kill -0 "$CLOUDFLARED_PID" 2>/dev/null; then
|
|
||||||
echo "Cloudflared died at $(date)"
|
|
||||||
break
|
|
||||||
fi
|
|
||||||
|
|
||||||
sleep 10
|
|
||||||
done
|
|
||||||
|
|
||||||
cleanup
|
|
||||||
25
.github/actions/ssh-debug/sshd_config.template
vendored
25
.github/actions/ssh-debug/sshd_config.template
vendored
@@ -1,25 +0,0 @@
|
|||||||
Port 2222
|
|
||||||
HostKey $PWD/ssh_host_rsa_key
|
|
||||||
PidFile $PWD/sshd.pid
|
|
||||||
|
|
||||||
# Connection settings
|
|
||||||
ClientAliveInterval 30
|
|
||||||
ClientAliveCountMax 10
|
|
||||||
MaxStartups 10
|
|
||||||
LoginGraceTime 120
|
|
||||||
|
|
||||||
# Allow TCP forwarding for tunneling
|
|
||||||
AllowTcpForwarding yes
|
|
||||||
|
|
||||||
# Try to prevent timeouts
|
|
||||||
TCPKeepAlive yes
|
|
||||||
|
|
||||||
# Security
|
|
||||||
TrustedUserCAKeys /etc/ssh/ca.pub
|
|
||||||
PubkeyAuthentication yes
|
|
||||||
PasswordAuthentication no
|
|
||||||
|
|
||||||
AuthorizedPrincipalsCommand /bin/bash -c "echo '%t %k' | ssh-keygen -L -f - | grep -A1 Principals"
|
|
||||||
AuthorizedPrincipalsCommandUser nobody
|
|
||||||
|
|
||||||
PubkeyAcceptedKeyTypes ssh-rsa,ssh-ed25519,ecdsa-sha2-nistp256,ecdsa-sha2-nistp384,ecdsa-sha2-nistp521,ssh-ed25519-cert-v01@openssh.com,ecdsa-sha2-nistp256-cert-v01@openssh.com,ecdsa-sha2-nistp384-cert-v01@openssh.com,ecdsa-sha2-nistp521-cert-v01@openssh.com,rsa-sha2-256-cert-v01@openssh.com,rsa-sha2-512-cert-v01@openssh.com
|
|
||||||
122
.github/copilot-instructions.md
vendored
122
.github/copilot-instructions.md
vendored
@@ -1,122 +0,0 @@
|
|||||||
# Copilot Instructions for Electron
|
|
||||||
|
|
||||||
## Build System
|
|
||||||
|
|
||||||
Electron uses `@electron/build-tools` (`e` CLI). Install with `npm i -g @electron/build-tools`.
|
|
||||||
|
|
||||||
```bash
|
|
||||||
e sync # Fetch sources and apply patches
|
|
||||||
e build # Build Electron (GN + Ninja)
|
|
||||||
e build -k 999 # Build, continuing through errors
|
|
||||||
e start # Run built Electron
|
|
||||||
e start --version # Verify Electron launches
|
|
||||||
e test # Run full test suite
|
|
||||||
e debug # Run in debugger (lldb on macOS, gdb on Linux)
|
|
||||||
```
|
|
||||||
|
|
||||||
### Linting
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm run lint # Run all linters (JS, C++, Python, GN, docs)
|
|
||||||
npm run lint:js # JavaScript/TypeScript only
|
|
||||||
npm run lint:clang-format # C++ formatting only
|
|
||||||
npm run lint:cpp # C++ linting only
|
|
||||||
npm run lint:docs # Documentation only
|
|
||||||
```
|
|
||||||
|
|
||||||
### Running a Single Test
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm run test -- -g "pattern" # Run tests matching a regex pattern
|
|
||||||
# Example: npm run test -- -g "ipc"
|
|
||||||
```
|
|
||||||
|
|
||||||
### Running a Single Node.js Test
|
|
||||||
|
|
||||||
```bash
|
|
||||||
node script/node-spec-runner.js parallel/test-crypto-keygen
|
|
||||||
```
|
|
||||||
|
|
||||||
## Architecture
|
|
||||||
|
|
||||||
Electron embeds Chromium (rendering) and Node.js (backend) to enable desktop apps with web technologies. The parent directory (`../`) is the Chromium source tree.
|
|
||||||
|
|
||||||
### Process Model
|
|
||||||
|
|
||||||
Electron has two primary process types, mirroring Chromium:
|
|
||||||
|
|
||||||
- **Main process** (`shell/browser/` + `lib/browser/`): Controls app lifecycle, creates windows, system APIs
|
|
||||||
- **Renderer process** (`shell/renderer/` + `lib/renderer/`): Runs web content in BrowserWindows
|
|
||||||
|
|
||||||
### Native ↔ JavaScript Bridge
|
|
||||||
|
|
||||||
Each API is implemented as a C++/JS pair:
|
|
||||||
|
|
||||||
- C++ side: `shell/browser/api/electron_api_{name}.cc/.h` — uses `gin::Wrappable` and `ObjectTemplateBuilder`
|
|
||||||
- JS side: `lib/browser/api/{name}.ts` — exports the module, registered in `lib/browser/api/module-list.ts`
|
|
||||||
- Binding: `NODE_LINKED_BINDING_CONTEXT_AWARE(electron_browser_{name}, Initialize)` in C++ and registered in `shell/common/node_bindings.cc`
|
|
||||||
- Type declaration: `typings/internal-ambient.d.ts` maps `process._linkedBinding('electron_browser_{name}')`
|
|
||||||
|
|
||||||
### Patches System
|
|
||||||
|
|
||||||
Electron patches upstream dependencies (Chromium, Node.js, V8, etc.) rather than forking them. Patches live in `patches/` organized by target, with `patches/config.json` mapping directories to repos.
|
|
||||||
|
|
||||||
```text
|
|
||||||
patches/{target}/*.patch → [e sync] → target repo commits
|
|
||||||
← [e patches] ←
|
|
||||||
```
|
|
||||||
|
|
||||||
Key rules:
|
|
||||||
|
|
||||||
- Fix existing patches rather than creating new ones
|
|
||||||
- Preserve original authorship in TODO comments — never change `TODO(name)` assignees
|
|
||||||
- Each patch commit message must explain why the patch exists
|
|
||||||
- After modifying patches, run `e patches {target}` to export
|
|
||||||
|
|
||||||
When working on the `roller/chromium/main` branch for Chromium upgrades, use `e sync --3` for 3-way merge conflict resolution.
|
|
||||||
|
|
||||||
## Conventions
|
|
||||||
|
|
||||||
### File Naming
|
|
||||||
|
|
||||||
- JS/TS files: kebab-case (`file-name.ts`)
|
|
||||||
- C++ files: snake_case with `electron_api_` prefix (`electron_api_safe_storage.cc`)
|
|
||||||
- Test files: `api-{module-name}-spec.ts` in `spec/`
|
|
||||||
- Source file lists are maintained in `filenames.gni` (with platform-specific sections)
|
|
||||||
|
|
||||||
### JavaScript/TypeScript
|
|
||||||
|
|
||||||
- Semicolons required (`"semi": ["error", "always"]`)
|
|
||||||
- `const` and `let` only (no `var`)
|
|
||||||
- Arrow functions preferred
|
|
||||||
- Import order enforced: `@electron/internal` → `@electron` → `electron` → external → builtin → relative
|
|
||||||
- API naming: `PascalCase` for classes (`BrowserWindow`), `camelCase` for module APIs (`globalShortcut`)
|
|
||||||
- Prefer getters/setters over jQuery-style `.text([text])` patterns
|
|
||||||
|
|
||||||
### C++
|
|
||||||
|
|
||||||
- Follows Chromium coding style, enforced by `clang-format` and `clang-tidy`
|
|
||||||
- Uses Chromium abstractions (`base::`, `content::`, etc.)
|
|
||||||
- Header guards: `#ifndef ELECTRON_SHELL_BROWSER_API_ELECTRON_API_{NAME}_H_`
|
|
||||||
- Platform-specific files: `_mac.mm`, `_win.cc`, `_linux.cc`
|
|
||||||
|
|
||||||
### Testing
|
|
||||||
|
|
||||||
- Framework: Mocha + Chai + Sinon
|
|
||||||
- Test helpers in `spec/lib/` (e.g., `spec-helpers.ts`, `window-helpers.ts`)
|
|
||||||
- Use `defer()` from spec-helpers for cleanup, `closeAllWindows()` for window teardown
|
|
||||||
- Tests import from `electron/main` or `electron/renderer`
|
|
||||||
|
|
||||||
### Documentation
|
|
||||||
|
|
||||||
- API docs in `docs/api/` as Markdown, parsed by `@electron/docs-parser` to generate `electron.d.ts`
|
|
||||||
- API history tracked via YAML blocks in HTML comments within doc files
|
|
||||||
- Docs must pass `npm run lint:docs`
|
|
||||||
|
|
||||||
### Build Configuration
|
|
||||||
|
|
||||||
- `BUILD.gn`: Main GN build config
|
|
||||||
- `buildflags/buildflags.gni`: Feature flags (PDF viewer, extensions, spellchecker)
|
|
||||||
- `build/args/`: Build argument profiles (`testing.gn`, `release.gn`, `all.gn`)
|
|
||||||
- `DEPS`: Dependency versions and checkout paths
|
|
||||||
- `chromium_src/`: Chromium source file overrides (compiled instead of originals)
|
|
||||||
18
.github/problem-matchers/clang.json
vendored
18
.github/problem-matchers/clang.json
vendored
@@ -1,18 +0,0 @@
|
|||||||
{
|
|
||||||
"problemMatcher": [
|
|
||||||
{
|
|
||||||
"owner": "clang",
|
|
||||||
"fromPath": "src/out/Default/args.gn",
|
|
||||||
"pattern": [
|
|
||||||
{
|
|
||||||
"regexp": "^(.+)[(:](\\d+)[:,](\\d+)\\)?:\\s+(warning|error):\\s+(.*)$",
|
|
||||||
"file": 1,
|
|
||||||
"line": 2,
|
|
||||||
"column": 3,
|
|
||||||
"severity": 4,
|
|
||||||
"message": 5
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
22
.github/problem-matchers/eslint-stylish.json
vendored
22
.github/problem-matchers/eslint-stylish.json
vendored
@@ -1,22 +0,0 @@
|
|||||||
{
|
|
||||||
"problemMatcher": [
|
|
||||||
{
|
|
||||||
"owner": "eslint-stylish",
|
|
||||||
"pattern": [
|
|
||||||
{
|
|
||||||
"regexp": "^\\s*([^\\s].*)$",
|
|
||||||
"file": 1
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"regexp": "^\\s+(\\d+):(\\d+)\\s+(error|warning|info)\\s+(.*)\\s\\s+(.*)$",
|
|
||||||
"line": 1,
|
|
||||||
"column": 2,
|
|
||||||
"severity": 3,
|
|
||||||
"message": 4,
|
|
||||||
"code": 5,
|
|
||||||
"loop": true
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
16
.github/problem-matchers/markdownlint.json
vendored
16
.github/problem-matchers/markdownlint.json
vendored
@@ -1,16 +0,0 @@
|
|||||||
{
|
|
||||||
"problemMatcher": [
|
|
||||||
{
|
|
||||||
"owner": "markdownlint",
|
|
||||||
"pattern": [
|
|
||||||
{
|
|
||||||
"regexp": "^(.+):(\\d+):(\\d+)\\s+(.*)$",
|
|
||||||
"file": 1,
|
|
||||||
"line": 2,
|
|
||||||
"column": 3,
|
|
||||||
"message": 4
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
34
.github/problem-matchers/patch-conflict.json
vendored
34
.github/problem-matchers/patch-conflict.json
vendored
@@ -1,34 +0,0 @@
|
|||||||
{
|
|
||||||
"problemMatcher": [
|
|
||||||
{
|
|
||||||
"owner": "merge-conflict",
|
|
||||||
"pattern": [
|
|
||||||
{
|
|
||||||
"regexp": "^CONFLICT\\s\\(\\S+\\): (Merge conflict in \\S+)$",
|
|
||||||
"message": 1
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"owner": "patch-conflict",
|
|
||||||
"pattern": [
|
|
||||||
{
|
|
||||||
"regexp": "^error: (patch failed: (\\S+):(\\d+))$",
|
|
||||||
"message": 1,
|
|
||||||
"file": 2,
|
|
||||||
"line": 3
|
|
||||||
}
|
|
||||||
]
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"owner": "patch-needs-update",
|
|
||||||
"pattern": [
|
|
||||||
{
|
|
||||||
"regexp": "^((patches\/.*): needs update)$",
|
|
||||||
"message": 1,
|
|
||||||
"file": 2
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
73
.github/workflows/apply-patches.yml
vendored
73
.github/workflows/apply-patches.yml
vendored
@@ -1,73 +0,0 @@
|
|||||||
name: Apply Patches
|
|
||||||
|
|
||||||
on:
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
permissions: {}
|
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: apply-patches-${{ github.ref }}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
setup:
|
|
||||||
if: github.repository == 'electron/electron'
|
|
||||||
runs-on: ubuntu-slim
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
pull-requests: read
|
|
||||||
outputs:
|
|
||||||
has-patches: ${{ steps.filter.outputs.patches }}
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
|
|
||||||
with:
|
|
||||||
persist-credentials: false
|
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
|
||||||
# Use dorny/paths-filter instead of the path filter under the on: pull_request: block
|
|
||||||
# so that the output can be used to conditionally run the apply-patches job, which lets
|
|
||||||
# the job be marked as a required status check (conditional skip counts as a success).
|
|
||||||
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
|
|
||||||
id: filter
|
|
||||||
with:
|
|
||||||
filters: |
|
|
||||||
patches:
|
|
||||||
- DEPS
|
|
||||||
- 'patches/**'
|
|
||||||
|
|
||||||
apply-patches:
|
|
||||||
needs: setup
|
|
||||||
if: ${{ needs.setup.outputs.has-patches == 'true' }}
|
|
||||||
runs-on: electron-arc-centralus-linux-amd64-32core
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
container:
|
|
||||||
image: ghcr.io/electron/build:a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb
|
|
||||||
options: --user root
|
|
||||||
volumes:
|
|
||||||
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
|
||||||
- /var/run/sas:/var/run/sas
|
|
||||||
env:
|
|
||||||
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
|
|
||||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
|
|
||||||
steps:
|
|
||||||
- name: Checkout Electron
|
|
||||||
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
|
|
||||||
with:
|
|
||||||
path: src/electron
|
|
||||||
fetch-depth: 0
|
|
||||||
persist-credentials: false
|
|
||||||
ref: ${{ github.event.pull_request.base.ref }}
|
|
||||||
- name: Merge PR HEAD
|
|
||||||
working-directory: src/electron
|
|
||||||
env:
|
|
||||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
|
||||||
run: |
|
|
||||||
git config user.email "electron@github.com"
|
|
||||||
git config user.name "Electron Bot"
|
|
||||||
git fetch origin refs/pull/${PR_NUMBER}/head
|
|
||||||
git merge --squash FETCH_HEAD
|
|
||||||
git commit -n -m "Squashed commits"
|
|
||||||
- name: Checkout & Sync & Save
|
|
||||||
uses: ./src/electron/.github/actions/checkout
|
|
||||||
with:
|
|
||||||
target-platform: linux
|
|
||||||
12
.github/workflows/archaeologist-dig.yml
vendored
12
.github/workflows/archaeologist-dig.yml
vendored
@@ -3,23 +3,19 @@ name: Archaeologist
|
|||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
permissions: {}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
archaeologist-dig:
|
archaeologist-dig:
|
||||||
name: Archaeologist Dig
|
name: Archaeologist Dig
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Electron
|
- name: Checkout Electron
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.0.2
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
- name: Setup Node.js/npm
|
- name: Setup Node.js/npm
|
||||||
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903
|
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af
|
||||||
with:
|
with:
|
||||||
node-version: 20.19.x
|
node-version: 20.11.x
|
||||||
- name: Setting Up Dig Site
|
- name: Setting Up Dig Site
|
||||||
run: |
|
run: |
|
||||||
echo "remote: ${{ github.event.pull_request.head.repo.clone_url }}"
|
echo "remote: ${{ github.event.pull_request.head.repo.clone_url }}"
|
||||||
@@ -45,7 +41,7 @@ jobs:
|
|||||||
sha-file: .dig-old
|
sha-file: .dig-old
|
||||||
filename: electron.old.d.ts
|
filename: electron.old.d.ts
|
||||||
- name: Upload artifacts
|
- name: Upload artifacts
|
||||||
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 #v5.0.0
|
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b #v4.5.0
|
||||||
with:
|
with:
|
||||||
name: artifacts
|
name: artifacts
|
||||||
path: electron/artifacts
|
path: electron/artifacts
|
||||||
|
|||||||
150
.github/workflows/audit-branch-ci.yml
vendored
150
.github/workflows/audit-branch-ci.yml
vendored
@@ -1,150 +0,0 @@
|
|||||||
name: Audit CI on Branches
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
schedule:
|
|
||||||
# Run every 2 hours
|
|
||||||
- cron: '0 */2 * * *'
|
|
||||||
|
|
||||||
permissions: {}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
audit_branch_ci:
|
|
||||||
name: Audit CI on Branches
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
steps:
|
|
||||||
- name: Setup Node.js
|
|
||||||
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903 # v6.0.0
|
|
||||||
with:
|
|
||||||
node-version: 22.17.x
|
|
||||||
- run: npm install @actions/cache@4.0.3 @electron/fiddle-core@2.0.1
|
|
||||||
- uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
|
||||||
id: audit-errors
|
|
||||||
with:
|
|
||||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
script: |
|
|
||||||
const cache = require('@actions/cache');
|
|
||||||
const { ElectronVersions } = require('@electron/fiddle-core');
|
|
||||||
|
|
||||||
const runsWithErrors = [];
|
|
||||||
|
|
||||||
// Only want the most recent workflow run that wasn't skipped or cancelled
|
|
||||||
const isValidWorkflowRun = (run) => !['skipped', 'cancelled'].includes(run.conclusion);
|
|
||||||
|
|
||||||
const versions = await ElectronVersions.create({ ignoreCache: true });
|
|
||||||
const branches = versions.supportedMajors.map((branch) => `${branch}-x-y`);
|
|
||||||
|
|
||||||
for (const branch of ["main", ...branches]) {
|
|
||||||
const latestCheckRuns = new Map();
|
|
||||||
const allCheckRuns = await github.paginate(github.rest.checks.listForRef, {
|
|
||||||
owner: "electron",
|
|
||||||
repo: "electron",
|
|
||||||
ref: branch,
|
|
||||||
status: 'completed',
|
|
||||||
});
|
|
||||||
|
|
||||||
// Sort the check runs by completed_at so that multiple check runs on the
|
|
||||||
// same ref (like a scheduled workflow) only looks at the most recent one
|
|
||||||
for (const checkRun of allCheckRuns.filter(
|
|
||||||
(run) => !['skipped', 'cancelled'].includes(run.conclusion),
|
|
||||||
).sort((a, b) => new Date(b.completed_at) - new Date(a.completed_at))) {
|
|
||||||
if (!latestCheckRuns.has(checkRun.name)) {
|
|
||||||
latestCheckRuns.set(checkRun.name, checkRun);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check for runs which had error annotations
|
|
||||||
for (const checkRun of Array.from(latestCheckRuns.values())) {
|
|
||||||
if (checkRun.name === "Audit CI on Branches") {
|
|
||||||
continue; // Skip the audit workflow itself
|
|
||||||
}
|
|
||||||
|
|
||||||
const annotations = (await github.rest.checks.listAnnotations({
|
|
||||||
owner: "electron",
|
|
||||||
repo: "electron",
|
|
||||||
check_run_id: checkRun.id,
|
|
||||||
})).data ?? [];
|
|
||||||
|
|
||||||
if (
|
|
||||||
annotations.find(
|
|
||||||
({ annotation_level, message }) =>
|
|
||||||
annotation_level === "failure" &&
|
|
||||||
!message.startsWith("Process completed with exit code") &&
|
|
||||||
!message.startsWith("Response status code does not indicate success") &&
|
|
||||||
!message.startsWith("The hosted runner lost communication with the server") &&
|
|
||||||
!/Unable to make request/.test(message) &&
|
|
||||||
!/The requested URL returned error/.test(message),
|
|
||||||
)
|
|
||||||
) {
|
|
||||||
checkRun.hasErrorAnnotations = true;
|
|
||||||
} else {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check if this is a known failure from a previous audit run
|
|
||||||
const cacheKey = `check-run-error-annotations-${checkRun.id}`;
|
|
||||||
const cacheHit =
|
|
||||||
(await cache.restoreCache(['/dev/null'], cacheKey, undefined, {
|
|
||||||
lookupOnly: true,
|
|
||||||
})) !== undefined;
|
|
||||||
|
|
||||||
if (cacheHit) {
|
|
||||||
checkRun.isStale = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
checkRun.branch = branch;
|
|
||||||
runsWithErrors.push(checkRun);
|
|
||||||
|
|
||||||
// Create a cache entry (only the name matters) to keep track of
|
|
||||||
// failures we've seen from previous runs to mark them as stale
|
|
||||||
if (!cacheHit) {
|
|
||||||
await cache.saveCache(['/dev/null'], cacheKey);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (runsWithErrors.length > 0) {
|
|
||||||
core.summary.addHeading('⚠️ Runs with Errors');
|
|
||||||
core.summary.addTable([
|
|
||||||
[
|
|
||||||
{ data: 'Branch', header: true },
|
|
||||||
{ data: 'Workflow Run', header: true },
|
|
||||||
{ data: 'Status', header: true },
|
|
||||||
],
|
|
||||||
...runsWithErrors
|
|
||||||
.sort(
|
|
||||||
(a, b) =>
|
|
||||||
a.branch.localeCompare(b.branch) ||
|
|
||||||
a.name.localeCompare(b.name),
|
|
||||||
)
|
|
||||||
.map((run) => [
|
|
||||||
run.branch,
|
|
||||||
`<a href="${run.html_url}">${run.name}</a>`,
|
|
||||||
run.isStale
|
|
||||||
? '📅 Stale'
|
|
||||||
: run.hasErrorAnnotations
|
|
||||||
? '⚠️ Errors'
|
|
||||||
: '✅ Succeeded',
|
|
||||||
]),
|
|
||||||
]);
|
|
||||||
|
|
||||||
// Set this as failed so it's easy to scan runs to find failures
|
|
||||||
if (runsWithErrors.find((run) => !run.isStale)) {
|
|
||||||
core.setOutput('errorsFound', true);
|
|
||||||
process.exitCode = 1;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
core.summary.addRaw('🎉 No runs with errors');
|
|
||||||
}
|
|
||||||
|
|
||||||
await core.summary.write();
|
|
||||||
- name: Send Slack message if errors
|
|
||||||
if: ${{ always() && steps.audit-errors.outputs.errorsFound && github.ref == 'refs/heads/main' }}
|
|
||||||
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1
|
|
||||||
with:
|
|
||||||
payload: |
|
|
||||||
link: "https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
|
|
||||||
webhook: ${{ secrets.CI_ERRORS_SLACK_WEBHOOK_URL }}
|
|
||||||
webhook-type: webhook-trigger
|
|
||||||
11
.github/workflows/branch-created.yml
vendored
11
.github/workflows/branch-created.yml
vendored
@@ -75,7 +75,7 @@ jobs:
|
|||||||
org: electron
|
org: electron
|
||||||
- name: Generate Release Project Board Metadata
|
- name: Generate Release Project Board Metadata
|
||||||
if: ${{ steps.check-major-version.outputs.MAJOR }}
|
if: ${{ steps.check-major-version.outputs.MAJOR }}
|
||||||
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||||
id: generate-project-metadata
|
id: generate-project-metadata
|
||||||
with:
|
with:
|
||||||
script: |
|
script: |
|
||||||
@@ -94,7 +94,7 @@ jobs:
|
|||||||
}))
|
}))
|
||||||
- name: Create Release Project Board
|
- name: Create Release Project Board
|
||||||
if: ${{ steps.check-major-version.outputs.MAJOR }}
|
if: ${{ steps.check-major-version.outputs.MAJOR }}
|
||||||
uses: dsanders11/project-actions/copy-project@2134fe7cc71c58b7ae259c82a8e63c6058255678 # v1.7.0
|
uses: dsanders11/project-actions/copy-project@438b25e007c2f4efec324497fadc6402e7cc61a6 # v1.4.0
|
||||||
id: create-release-board
|
id: create-release-board
|
||||||
with:
|
with:
|
||||||
drafts: true
|
drafts: true
|
||||||
@@ -114,15 +114,14 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
|
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
|
||||||
- name: Find Previous Release Project Board
|
- name: Find Previous Release Project Board
|
||||||
if: ${{ steps.check-major-version.outputs.MAJOR }}
|
if: ${{ steps.check-major-version.outputs.MAJOR }}
|
||||||
uses: dsanders11/project-actions/find-project@2134fe7cc71c58b7ae259c82a8e63c6058255678 # v1.7.0
|
uses: dsanders11/project-actions/find-project@438b25e007c2f4efec324497fadc6402e7cc61a6 # v1.4.0
|
||||||
id: find-prev-release-board
|
id: find-prev-release-board
|
||||||
with:
|
with:
|
||||||
fail-if-project-not-found: false
|
|
||||||
title: ${{ steps.generate-project-metadata.outputs.prev-prev-major }}-x-y
|
title: ${{ steps.generate-project-metadata.outputs.prev-prev-major }}-x-y
|
||||||
token: ${{ steps.generate-token.outputs.token }}
|
token: ${{ steps.generate-token.outputs.token }}
|
||||||
- name: Close Previous Release Project Board
|
- name: Close Previous Release Project Board
|
||||||
if: ${{ steps.find-prev-release-board.outputs.number }}
|
if: ${{ steps.check-major-version.outputs.MAJOR }}
|
||||||
uses: dsanders11/project-actions/close-project@2134fe7cc71c58b7ae259c82a8e63c6058255678 # v1.7.0
|
uses: dsanders11/project-actions/close-project@438b25e007c2f4efec324497fadc6402e7cc61a6 # v1.4.0
|
||||||
with:
|
with:
|
||||||
project-number: ${{ steps.find-prev-release-board.outputs.number }}
|
project-number: ${{ steps.find-prev-release-board.outputs.number }}
|
||||||
token: ${{ steps.generate-token.outputs.token }}
|
token: ${{ steps.generate-token.outputs.token }}
|
||||||
|
|||||||
82
.github/workflows/build-git-cache.yml
vendored
82
.github/workflows/build-git-cache.yml
vendored
@@ -1,82 +0,0 @@
|
|||||||
name: Build Git Cache
|
|
||||||
# This workflow updates git cache on the cross-instance cache volumes
|
|
||||||
# It runs daily at midnight.
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: "0 0 * * *"
|
|
||||||
|
|
||||||
permissions: {}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-git-cache-linux:
|
|
||||||
runs-on: electron-arc-centralus-linux-amd64-32core
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
container:
|
|
||||||
image: ghcr.io/electron/build:a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb
|
|
||||||
options: --user root
|
|
||||||
volumes:
|
|
||||||
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
|
||||||
env:
|
|
||||||
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
|
|
||||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
|
|
||||||
steps:
|
|
||||||
- name: Checkout Electron
|
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
|
||||||
with:
|
|
||||||
path: src/electron
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: Build Git Cache
|
|
||||||
uses: ./src/electron/.github/actions/build-git-cache
|
|
||||||
with:
|
|
||||||
target-platform: linux
|
|
||||||
|
|
||||||
build-git-cache-windows:
|
|
||||||
runs-on: electron-arc-centralus-linux-amd64-32core
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
container:
|
|
||||||
image: ghcr.io/electron/build:a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb
|
|
||||||
options: --user root --device /dev/fuse --cap-add SYS_ADMIN
|
|
||||||
volumes:
|
|
||||||
- /mnt/win-cache:/mnt/win-cache
|
|
||||||
env:
|
|
||||||
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
|
|
||||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_win=True'
|
|
||||||
TARGET_OS: 'win'
|
|
||||||
steps:
|
|
||||||
- name: Checkout Electron
|
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
|
||||||
with:
|
|
||||||
path: src/electron
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: Build Git Cache
|
|
||||||
uses: ./src/electron/.github/actions/build-git-cache
|
|
||||||
with:
|
|
||||||
target-platform: win
|
|
||||||
|
|
||||||
build-git-cache-macos:
|
|
||||||
runs-on: electron-arc-centralus-linux-amd64-32core
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
# This job updates the same git cache as linux, so it needs to run after the linux one.
|
|
||||||
needs: build-git-cache-linux
|
|
||||||
container:
|
|
||||||
image: ghcr.io/electron/build:a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb
|
|
||||||
options: --user root
|
|
||||||
volumes:
|
|
||||||
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
|
||||||
env:
|
|
||||||
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
|
|
||||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac'
|
|
||||||
steps:
|
|
||||||
- name: Checkout Electron
|
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
|
||||||
with:
|
|
||||||
path: src/electron
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: Build Git Cache
|
|
||||||
uses: ./src/electron/.github/actions/build-git-cache
|
|
||||||
with:
|
|
||||||
target-platform: macos
|
|
||||||
123
.github/workflows/build.yml
vendored
123
.github/workflows/build.yml
vendored
@@ -6,7 +6,7 @@ on:
|
|||||||
build-image-sha:
|
build-image-sha:
|
||||||
type: string
|
type: string
|
||||||
description: 'SHA for electron/build image'
|
description: 'SHA for electron/build image'
|
||||||
default: 'a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb'
|
default: 'bc2f48b2415a670de18d13605b1cf0eb5fdbaae1'
|
||||||
required: true
|
required: true
|
||||||
skip-macos:
|
skip-macos:
|
||||||
type: boolean
|
type: boolean
|
||||||
@@ -28,11 +28,6 @@ on:
|
|||||||
description: 'Skip lint check'
|
description: 'Skip lint check'
|
||||||
default: false
|
default: false
|
||||||
required: false
|
required: false
|
||||||
enable-ssh:
|
|
||||||
description: 'Enable SSH debugging'
|
|
||||||
required: false
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
@@ -43,13 +38,10 @@ defaults:
|
|||||||
run:
|
run:
|
||||||
shell: bash
|
shell: bash
|
||||||
|
|
||||||
permissions: {}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
setup:
|
setup:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
|
||||||
pull-requests: read
|
pull-requests: read
|
||||||
outputs:
|
outputs:
|
||||||
docs: ${{ steps.filter.outputs.docs }}
|
docs: ${{ steps.filter.outputs.docs }}
|
||||||
@@ -57,7 +49,7 @@ jobs:
|
|||||||
build-image-sha: ${{ steps.set-output.outputs.build-image-sha }}
|
build-image-sha: ${{ steps.set-output.outputs.build-image-sha }}
|
||||||
docs-only: ${{ steps.set-output.outputs.docs-only }}
|
docs-only: ${{ steps.set-output.outputs.docs-only }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 #v4.0.2
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
|
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
|
||||||
@@ -66,17 +58,13 @@ jobs:
|
|||||||
filters: |
|
filters: |
|
||||||
docs:
|
docs:
|
||||||
- 'docs/**'
|
- 'docs/**'
|
||||||
- README.md
|
|
||||||
- SECURITY.md
|
|
||||||
- CONTRIBUTING.md
|
|
||||||
- CODE_OF_CONDUCT.md
|
|
||||||
src:
|
src:
|
||||||
- '!docs/**'
|
- '!docs/**'
|
||||||
- name: Set Outputs for Build Image SHA & Docs Only
|
- name: Set Outputs for Build Image SHA & Docs Only
|
||||||
id: set-output
|
id: set-output
|
||||||
run: |
|
run: |
|
||||||
if [ -z "${{ inputs.build-image-sha }}" ]; then
|
if [ -z "${{ inputs.build-image-sha }}" ]; then
|
||||||
echo "build-image-sha=a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb" >> "$GITHUB_OUTPUT"
|
echo "build-image-sha=bc2f48b2415a670de18d13605b1cf0eb5fdbaae1" >> "$GITHUB_OUTPUT"
|
||||||
else
|
else
|
||||||
echo "build-image-sha=${{ inputs.build-image-sha }}" >> "$GITHUB_OUTPUT"
|
echo "build-image-sha=${{ inputs.build-image-sha }}" >> "$GITHUB_OUTPUT"
|
||||||
fi
|
fi
|
||||||
@@ -87,30 +75,24 @@ jobs:
|
|||||||
needs: setup
|
needs: setup
|
||||||
if: ${{ !inputs.skip-lint }}
|
if: ${{ !inputs.skip-lint }}
|
||||||
uses: ./.github/workflows/pipeline-electron-lint.yml
|
uses: ./.github/workflows/pipeline-electron-lint.yml
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
with:
|
with:
|
||||||
container: '{"image":"ghcr.io/electron/build:${{ needs.setup.outputs.build-image-sha }}","options":"--user root"}'
|
container: '{"image":"ghcr.io/electron/build:${{ needs.setup.outputs.build-image-sha }}","options":"--user root"}'
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
# Docs Only Jobs
|
# Docs Only Jobs
|
||||||
docs-only:
|
docs-only:
|
||||||
needs: [setup, checkout-linux]
|
needs: setup
|
||||||
if: ${{ needs.setup.outputs.docs-only == 'true' }}
|
if: ${{ needs.setup.outputs.docs-only == 'true' }}
|
||||||
uses: ./.github/workflows/pipeline-electron-docs-only.yml
|
uses: ./.github/workflows/pipeline-electron-docs-only.yml
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
with:
|
with:
|
||||||
container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
container: '{"image":"ghcr.io/electron/build:${{ needs.setup.outputs.build-image-sha }}","options":"--user root"}'
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
# Checkout Jobs
|
# Checkout Jobs
|
||||||
checkout-macos:
|
checkout-macos:
|
||||||
needs: setup
|
needs: setup
|
||||||
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-macos}}
|
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-macos}}
|
||||||
runs-on: electron-arc-centralus-linux-amd64-32core
|
runs-on: electron-arc-linux-amd64-32core
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/electron/build:${{ needs.setup.outputs.build-image-sha }}
|
image: ghcr.io/electron/build:${{ needs.setup.outputs.build-image-sha }}
|
||||||
options: --user root
|
options: --user root
|
||||||
@@ -118,13 +100,12 @@ jobs:
|
|||||||
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
||||||
- /var/run/sas:/var/run/sas
|
- /var/run/sas:/var/run/sas
|
||||||
env:
|
env:
|
||||||
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
|
|
||||||
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'
|
||||||
outputs:
|
outputs:
|
||||||
build-image-sha: ${{ needs.setup.outputs.build-image-sha }}
|
build-image-sha: ${{ needs.setup.outputs.build-image-sha }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Electron
|
- name: Checkout Electron
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
with:
|
with:
|
||||||
path: src/electron
|
path: src/electron
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
@@ -133,14 +114,11 @@ jobs:
|
|||||||
uses: ./src/electron/.github/actions/checkout
|
uses: ./src/electron/.github/actions/checkout
|
||||||
with:
|
with:
|
||||||
generate-sas-token: 'true'
|
generate-sas-token: 'true'
|
||||||
target-platform: macos
|
|
||||||
|
|
||||||
checkout-linux:
|
checkout-linux:
|
||||||
needs: setup
|
needs: setup
|
||||||
if: ${{ !inputs.skip-linux}}
|
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-linux}}
|
||||||
runs-on: electron-arc-centralus-linux-amd64-32core
|
runs-on: electron-arc-linux-amd64-32core
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/electron/build:${{ needs.setup.outputs.build-image-sha }}
|
image: ghcr.io/electron/build:${{ needs.setup.outputs.build-image-sha }}
|
||||||
options: --user root
|
options: --user root
|
||||||
@@ -148,39 +126,30 @@ jobs:
|
|||||||
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
||||||
- /var/run/sas:/var/run/sas
|
- /var/run/sas:/var/run/sas
|
||||||
env:
|
env:
|
||||||
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
|
|
||||||
DD_API_KEY: ${{ secrets.DD_API_KEY }}
|
|
||||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
|
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
|
||||||
PATCH_UP_APP_CREDS: ${{ secrets.PATCH_UP_APP_CREDS }}
|
PATCH_UP_APP_CREDS: ${{ secrets.PATCH_UP_APP_CREDS }}
|
||||||
outputs:
|
outputs:
|
||||||
build-image-sha: ${{ needs.setup.outputs.build-image-sha}}
|
build-image-sha: ${{ needs.setup.outputs.build-image-sha}}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Electron
|
- name: Checkout Electron
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
with:
|
with:
|
||||||
path: src/electron
|
path: src/electron
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
- name: Checkout & Sync & Save
|
- name: Checkout & Sync & Save
|
||||||
uses: ./src/electron/.github/actions/checkout
|
uses: ./src/electron/.github/actions/checkout
|
||||||
with:
|
|
||||||
target-platform: linux
|
|
||||||
|
|
||||||
checkout-windows:
|
checkout-windows:
|
||||||
needs: setup
|
needs: setup
|
||||||
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-windows }}
|
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-windows }}
|
||||||
runs-on: electron-arc-centralus-linux-amd64-32core
|
runs-on: electron-arc-linux-amd64-32core
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/electron/build:${{ needs.setup.outputs.build-image-sha }}
|
image: ghcr.io/electron/build:${{ needs.setup.outputs.build-image-sha }}
|
||||||
options: --user root --device /dev/fuse --cap-add SYS_ADMIN
|
options: --user root --device /dev/fuse --cap-add SYS_ADMIN
|
||||||
volumes:
|
volumes:
|
||||||
- /mnt/win-cache:/mnt/win-cache
|
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
||||||
- /var/run/sas:/var/run/sas
|
|
||||||
env:
|
env:
|
||||||
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
|
|
||||||
CHROMIUM_GIT_COOKIE_WINDOWS_STRING: ${{ secrets.CHROMIUM_GIT_COOKIE_WINDOWS_STRING }}
|
|
||||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_win=True'
|
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_win=True'
|
||||||
TARGET_OS: 'win'
|
TARGET_OS: 'win'
|
||||||
ELECTRON_DEPOT_TOOLS_WIN_TOOLCHAIN: '1'
|
ELECTRON_DEPOT_TOOLS_WIN_TOOLCHAIN: '1'
|
||||||
@@ -188,54 +157,44 @@ jobs:
|
|||||||
build-image-sha: ${{ needs.setup.outputs.build-image-sha}}
|
build-image-sha: ${{ needs.setup.outputs.build-image-sha}}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Electron
|
- name: Checkout Electron
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
with:
|
with:
|
||||||
path: src/electron
|
path: src/electron
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
- name: Checkout & Sync & Save
|
- name: Checkout & Sync & Save
|
||||||
uses: ./src/electron/.github/actions/checkout
|
uses: ./src/electron/.github/actions/checkout
|
||||||
with:
|
|
||||||
generate-sas-token: 'true'
|
|
||||||
target-platform: win
|
|
||||||
|
|
||||||
# GN Check Jobs
|
# GN Check Jobs
|
||||||
macos-gn-check:
|
macos-gn-check:
|
||||||
uses: ./.github/workflows/pipeline-segment-electron-gn-check.yml
|
uses: ./.github/workflows/pipeline-segment-electron-gn-check.yml
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
needs: checkout-macos
|
needs: checkout-macos
|
||||||
with:
|
with:
|
||||||
target-platform: macos
|
target-platform: macos
|
||||||
target-archs: x64 arm64
|
target-archs: x64 arm64
|
||||||
check-runs-on: macos-15
|
check-runs-on: macos-14
|
||||||
gn-build-type: testing
|
gn-build-type: testing
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
linux-gn-check:
|
linux-gn-check:
|
||||||
uses: ./.github/workflows/pipeline-segment-electron-gn-check.yml
|
uses: ./.github/workflows/pipeline-segment-electron-gn-check.yml
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
needs: checkout-linux
|
needs: checkout-linux
|
||||||
if: ${{ needs.setup.outputs.src == 'true' }}
|
|
||||||
with:
|
with:
|
||||||
target-platform: linux
|
target-platform: linux
|
||||||
target-archs: x64 arm arm64
|
target-archs: x64 arm arm64
|
||||||
check-runs-on: electron-arc-centralus-linux-amd64-8core
|
check-runs-on: electron-arc-linux-amd64-8core
|
||||||
check-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
check-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
||||||
gn-build-type: testing
|
gn-build-type: testing
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
windows-gn-check:
|
windows-gn-check:
|
||||||
uses: ./.github/workflows/pipeline-segment-electron-gn-check.yml
|
uses: ./.github/workflows/pipeline-segment-electron-gn-check.yml
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
needs: checkout-windows
|
needs: checkout-windows
|
||||||
with:
|
with:
|
||||||
target-platform: win
|
target-platform: win
|
||||||
target-archs: x64 x86 arm64
|
target-archs: x64 x86 arm64
|
||||||
check-runs-on: electron-arc-centralus-linux-amd64-8core
|
check-runs-on: electron-arc-linux-amd64-8core
|
||||||
check-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-windows.outputs.build-image-sha }}","options":"--user root --device /dev/fuse --cap-add SYS_ADMIN","volumes":["/mnt/win-cache:/mnt/win-cache"]}'
|
check-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-windows.outputs.build-image-sha }}","options":"--user root --device /dev/fuse --cap-add SYS_ADMIN","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
||||||
gn-build-type: testing
|
gn-build-type: testing
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
@@ -248,15 +207,14 @@ jobs:
|
|||||||
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
||||||
needs: checkout-macos
|
needs: checkout-macos
|
||||||
with:
|
with:
|
||||||
build-runs-on: macos-15-xlarge
|
build-runs-on: macos-14-xlarge
|
||||||
test-runs-on: macos-15-large
|
test-runs-on: macos-13
|
||||||
target-platform: macos
|
target-platform: macos
|
||||||
target-arch: x64
|
target-arch: x64
|
||||||
is-release: false
|
is-release: false
|
||||||
gn-build-type: testing
|
gn-build-type: testing
|
||||||
generate-symbols: false
|
generate-symbols: false
|
||||||
upload-to-storage: '0'
|
upload-to-storage: '0'
|
||||||
enable-ssh: ${{ inputs.enable-ssh || false }}
|
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
macos-arm64:
|
macos-arm64:
|
||||||
@@ -267,15 +225,14 @@ jobs:
|
|||||||
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
||||||
needs: checkout-macos
|
needs: checkout-macos
|
||||||
with:
|
with:
|
||||||
build-runs-on: macos-15-xlarge
|
build-runs-on: macos-14-xlarge
|
||||||
test-runs-on: macos-15
|
test-runs-on: macos-14
|
||||||
target-platform: macos
|
target-platform: macos
|
||||||
target-arch: arm64
|
target-arch: arm64
|
||||||
is-release: false
|
is-release: false
|
||||||
gn-build-type: testing
|
gn-build-type: testing
|
||||||
generate-symbols: false
|
generate-symbols: false
|
||||||
upload-to-storage: '0'
|
upload-to-storage: '0'
|
||||||
enable-ssh: ${{ inputs.enable-ssh || false }}
|
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
linux-x64:
|
linux-x64:
|
||||||
@@ -285,10 +242,9 @@ jobs:
|
|||||||
pull-requests: read
|
pull-requests: read
|
||||||
uses: ./.github/workflows/pipeline-electron-build-and-test-and-nan.yml
|
uses: ./.github/workflows/pipeline-electron-build-and-test-and-nan.yml
|
||||||
needs: checkout-linux
|
needs: checkout-linux
|
||||||
if: ${{ needs.setup.outputs.src == 'true' }}
|
|
||||||
with:
|
with:
|
||||||
build-runs-on: electron-arc-centralus-linux-amd64-32core
|
build-runs-on: electron-arc-linux-amd64-32core
|
||||||
test-runs-on: electron-arc-centralus-linux-amd64-4core
|
test-runs-on: electron-arc-linux-amd64-4core
|
||||||
build-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
build-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
||||||
test-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root --privileged --init"}'
|
test-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root --privileged --init"}'
|
||||||
target-platform: linux
|
target-platform: linux
|
||||||
@@ -306,10 +262,9 @@ jobs:
|
|||||||
pull-requests: read
|
pull-requests: read
|
||||||
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
||||||
needs: checkout-linux
|
needs: checkout-linux
|
||||||
if: ${{ needs.setup.outputs.src == 'true' }}
|
|
||||||
with:
|
with:
|
||||||
build-runs-on: electron-arc-centralus-linux-amd64-32core
|
build-runs-on: electron-arc-linux-amd64-32core
|
||||||
test-runs-on: electron-arc-centralus-linux-amd64-4core
|
test-runs-on: electron-arc-linux-amd64-4core
|
||||||
build-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
build-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
||||||
test-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root --privileged --init"}'
|
test-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root --privileged --init"}'
|
||||||
target-platform: linux
|
target-platform: linux
|
||||||
@@ -328,12 +283,11 @@ jobs:
|
|||||||
pull-requests: read
|
pull-requests: read
|
||||||
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
||||||
needs: checkout-linux
|
needs: checkout-linux
|
||||||
if: ${{ needs.setup.outputs.src == 'true' }}
|
|
||||||
with:
|
with:
|
||||||
build-runs-on: electron-arc-centralus-linux-amd64-32core
|
build-runs-on: electron-arc-linux-amd64-32core
|
||||||
test-runs-on: electron-arc-centralus-linux-arm64-4core
|
test-runs-on: electron-arc-linux-arm64-4core
|
||||||
build-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
build-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
||||||
test-container: '{"image":"ghcr.io/electron/test:arm32v7-${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root --privileged --init --memory=12g","volumes":["/home/runner/externals:/mnt/runner-externals"]}'
|
test-container: '{"image":"ghcr.io/electron/test:arm32v7-${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root --privileged --init","volumes":["/home/runner/externals:/mnt/runner-externals"]}'
|
||||||
target-platform: linux
|
target-platform: linux
|
||||||
target-arch: arm
|
target-arch: arm
|
||||||
is-release: false
|
is-release: false
|
||||||
@@ -349,10 +303,9 @@ jobs:
|
|||||||
pull-requests: read
|
pull-requests: read
|
||||||
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
||||||
needs: checkout-linux
|
needs: checkout-linux
|
||||||
if: ${{ needs.setup.outputs.src == 'true' }}
|
|
||||||
with:
|
with:
|
||||||
build-runs-on: electron-arc-centralus-linux-amd64-32core
|
build-runs-on: electron-arc-linux-amd64-32core
|
||||||
test-runs-on: ubuntu-22.04-arm
|
test-runs-on: electron-arc-linux-arm64-4core
|
||||||
build-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
build-container: '{"image":"ghcr.io/electron/build:${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
||||||
test-container: '{"image":"ghcr.io/electron/test:arm64v8-${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root --privileged --init"}'
|
test-container: '{"image":"ghcr.io/electron/test:arm64v8-${{ needs.checkout-linux.outputs.build-image-sha }}","options":"--user root --privileged --init"}'
|
||||||
target-platform: linux
|
target-platform: linux
|
||||||
@@ -369,10 +322,10 @@ jobs:
|
|||||||
issues: read
|
issues: read
|
||||||
pull-requests: read
|
pull-requests: read
|
||||||
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
||||||
needs: checkout-windows
|
needs: setup
|
||||||
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-windows }}
|
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-windows }}
|
||||||
with:
|
with:
|
||||||
build-runs-on: electron-arc-centralus-windows-amd64-16core
|
build-runs-on: electron-arc-windows-amd64-16core
|
||||||
test-runs-on: windows-latest
|
test-runs-on: windows-latest
|
||||||
target-platform: win
|
target-platform: win
|
||||||
target-arch: x64
|
target-arch: x64
|
||||||
@@ -388,10 +341,10 @@ jobs:
|
|||||||
issues: read
|
issues: read
|
||||||
pull-requests: read
|
pull-requests: read
|
||||||
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
||||||
needs: checkout-windows
|
needs: setup
|
||||||
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-windows }}
|
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-windows }}
|
||||||
with:
|
with:
|
||||||
build-runs-on: electron-arc-centralus-windows-amd64-16core
|
build-runs-on: electron-arc-windows-amd64-16core
|
||||||
test-runs-on: windows-latest
|
test-runs-on: windows-latest
|
||||||
target-platform: win
|
target-platform: win
|
||||||
target-arch: x86
|
target-arch: x86
|
||||||
@@ -407,11 +360,11 @@ jobs:
|
|||||||
issues: read
|
issues: read
|
||||||
pull-requests: read
|
pull-requests: read
|
||||||
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
||||||
needs: checkout-windows
|
needs: setup
|
||||||
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-windows }}
|
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-windows }}
|
||||||
with:
|
with:
|
||||||
build-runs-on: electron-arc-centralus-windows-amd64-16core
|
build-runs-on: electron-arc-windows-amd64-16core
|
||||||
test-runs-on: windows-11-arm
|
test-runs-on: electron-hosted-windows-arm64-4core
|
||||||
target-platform: win
|
target-platform: win
|
||||||
target-arch: arm64
|
target-arch: arm64
|
||||||
is-release: false
|
is-release: false
|
||||||
@@ -423,8 +376,6 @@ jobs:
|
|||||||
gha-done:
|
gha-done:
|
||||||
name: GitHub Actions Completed
|
name: GitHub Actions Completed
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
needs: [docs-only, macos-x64, macos-arm64, linux-x64, linux-x64-asan, linux-arm, linux-arm64, windows-x64, windows-x86, windows-arm64]
|
needs: [docs-only, macos-x64, macos-arm64, linux-x64, linux-x64-asan, linux-arm, linux-arm64, windows-x64, windows-x86, windows-arm64]
|
||||||
if: always() && !contains(needs.*.result, 'failure')
|
if: always() && !contains(needs.*.result, 'failure')
|
||||||
steps:
|
steps:
|
||||||
|
|||||||
18
.github/workflows/clean-src-cache.yml
vendored
18
.github/workflows/clean-src-cache.yml
vendored
@@ -1,33 +1,21 @@
|
|||||||
name: Clean Source Cache
|
name: Clean Source Cache
|
||||||
|
|
||||||
# Description:
|
|
||||||
# This workflow cleans up the source cache on the cross-instance cache volume
|
|
||||||
# to free up space. It runs daily at midnight and clears files older than 15 days.
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 0 * * *"
|
- cron: "0 0 * * SUN" # Run at midnight every Sunday
|
||||||
|
|
||||||
permissions: {}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
clean-src-cache:
|
clean-src-cache:
|
||||||
runs-on: electron-arc-centralus-linux-amd64-32core
|
runs-on: electron-arc-linux-amd64-32core
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/electron/build:bc2f48b2415a670de18d13605b1cf0eb5fdbaae1
|
image: ghcr.io/electron/build:bc2f48b2415a670de18d13605b1cf0eb5fdbaae1
|
||||||
options: --user root
|
options: --user root
|
||||||
volumes:
|
volumes:
|
||||||
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
||||||
- /mnt/win-cache:/mnt/win-cache
|
|
||||||
steps:
|
steps:
|
||||||
- name: Cleanup Source Cache
|
- name: Cleanup Source Cache
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
df -h /mnt/cross-instance-cache
|
df -h /mnt/cross-instance-cache
|
||||||
find /mnt/cross-instance-cache -type f -mtime +15 -delete
|
find /mnt/cross-instance-cache -type f -mtime +30 -delete
|
||||||
df -h /mnt/cross-instance-cache
|
df -h /mnt/cross-instance-cache
|
||||||
df -h /mnt/win-cache
|
|
||||||
find /mnt/win-cache -type f -mtime +15 -delete
|
|
||||||
df -h /mnt/win-cache
|
|
||||||
|
|||||||
11
.github/workflows/issue-commented.yml
vendored
11
.github/workflows/issue-commented.yml
vendored
@@ -10,24 +10,15 @@ permissions: {}
|
|||||||
jobs:
|
jobs:
|
||||||
issue-commented:
|
issue-commented:
|
||||||
name: Remove blocked/{need-info,need-repro} on comment
|
name: Remove blocked/{need-info,need-repro} on comment
|
||||||
if: ${{ (contains(github.event.issue.labels.*.name, 'blocked/need-repro') || contains(github.event.issue.labels.*.name, 'blocked/need-info ❌')) && github.event.comment.user.type != 'Bot' }}
|
if: ${{ (contains(github.event.issue.labels.*.name, 'blocked/need-repro') || contains(github.event.issue.labels.*.name, 'blocked/need-info ❌')) && !contains(fromJSON('["MEMBER", "OWNER"]'), github.event.comment.author_association) && github.event.comment.user.type != 'Bot' }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Get author association
|
|
||||||
id: get-author-association
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
run: |
|
|
||||||
AUTHOR_ASSOCIATION=$(gh api /repos/electron/electron/issues/comments/${{ github.event.comment.id }} --jq '.author_association')
|
|
||||||
echo "author_association=$AUTHOR_ASSOCIATION" >> "$GITHUB_OUTPUT"
|
|
||||||
- name: Generate GitHub App token
|
- name: Generate GitHub App token
|
||||||
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
|
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
|
||||||
if: ${{ !contains(fromJSON('["MEMBER", "OWNER", "COLLABORATOR"]'), steps.get-author-association.outputs.author_association) }}
|
|
||||||
id: generate-token
|
id: generate-token
|
||||||
with:
|
with:
|
||||||
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
|
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
|
||||||
- name: Remove label
|
- name: Remove label
|
||||||
if: ${{ !contains(fromJSON('["MEMBER", "OWNER", "COLLABORATOR"]'), steps.get-author-association.outputs.author_association) }}
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
|
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
|
||||||
ISSUE_URL: ${{ github.event.issue.html_url }}
|
ISSUE_URL: ${{ github.event.issue.html_url }}
|
||||||
|
|||||||
15
.github/workflows/issue-labeled.yml
vendored
15
.github/workflows/issue-labeled.yml
vendored
@@ -4,15 +4,14 @@ on:
|
|||||||
issues:
|
issues:
|
||||||
types: [labeled]
|
types: [labeled]
|
||||||
|
|
||||||
permissions: {}
|
permissions: # added using https://github.com/step-security/secure-workflows
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
issue-labeled-with-status:
|
issue-labeled-with-status:
|
||||||
name: status/{confirmed,reviewed} label added
|
name: status/{confirmed,reviewed} label added
|
||||||
if: github.event.label.name == 'status/confirmed' || github.event.label.name == 'status/reviewed'
|
if: github.event.label.name == 'status/confirmed' || github.event.label.name == 'status/reviewed'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
steps:
|
steps:
|
||||||
- name: Generate GitHub App token
|
- name: Generate GitHub App token
|
||||||
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
|
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
|
||||||
@@ -21,19 +20,16 @@ jobs:
|
|||||||
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
|
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
|
||||||
org: electron
|
org: electron
|
||||||
- name: Set status
|
- name: Set status
|
||||||
uses: dsanders11/project-actions/edit-item@2134fe7cc71c58b7ae259c82a8e63c6058255678 # v1.7.0
|
uses: dsanders11/project-actions/edit-item@438b25e007c2f4efec324497fadc6402e7cc61a6 # v1.4.0
|
||||||
with:
|
with:
|
||||||
token: ${{ steps.generate-token.outputs.token }}
|
token: ${{ steps.generate-token.outputs.token }}
|
||||||
project-number: 90
|
project-number: 90
|
||||||
field: Status
|
field: Status
|
||||||
field-value: ✅ Triaged
|
field-value: ✅ Triaged
|
||||||
fail-if-item-not-found: false
|
|
||||||
issue-labeled-blocked:
|
issue-labeled-blocked:
|
||||||
name: blocked/* label added
|
name: blocked/* label added
|
||||||
if: startsWith(github.event.label.name, 'blocked/')
|
if: startsWith(github.event.label.name, 'blocked/')
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
steps:
|
steps:
|
||||||
- name: Generate GitHub App token
|
- name: Generate GitHub App token
|
||||||
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
|
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
|
||||||
@@ -42,13 +38,12 @@ jobs:
|
|||||||
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
|
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
|
||||||
org: electron
|
org: electron
|
||||||
- name: Set status
|
- name: Set status
|
||||||
uses: dsanders11/project-actions/edit-item@2134fe7cc71c58b7ae259c82a8e63c6058255678 # v1.7.0
|
uses: dsanders11/project-actions/edit-item@438b25e007c2f4efec324497fadc6402e7cc61a6 # v1.4.0
|
||||||
with:
|
with:
|
||||||
token: ${{ steps.generate-token.outputs.token }}
|
token: ${{ steps.generate-token.outputs.token }}
|
||||||
project-number: 90
|
project-number: 90
|
||||||
field: Status
|
field: Status
|
||||||
field-value: 🛑 Blocked
|
field-value: 🛑 Blocked
|
||||||
fail-if-item-not-found: false
|
|
||||||
issue-labeled-blocked-need-repro:
|
issue-labeled-blocked-need-repro:
|
||||||
name: blocked/need-repro label added
|
name: blocked/need-repro label added
|
||||||
if: github.event.label.name == 'blocked/need-repro'
|
if: github.event.label.name == 'blocked/need-repro'
|
||||||
@@ -75,7 +70,7 @@ jobs:
|
|||||||
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
|
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
|
||||||
- name: Create comment
|
- name: Create comment
|
||||||
if: ${{ steps.check-for-comment.outputs.SHOULD_COMMENT }}
|
if: ${{ steps.check-for-comment.outputs.SHOULD_COMMENT }}
|
||||||
uses: actions-cool/issues-helper@50068f49b7b2b3857270ead65e2d02e4459b022c # v3.6.2
|
uses: actions-cool/issues-helper@a610082f8ac0cf03e357eb8dd0d5e2ba075e017e # v3.6.0
|
||||||
with:
|
with:
|
||||||
actions: 'create-comment'
|
actions: 'create-comment'
|
||||||
token: ${{ steps.generate-token.outputs.token }}
|
token: ${{ steps.generate-token.outputs.token }}
|
||||||
|
|||||||
25
.github/workflows/issue-opened.yml
vendored
25
.github/workflows/issue-opened.yml
vendored
@@ -11,7 +11,6 @@ jobs:
|
|||||||
add-to-issue-triage:
|
add-to-issue-triage:
|
||||||
if: ${{ contains(github.event.issue.labels.*.name, 'bug :beetle:') }}
|
if: ${{ contains(github.event.issue.labels.*.name, 'bug :beetle:') }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions: {}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Generate GitHub App token
|
- name: Generate GitHub App token
|
||||||
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
|
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
|
||||||
@@ -20,7 +19,7 @@ jobs:
|
|||||||
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
|
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
|
||||||
org: electron
|
org: electron
|
||||||
- name: Add to Issue Triage
|
- name: Add to Issue Triage
|
||||||
uses: dsanders11/project-actions/add-item@2134fe7cc71c58b7ae259c82a8e63c6058255678 # v1.7.0
|
uses: dsanders11/project-actions/add-item@438b25e007c2f4efec324497fadc6402e7cc61a6 # v1.4.0
|
||||||
with:
|
with:
|
||||||
field: Reporter
|
field: Reporter
|
||||||
field-value: ${{ github.event.issue.user.login }}
|
field-value: ${{ github.event.issue.user.login }}
|
||||||
@@ -29,7 +28,6 @@ jobs:
|
|||||||
set-labels:
|
set-labels:
|
||||||
if: ${{ contains(github.event.issue.labels.*.name, 'bug :beetle:') }}
|
if: ${{ contains(github.event.issue.labels.*.name, 'bug :beetle:') }}
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions: {}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Generate GitHub App token
|
- name: Generate GitHub App token
|
||||||
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
|
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
|
||||||
@@ -39,7 +37,7 @@ jobs:
|
|||||||
org: electron
|
org: electron
|
||||||
- run: npm install @electron/fiddle-core@1.3.3 mdast-util-from-markdown@2.0.0 unist-util-select@5.1.0 semver@7.6.0
|
- run: npm install @electron/fiddle-core@1.3.3 mdast-util-from-markdown@2.0.0 unist-util-select@5.1.0 semver@7.6.0
|
||||||
- name: Add labels
|
- name: Add labels
|
||||||
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # v7.0.1
|
||||||
id: add-labels
|
id: add-labels
|
||||||
env:
|
env:
|
||||||
ISSUE_BODY: ${{ github.event.issue.body }}
|
ISSUE_BODY: ${{ github.event.issue.body }}
|
||||||
@@ -62,8 +60,6 @@ jobs:
|
|||||||
// It's possible for multiple versions to be listed -
|
// It's possible for multiple versions to be listed -
|
||||||
// for now check for comma or space separated version.
|
// for now check for comma or space separated version.
|
||||||
const versions = electronVersion.split(/, | /);
|
const versions = electronVersion.split(/, | /);
|
||||||
let hasSupportedVersion = false;
|
|
||||||
|
|
||||||
for (const version of versions) {
|
for (const version of versions) {
|
||||||
const major = semver.coerce(version, { loose: true })?.major;
|
const major = semver.coerce(version, { loose: true })?.major;
|
||||||
if (major) {
|
if (major) {
|
||||||
@@ -79,20 +75,19 @@ jobs:
|
|||||||
labelExists = true;
|
labelExists = true;
|
||||||
} catch {}
|
} catch {}
|
||||||
|
|
||||||
const { ElectronVersions } = await import('${{ github.workspace }}/node_modules/@electron/fiddle-core/dist/index.js');
|
if (labelExists) {
|
||||||
const electronVersions = await ElectronVersions.create(undefined, { ignoreCache: true });
|
// Check if it's an unsupported major
|
||||||
const validVersions = [...electronVersions.supportedMajors, ...electronVersions.prereleaseMajors];
|
const { ElectronVersions } = await import('${{ github.workspace }}/node_modules/@electron/fiddle-core/dist/index.js');
|
||||||
|
const versions = await ElectronVersions.create(undefined, { ignoreCache: true });
|
||||||
|
|
||||||
if (validVersions.includes(major)) {
|
const validVersions = [...versions.supportedMajors, ...versions.prereleaseMajors];
|
||||||
hasSupportedVersion = true;
|
if (validVersions.includes(major)) {
|
||||||
if (labelExists) {
|
|
||||||
labels.push(versionLabel);
|
labels.push(versionLabel);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (labels.length === 0) {
|
||||||
if (!hasSupportedVersion) {
|
|
||||||
core.setOutput('unsupportedMajor', true);
|
core.setOutput('unsupportedMajor', true);
|
||||||
labels.push('blocked/need-info ❌');
|
labels.push('blocked/need-info ❌');
|
||||||
}
|
}
|
||||||
@@ -136,7 +131,7 @@ jobs:
|
|||||||
}
|
}
|
||||||
- name: Create unsupported major comment
|
- name: Create unsupported major comment
|
||||||
if: ${{ steps.add-labels.outputs.unsupportedMajor }}
|
if: ${{ steps.add-labels.outputs.unsupportedMajor }}
|
||||||
uses: actions-cool/issues-helper@50068f49b7b2b3857270ead65e2d02e4459b022c # v3.6.2
|
uses: actions-cool/issues-helper@a610082f8ac0cf03e357eb8dd0d5e2ba075e017e # v3.6.0
|
||||||
with:
|
with:
|
||||||
actions: 'create-comment'
|
actions: 'create-comment'
|
||||||
token: ${{ steps.generate-token.outputs.token }}
|
token: ${{ steps.generate-token.outputs.token }}
|
||||||
|
|||||||
6
.github/workflows/issue-transferred.yml
vendored
6
.github/workflows/issue-transferred.yml
vendored
@@ -10,8 +10,6 @@ jobs:
|
|||||||
issue-transferred:
|
issue-transferred:
|
||||||
name: Issue Transferred
|
name: Issue Transferred
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions: {}
|
|
||||||
if: ${{ !github.event.changes.new_repository.private }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Generate GitHub App token
|
- name: Generate GitHub App token
|
||||||
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
|
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
|
||||||
@@ -20,9 +18,7 @@ jobs:
|
|||||||
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
|
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
|
||||||
org: electron
|
org: electron
|
||||||
- name: Remove from issue triage
|
- name: Remove from issue triage
|
||||||
uses: dsanders11/project-actions/delete-item@2134fe7cc71c58b7ae259c82a8e63c6058255678 # v1.7.0
|
uses: dsanders11/project-actions/delete-item@438b25e007c2f4efec324497fadc6402e7cc61a6 # v1.4.0
|
||||||
with:
|
with:
|
||||||
token: ${{ steps.generate-token.outputs.token }}
|
token: ${{ steps.generate-token.outputs.token }}
|
||||||
project-number: 90
|
project-number: 90
|
||||||
item: ${{ github.event.changes.new_issue.html_url }}
|
|
||||||
fail-if-item-not-found: false
|
|
||||||
|
|||||||
8
.github/workflows/issue-unlabeled.yml
vendored
8
.github/workflows/issue-unlabeled.yml
vendored
@@ -4,15 +4,14 @@ on:
|
|||||||
issues:
|
issues:
|
||||||
types: [unlabeled]
|
types: [unlabeled]
|
||||||
|
|
||||||
permissions: {}
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
issue-unlabeled-blocked:
|
issue-unlabeled-blocked:
|
||||||
name: All blocked/* labels removed
|
name: All blocked/* labels removed
|
||||||
if: startsWith(github.event.label.name, 'blocked/') && github.event.issue.state == 'open'
|
if: startsWith(github.event.label.name, 'blocked/') && github.event.issue.state == 'open'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
steps:
|
steps:
|
||||||
- name: Check for any blocked labels
|
- name: Check for any blocked labels
|
||||||
id: check-for-blocked-labels
|
id: check-for-blocked-labels
|
||||||
@@ -31,10 +30,9 @@ jobs:
|
|||||||
org: electron
|
org: electron
|
||||||
- name: Set status
|
- name: Set status
|
||||||
if: ${{ steps.check-for-blocked-labels.outputs.NOT_BLOCKED }}
|
if: ${{ steps.check-for-blocked-labels.outputs.NOT_BLOCKED }}
|
||||||
uses: dsanders11/project-actions/edit-item@2134fe7cc71c58b7ae259c82a8e63c6058255678 # v1.7.0
|
uses: dsanders11/project-actions/edit-item@438b25e007c2f4efec324497fadc6402e7cc61a6 # v1.4.0
|
||||||
with:
|
with:
|
||||||
token: ${{ steps.generate-token.outputs.token }}
|
token: ${{ steps.generate-token.outputs.token }}
|
||||||
project-number: 90
|
project-number: 90
|
||||||
field: Status
|
field: Status
|
||||||
field-value: 📥 Was Blocked
|
field-value: 📥 Was Blocked
|
||||||
fail-if-item-not-found: false
|
|
||||||
|
|||||||
41
.github/workflows/linux-publish.yml
vendored
41
.github/workflows/linux-publish.yml
vendored
@@ -6,7 +6,7 @@ on:
|
|||||||
build-image-sha:
|
build-image-sha:
|
||||||
type: string
|
type: string
|
||||||
description: 'SHA for electron/build image'
|
description: 'SHA for electron/build image'
|
||||||
default: 'a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb'
|
default: 'bc2f48b2415a670de18d13605b1cf0eb5fdbaae1'
|
||||||
upload-to-storage:
|
upload-to-storage:
|
||||||
description: 'Uploads to Azure storage'
|
description: 'Uploads to Azure storage'
|
||||||
required: false
|
required: false
|
||||||
@@ -17,13 +17,9 @@ on:
|
|||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
|
|
||||||
permissions: {}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
checkout-linux:
|
checkout-linux:
|
||||||
runs-on: electron-arc-centralus-linux-amd64-32core
|
runs-on: electron-arc-linux-amd64-32core
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/electron/build:${{ inputs.build-image-sha }}
|
image: ghcr.io/electron/build:${{ inputs.build-image-sha }}
|
||||||
options: --user root
|
options: --user root
|
||||||
@@ -31,11 +27,10 @@ jobs:
|
|||||||
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
||||||
- /var/run/sas:/var/run/sas
|
- /var/run/sas:/var/run/sas
|
||||||
env:
|
env:
|
||||||
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
|
|
||||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
|
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Electron
|
- name: Checkout Electron
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
with:
|
with:
|
||||||
path: src/electron
|
path: src/electron
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
@@ -43,61 +38,49 @@ jobs:
|
|||||||
uses: ./src/electron/.github/actions/checkout
|
uses: ./src/electron/.github/actions/checkout
|
||||||
|
|
||||||
publish-x64:
|
publish-x64:
|
||||||
uses: ./.github/workflows/pipeline-segment-electron-publish.yml
|
uses: ./.github/workflows/pipeline-segment-electron-build.yml
|
||||||
permissions:
|
|
||||||
artifact-metadata: write
|
|
||||||
attestations: write
|
|
||||||
contents: read
|
|
||||||
id-token: write
|
|
||||||
needs: checkout-linux
|
needs: checkout-linux
|
||||||
with:
|
with:
|
||||||
environment: production-release
|
environment: production-release
|
||||||
build-runs-on: electron-arc-centralus-linux-amd64-32core
|
build-runs-on: electron-arc-linux-amd64-32core
|
||||||
build-container: '{"image":"ghcr.io/electron/build:${{ inputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
build-container: '{"image":"ghcr.io/electron/build:${{ inputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
||||||
target-platform: linux
|
target-platform: linux
|
||||||
target-arch: x64
|
target-arch: x64
|
||||||
is-release: true
|
is-release: true
|
||||||
gn-build-type: release
|
gn-build-type: release
|
||||||
generate-symbols: true
|
generate-symbols: true
|
||||||
|
strip-binaries: true
|
||||||
upload-to-storage: ${{ inputs.upload-to-storage }}
|
upload-to-storage: ${{ inputs.upload-to-storage }}
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
publish-arm:
|
publish-arm:
|
||||||
uses: ./.github/workflows/pipeline-segment-electron-publish.yml
|
uses: ./.github/workflows/pipeline-segment-electron-build.yml
|
||||||
permissions:
|
|
||||||
artifact-metadata: write
|
|
||||||
attestations: write
|
|
||||||
contents: read
|
|
||||||
id-token: write
|
|
||||||
needs: checkout-linux
|
needs: checkout-linux
|
||||||
with:
|
with:
|
||||||
environment: production-release
|
environment: production-release
|
||||||
build-runs-on: electron-arc-centralus-linux-amd64-32core
|
build-runs-on: electron-arc-linux-amd64-32core
|
||||||
build-container: '{"image":"ghcr.io/electron/build:${{ inputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
build-container: '{"image":"ghcr.io/electron/build:${{ inputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
||||||
target-platform: linux
|
target-platform: linux
|
||||||
target-arch: arm
|
target-arch: arm
|
||||||
is-release: true
|
is-release: true
|
||||||
gn-build-type: release
|
gn-build-type: release
|
||||||
generate-symbols: true
|
generate-symbols: true
|
||||||
|
strip-binaries: true
|
||||||
upload-to-storage: ${{ inputs.upload-to-storage }}
|
upload-to-storage: ${{ inputs.upload-to-storage }}
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
publish-arm64:
|
publish-arm64:
|
||||||
uses: ./.github/workflows/pipeline-segment-electron-publish.yml
|
uses: ./.github/workflows/pipeline-segment-electron-build.yml
|
||||||
permissions:
|
|
||||||
artifact-metadata: write
|
|
||||||
attestations: write
|
|
||||||
contents: read
|
|
||||||
id-token: write
|
|
||||||
needs: checkout-linux
|
needs: checkout-linux
|
||||||
with:
|
with:
|
||||||
environment: production-release
|
environment: production-release
|
||||||
build-runs-on: electron-arc-centralus-linux-amd64-32core
|
build-runs-on: electron-arc-linux-amd64-32core
|
||||||
build-container: '{"image":"ghcr.io/electron/build:${{ inputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
build-container: '{"image":"ghcr.io/electron/build:${{ inputs.build-image-sha }}","options":"--user root","volumes":["/mnt/cross-instance-cache:/mnt/cross-instance-cache"]}'
|
||||||
target-platform: linux
|
target-platform: linux
|
||||||
target-arch: arm64
|
target-arch: arm64
|
||||||
is-release: true
|
is-release: true
|
||||||
gn-build-type: release
|
gn-build-type: release
|
||||||
generate-symbols: true
|
generate-symbols: true
|
||||||
|
strip-binaries: true
|
||||||
upload-to-storage: ${{ inputs.upload-to-storage }}
|
upload-to-storage: ${{ inputs.upload-to-storage }}
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|||||||
48
.github/workflows/macos-publish.yml
vendored
48
.github/workflows/macos-publish.yml
vendored
@@ -6,7 +6,7 @@ on:
|
|||||||
build-image-sha:
|
build-image-sha:
|
||||||
type: string
|
type: string
|
||||||
description: 'SHA for electron/build image'
|
description: 'SHA for electron/build image'
|
||||||
default: 'a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb'
|
default: 'bc2f48b2415a670de18d13605b1cf0eb5fdbaae1'
|
||||||
required: true
|
required: true
|
||||||
upload-to-storage:
|
upload-to-storage:
|
||||||
description: 'Uploads to Azure storage'
|
description: 'Uploads to Azure storage'
|
||||||
@@ -18,13 +18,9 @@ on:
|
|||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
|
|
||||||
permissions: {}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
checkout-macos:
|
checkout-macos:
|
||||||
runs-on: electron-arc-centralus-linux-amd64-32core
|
runs-on: electron-arc-linux-amd64-32core
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
container:
|
container:
|
||||||
image: ghcr.io/electron/build:${{ inputs.build-image-sha }}
|
image: ghcr.io/electron/build:${{ inputs.build-image-sha }}
|
||||||
options: --user root
|
options: --user root
|
||||||
@@ -32,11 +28,10 @@ jobs:
|
|||||||
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
||||||
- /var/run/sas:/var/run/sas
|
- /var/run/sas:/var/run/sas
|
||||||
env:
|
env:
|
||||||
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
|
|
||||||
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'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Electron
|
- name: Checkout Electron
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
with:
|
with:
|
||||||
path: src/electron
|
path: src/electron
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
@@ -44,19 +39,13 @@ jobs:
|
|||||||
uses: ./src/electron/.github/actions/checkout
|
uses: ./src/electron/.github/actions/checkout
|
||||||
with:
|
with:
|
||||||
generate-sas-token: 'true'
|
generate-sas-token: 'true'
|
||||||
target-platform: macos
|
|
||||||
|
|
||||||
publish-x64-darwin:
|
publish-x64-darwin:
|
||||||
uses: ./.github/workflows/pipeline-segment-electron-publish.yml
|
uses: ./.github/workflows/pipeline-segment-electron-build.yml
|
||||||
permissions:
|
|
||||||
artifact-metadata: write
|
|
||||||
attestations: write
|
|
||||||
contents: read
|
|
||||||
id-token: write
|
|
||||||
needs: checkout-macos
|
needs: checkout-macos
|
||||||
with:
|
with:
|
||||||
environment: production-release
|
environment: production-release
|
||||||
build-runs-on: macos-15-xlarge
|
build-runs-on: macos-14-xlarge
|
||||||
target-platform: macos
|
target-platform: macos
|
||||||
target-arch: x64
|
target-arch: x64
|
||||||
target-variant: darwin
|
target-variant: darwin
|
||||||
@@ -67,16 +56,11 @@ jobs:
|
|||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
publish-x64-mas:
|
publish-x64-mas:
|
||||||
uses: ./.github/workflows/pipeline-segment-electron-publish.yml
|
uses: ./.github/workflows/pipeline-segment-electron-build.yml
|
||||||
permissions:
|
|
||||||
artifact-metadata: write
|
|
||||||
attestations: write
|
|
||||||
contents: read
|
|
||||||
id-token: write
|
|
||||||
needs: checkout-macos
|
needs: checkout-macos
|
||||||
with:
|
with:
|
||||||
environment: production-release
|
environment: production-release
|
||||||
build-runs-on: macos-15-xlarge
|
build-runs-on: macos-14-xlarge
|
||||||
target-platform: macos
|
target-platform: macos
|
||||||
target-arch: x64
|
target-arch: x64
|
||||||
target-variant: mas
|
target-variant: mas
|
||||||
@@ -87,16 +71,11 @@ jobs:
|
|||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
publish-arm64-darwin:
|
publish-arm64-darwin:
|
||||||
uses: ./.github/workflows/pipeline-segment-electron-publish.yml
|
uses: ./.github/workflows/pipeline-segment-electron-build.yml
|
||||||
permissions:
|
|
||||||
artifact-metadata: write
|
|
||||||
attestations: write
|
|
||||||
contents: read
|
|
||||||
id-token: write
|
|
||||||
needs: checkout-macos
|
needs: checkout-macos
|
||||||
with:
|
with:
|
||||||
environment: production-release
|
environment: production-release
|
||||||
build-runs-on: macos-15-xlarge
|
build-runs-on: macos-14-xlarge
|
||||||
target-platform: macos
|
target-platform: macos
|
||||||
target-arch: arm64
|
target-arch: arm64
|
||||||
target-variant: darwin
|
target-variant: darwin
|
||||||
@@ -107,16 +86,11 @@ jobs:
|
|||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
publish-arm64-mas:
|
publish-arm64-mas:
|
||||||
uses: ./.github/workflows/pipeline-segment-electron-publish.yml
|
uses: ./.github/workflows/pipeline-segment-electron-build.yml
|
||||||
permissions:
|
|
||||||
artifact-metadata: write
|
|
||||||
attestations: write
|
|
||||||
contents: read
|
|
||||||
id-token: write
|
|
||||||
needs: checkout-macos
|
needs: checkout-macos
|
||||||
with:
|
with:
|
||||||
environment: production-release
|
environment: production-release
|
||||||
build-runs-on: macos-15-xlarge
|
build-runs-on: macos-14-xlarge
|
||||||
target-platform: macos
|
target-platform: macos
|
||||||
target-arch: arm64
|
target-arch: arm64
|
||||||
target-variant: mas
|
target-variant: mas
|
||||||
|
|||||||
@@ -1,42 +1,30 @@
|
|||||||
name: Check for Disallowed Non-Maintainer Change
|
name: Check for Non-Maintainer Dependency Change
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request_target:
|
pull_request_target:
|
||||||
paths:
|
paths:
|
||||||
- 'yarn.lock'
|
- 'yarn.lock'
|
||||||
- 'spec/yarn.lock'
|
- 'spec/yarn.lock'
|
||||||
- '.github/workflows/**'
|
|
||||||
- '.github/actions/**'
|
|
||||||
- '.yarn/**'
|
|
||||||
- '.yarnrc.yml'
|
|
||||||
|
|
||||||
permissions: {}
|
permissions: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
check-for-non-maintainer-dependency-change:
|
check-for-non-maintainer-dependency-change:
|
||||||
name: Check for disallowed non-maintainer change
|
name: Check for non-maintainer dependency change
|
||||||
if: ${{ github.event.pull_request.user.type != 'Bot' && !github.event.pull_request.draft }}
|
if: ${{ !contains(fromJSON('["MEMBER", "OWNER"]'), github.event.pull_request.author_association) && github.event.pull_request.user.type != 'Bot' && !github.event.pull_request.draft }}
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Get author association
|
|
||||||
id: get-author-association
|
|
||||||
env:
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
run: |
|
|
||||||
AUTHOR_ASSOCIATION=$(gh api /repos/electron/electron/pulls/${{ github.event.pull_request.number }} --jq '.author_association')
|
|
||||||
echo "author_association=$AUTHOR_ASSOCIATION" >> "$GITHUB_OUTPUT"
|
|
||||||
- name: Check for existing review
|
- name: Check for existing review
|
||||||
id: check-for-review
|
id: check-for-review
|
||||||
if: ${{ !contains(fromJSON('["MEMBER", "OWNER"]'), steps.get-author-association.outputs.author_association) }}
|
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
PR_URL: ${{ github.event.pull_request.html_url }}
|
PR_URL: ${{ github.event.pull_request.html_url }}
|
||||||
run: |
|
run: |
|
||||||
set -eo pipefail
|
set -eo pipefail
|
||||||
REVIEW_COUNT=$(gh pr view $PR_URL --json reviews | jq '[ .reviews[] | select(.author.login == "github-actions") | select(.body | startswith("<!-- disallowed-non-maintainer-change -->")) ] | length')
|
REVIEW_COUNT=$(gh pr view $PR_URL --json reviews | jq '[ .reviews[] | select(.author.login == "github-actions") | select(.body | startswith("<!-- no-dependency-change -->")) ] | length')
|
||||||
if [[ $REVIEW_COUNT -eq 0 ]]; then
|
if [[ $REVIEW_COUNT -eq 0 ]]; then
|
||||||
echo "SHOULD_REVIEW=1" >> "$GITHUB_OUTPUT"
|
echo "SHOULD_REVIEW=1" >> "$GITHUB_OUTPUT"
|
||||||
fi
|
fi
|
||||||
@@ -46,4 +34,4 @@ jobs:
|
|||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
PR_URL: ${{ github.event.pull_request.html_url }}
|
PR_URL: ${{ github.event.pull_request.html_url }}
|
||||||
run: |
|
run: |
|
||||||
printf "<!-- disallowed-non-maintainer-change -->\n\nHello @${{ github.event.pull_request.user.login }}! It looks like this pull request touches one of our dependency or CI files, and per [our contribution policy](https://github.com/electron/electron/blob/main/CONTRIBUTING.md#dependencies-upgrades-policy) we do not accept these types of changes in PRs." | gh pr review $PR_URL -r --body-file=-
|
printf "<!-- no-dependency-change -->\n\nHello @${{ github.event.pull_request.user.login }}! It looks like this pull request touches one of our dependency files, and per [our contribution policy](https://github.com/electron/electron/blob/main/CONTRIBUTING.md#dependencies-upgrades-policy) we do not accept these types of changes in PRs." | gh pr review $PR_URL -r --body-file=-
|
||||||
|
|||||||
@@ -55,17 +55,13 @@ on:
|
|||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
|
|
||||||
permissions: {}
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: electron-build-and-test-and-nan-${{ inputs.target-platform }}-${{ inputs.target-arch }}-${{ github.ref_protected == true && github.run_id || github.ref }}
|
group: electron-build-and-test-and-nan-${{ inputs.target-platform }}-${{ inputs.target-arch }}-${{ github.ref }}
|
||||||
cancel-in-progress: ${{ github.ref_protected != true }}
|
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && !endsWith(github.ref, '-x-y') }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
uses: ./.github/workflows/pipeline-segment-electron-build.yml
|
uses: ./.github/workflows/pipeline-segment-electron-build.yml
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
with:
|
with:
|
||||||
build-runs-on: ${{ inputs.build-runs-on }}
|
build-runs-on: ${{ inputs.build-runs-on }}
|
||||||
build-container: ${{ inputs.build-container }}
|
build-container: ${{ inputs.build-container }}
|
||||||
@@ -78,10 +74,6 @@ jobs:
|
|||||||
secrets: inherit
|
secrets: inherit
|
||||||
test:
|
test:
|
||||||
uses: ./.github/workflows/pipeline-segment-electron-test.yml
|
uses: ./.github/workflows/pipeline-segment-electron-test.yml
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
issues: read
|
|
||||||
pull-requests: read
|
|
||||||
needs: build
|
needs: build
|
||||||
with:
|
with:
|
||||||
target-arch: ${{ inputs.target-arch }}
|
target-arch: ${{ inputs.target-arch }}
|
||||||
@@ -91,8 +83,6 @@ jobs:
|
|||||||
secrets: inherit
|
secrets: inherit
|
||||||
nn-test:
|
nn-test:
|
||||||
uses: ./.github/workflows/pipeline-segment-node-nan-test.yml
|
uses: ./.github/workflows/pipeline-segment-node-nan-test.yml
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
needs: build
|
needs: build
|
||||||
with:
|
with:
|
||||||
target-arch: ${{ inputs.target-arch }}
|
target-arch: ${{ inputs.target-arch }}
|
||||||
|
|||||||
@@ -54,23 +54,19 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
enable-ssh:
|
|
||||||
description: 'Enable SSH debugging'
|
|
||||||
required: false
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: electron-build-and-test-${{ inputs.target-platform }}-${{ inputs.target-arch }}-${{ github.ref_protected == true && github.run_id || github.ref }}
|
group: electron-build-and-test-${{ inputs.target-platform }}-${{ inputs.target-arch }}-${{ github.ref }}
|
||||||
cancel-in-progress: ${{ github.ref_protected != true }}
|
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && !endsWith(github.ref, '-x-y') }}
|
||||||
|
|
||||||
permissions: {}
|
permissions:
|
||||||
|
contents: read
|
||||||
|
issues: read
|
||||||
|
pull-requests: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
uses: ./.github/workflows/pipeline-segment-electron-build.yml
|
uses: ./.github/workflows/pipeline-segment-electron-build.yml
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
with:
|
with:
|
||||||
build-runs-on: ${{ inputs.build-runs-on }}
|
build-runs-on: ${{ inputs.build-runs-on }}
|
||||||
build-container: ${{ inputs.build-container }}
|
build-container: ${{ inputs.build-container }}
|
||||||
@@ -80,21 +76,15 @@ jobs:
|
|||||||
gn-build-type: ${{ inputs.gn-build-type }}
|
gn-build-type: ${{ inputs.gn-build-type }}
|
||||||
generate-symbols: ${{ inputs.generate-symbols }}
|
generate-symbols: ${{ inputs.generate-symbols }}
|
||||||
upload-to-storage: ${{ inputs.upload-to-storage }}
|
upload-to-storage: ${{ inputs.upload-to-storage }}
|
||||||
is-asan: ${{ inputs.is-asan }}
|
is-asan: ${{ inputs.is-asan}}
|
||||||
enable-ssh: ${{ inputs.enable-ssh }}
|
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
test:
|
test:
|
||||||
uses: ./.github/workflows/pipeline-segment-electron-test.yml
|
uses: ./.github/workflows/pipeline-segment-electron-test.yml
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
issues: read
|
|
||||||
pull-requests: read
|
|
||||||
needs: build
|
needs: build
|
||||||
with:
|
with:
|
||||||
target-arch: ${{ inputs.target-arch }}
|
target-arch: ${{ inputs.target-arch }}
|
||||||
target-platform: ${{ inputs.target-platform }}
|
target-platform: ${{ inputs.target-platform }}
|
||||||
test-runs-on: ${{ inputs.test-runs-on }}
|
test-runs-on: ${{ inputs.test-runs-on }}
|
||||||
test-container: ${{ inputs.test-container }}
|
test-container: ${{ inputs.test-container }}
|
||||||
is-asan: ${{ inputs.is-asan }}
|
is-asan: ${{ inputs.is-asan}}
|
||||||
enable-ssh: ${{ inputs.enable-ssh }}
|
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|||||||
@@ -8,42 +8,19 @@ on:
|
|||||||
description: 'Container to run the docs-only ts compile in'
|
description: 'Container to run the docs-only ts compile in'
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
permissions: {}
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: electron-docs-only-${{ github.ref }}
|
group: electron-docs-only-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
|
||||||
GCLIENT_EXTRA_ARGS: --custom-var=checkout_arm=True --custom-var=checkout_arm64=True
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
docs-only:
|
docs-only:
|
||||||
name: Docs Only Compile
|
name: Docs Only Compile
|
||||||
runs-on: electron-arc-centralus-linux-amd64-4core
|
runs-on: electron-arc-linux-amd64-4core
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
container: ${{ fromJSON(inputs.container) }}
|
container: ${{ fromJSON(inputs.container) }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Electron
|
- name: Checkout Electron
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
with:
|
|
||||||
path: src/electron
|
|
||||||
fetch-depth: 0
|
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
|
||||||
- name: Generate DEPS Hash
|
|
||||||
run: |
|
|
||||||
node src/electron/script/generate-deps-hash.js
|
|
||||||
DEPSHASH=v1-src-cache-$(cat src/electron/.depshash)
|
|
||||||
echo "DEPSHASH=$DEPSHASH" >> $GITHUB_ENV
|
|
||||||
echo "CACHE_PATH=$DEPSHASH.tar" >> $GITHUB_ENV
|
|
||||||
- name: Restore src cache via AKS
|
|
||||||
uses: ./src/electron/.github/actions/restore-cache-aks
|
|
||||||
with:
|
|
||||||
target-platform: linux
|
|
||||||
- name: Checkout Electron
|
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
|
||||||
with:
|
with:
|
||||||
path: src/electron
|
path: src/electron
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
@@ -54,12 +31,12 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd src/electron
|
cd src/electron
|
||||||
node script/yarn.js create-typescript-definitions
|
node script/yarn create-typescript-definitions
|
||||||
node script/yarn.js tsc -p tsconfig.default_app.json --noEmit
|
node script/yarn tsc -p tsconfig.default_app.json --noEmit
|
||||||
for f in build/webpack/*.js
|
for f in build/webpack/*.js
|
||||||
do
|
do
|
||||||
out="${f:29}"
|
out="${f:29}"
|
||||||
if [ "$out" != "base.js" ]; then
|
if [ "$out" != "base.js" ]; then
|
||||||
node script/yarn.js webpack --config $f --output-filename=$out --output-path=./.tmp --env mode=development
|
node script/yarn webpack --config $f --output-filename=$out --output-path=./.tmp --env mode=development
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
34
.github/workflows/pipeline-electron-lint.yml
vendored
34
.github/workflows/pipeline-electron-lint.yml
vendored
@@ -8,34 +8,25 @@ on:
|
|||||||
description: 'Container to run lint in'
|
description: 'Container to run lint in'
|
||||||
type: string
|
type: string
|
||||||
|
|
||||||
permissions: {}
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: electron-lint-${{ github.ref_protected == true && github.run_id || github.ref }}
|
group: electron-lint-${{ github.ref }}
|
||||||
cancel-in-progress: ${{ github.ref_protected != true }}
|
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && !endsWith(github.ref, '-x-y') }}
|
||||||
|
|
||||||
env:
|
|
||||||
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
name: Lint
|
name: Lint
|
||||||
runs-on: electron-arc-centralus-linux-amd64-4core
|
runs-on: electron-arc-linux-amd64-4core
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
timeout-minutes: 20
|
timeout-minutes: 20
|
||||||
container: ${{ fromJSON(inputs.container) }}
|
container: ${{ fromJSON(inputs.container) }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Electron
|
- name: Checkout Electron
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
with:
|
with:
|
||||||
path: src/electron
|
path: src/electron
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
uses: ./src/electron/.github/actions/install-dependencies
|
uses: ./src/electron/.github/actions/install-dependencies
|
||||||
- name: Set Chromium Git Cookie
|
|
||||||
uses: ./src/electron/.github/actions/set-chromium-cookie
|
|
||||||
- name: Setup third_party Depot Tools
|
- name: Setup third_party Depot Tools
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@@ -65,11 +56,6 @@ jobs:
|
|||||||
curl -sL "https://chromium.googlesource.com/chromium/src/+/${chromium_revision}/buildtools/DEPS?format=TEXT" | base64 -d > src/buildtools/DEPS
|
curl -sL "https://chromium.googlesource.com/chromium/src/+/${chromium_revision}/buildtools/DEPS?format=TEXT" | base64 -d > src/buildtools/DEPS
|
||||||
|
|
||||||
gclient sync --spec="solutions=[{'name':'src/buildtools','url':None,'deps_file':'DEPS','custom_vars':{'process_deps':True},'managed':False}]"
|
gclient sync --spec="solutions=[{'name':'src/buildtools','url':None,'deps_file':'DEPS','custom_vars':{'process_deps':True},'managed':False}]"
|
||||||
- name: Add problem matchers
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
echo "::add-matcher::src/electron/.github/problem-matchers/eslint-stylish.json"
|
|
||||||
echo "::add-matcher::src/electron/.github/problem-matchers/markdownlint.json"
|
|
||||||
- name: Run Lint
|
- name: Run Lint
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@@ -80,15 +66,11 @@ jobs:
|
|||||||
# but then we would lint its contents (at least gn format), and it doesn't pass it.
|
# but then we would lint its contents (at least gn format), and it doesn't pass it.
|
||||||
|
|
||||||
cd src/electron
|
cd src/electron
|
||||||
node script/yarn.js install --immutable
|
node script/yarn install --frozen-lockfile
|
||||||
node script/yarn.js lint
|
node script/yarn lint
|
||||||
- name: Run Script Typechecker
|
- name: Run Script Typechecker
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd src/electron
|
cd src/electron
|
||||||
node script/yarn.js tsc -p tsconfig.script.json
|
node script/yarn tsc -p tsconfig.script.json
|
||||||
- name: Check GHA Workflows
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
cd src/electron
|
|
||||||
node script/copy-pipeline-segment-publish.js --check
|
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ on:
|
|||||||
required: true
|
required: true
|
||||||
target-arch:
|
target-arch:
|
||||||
type: string
|
type: string
|
||||||
description: 'Arch to build for, can be x64, arm64, ia32 or arm'
|
description: 'Arch to build for, can be x64, arm64 or arm'
|
||||||
required: true
|
required: true
|
||||||
target-variant:
|
target-variant:
|
||||||
type: string
|
type: string
|
||||||
@@ -48,34 +48,29 @@ on:
|
|||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
default: '0'
|
default: '0'
|
||||||
|
strip-binaries:
|
||||||
|
description: 'Strip the binaries before release (Linux only)'
|
||||||
|
required: false
|
||||||
|
type: boolean
|
||||||
|
default: false
|
||||||
is-asan:
|
is-asan:
|
||||||
description: 'Building the Address Sanitizer (ASan) Linux build'
|
description: 'Building the Address Sanitizer (ASan) Linux build'
|
||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
enable-ssh:
|
|
||||||
description: 'Enable SSH debugging'
|
|
||||||
required: false
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
|
|
||||||
permissions: {}
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: electron-build-${{ inputs.target-platform }}-${{ inputs.target-arch }}-${{ inputs.target-variant }}-${{ inputs.is-asan }}-${{ github.ref_protected == true && github.run_id || github.ref }}
|
group: electron-build-${{ inputs.target-platform }}-${{ inputs.target-arch }}-${{ inputs.target-variant }}-${{ inputs.is-asan }}-${{ github.ref }}
|
||||||
cancel-in-progress: ${{ github.ref_protected != true }}
|
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && !endsWith(github.ref, '-x-y') }}
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
|
|
||||||
CHROMIUM_GIT_COOKIE_WINDOWS_STRING: ${{ secrets.CHROMIUM_GIT_COOKIE_WINDOWS_STRING }}
|
|
||||||
DD_API_KEY: ${{ secrets.DD_API_KEY }}
|
|
||||||
ELECTRON_ARTIFACTS_BLOB_STORAGE: ${{ secrets.ELECTRON_ARTIFACTS_BLOB_STORAGE }}
|
ELECTRON_ARTIFACTS_BLOB_STORAGE: ${{ secrets.ELECTRON_ARTIFACTS_BLOB_STORAGE }}
|
||||||
ELECTRON_RBE_JWT: ${{ secrets.ELECTRON_RBE_JWT }}
|
ELECTRON_RBE_JWT: ${{ secrets.ELECTRON_RBE_JWT }}
|
||||||
SUDOWOODO_EXCHANGE_URL: ${{ secrets.SUDOWOODO_EXCHANGE_URL }}
|
SUDOWOODO_EXCHANGE_URL: ${{ secrets.SUDOWOODO_EXCHANGE_URL }}
|
||||||
SUDOWOODO_EXCHANGE_TOKEN: ${{ secrets.SUDOWOODO_EXCHANGE_TOKEN }}
|
SUDOWOODO_EXCHANGE_TOKEN: ${{ secrets.SUDOWOODO_EXCHANGE_TOKEN }}
|
||||||
GCLIENT_EXTRA_ARGS: ${{ inputs.target-platform == 'macos' && '--custom-var=checkout_mac=True --custom-var=host_os=mac' || inputs.target-platform == 'win' && '--custom-var=checkout_win=True' || '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' }}
|
GCLIENT_EXTRA_ARGS: ${{ inputs.target-platform == 'macos' && '--custom-var=checkout_mac=True --custom-var=host_os=mac' || inputs.target-platform == 'win' && '--custom-var=checkout_win=True' || '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' }}
|
||||||
ELECTRON_OUT_DIR: Default
|
ELECTRON_OUT_DIR: Default
|
||||||
ACTIONS_STEP_DEBUG: ${{ secrets.ACTIONS_STEP_DEBUG }}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@@ -83,34 +78,20 @@ jobs:
|
|||||||
run:
|
run:
|
||||||
shell: bash
|
shell: bash
|
||||||
runs-on: ${{ inputs.build-runs-on }}
|
runs-on: ${{ inputs.build-runs-on }}
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
container: ${{ fromJSON(inputs.build-container) }}
|
container: ${{ fromJSON(inputs.build-container) }}
|
||||||
environment: ${{ inputs.environment }}
|
environment: ${{ inputs.environment }}
|
||||||
env:
|
env:
|
||||||
TARGET_ARCH: ${{ inputs.target-arch }}
|
TARGET_ARCH: ${{ inputs.target-arch }}
|
||||||
TARGET_PLATFORM: ${{ inputs.target-platform }}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Create src dir
|
- name: Create src dir
|
||||||
run: |
|
run: |
|
||||||
mkdir src
|
mkdir src
|
||||||
- name: Checkout Electron
|
- name: Checkout Electron
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
with:
|
with:
|
||||||
path: src/electron
|
path: src/electron
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
- name: Setup SSH Debugging
|
|
||||||
if: ${{ inputs.target-platform == 'macos' && (inputs.enable-ssh || env.ACTIONS_STEP_DEBUG == 'true') }}
|
|
||||||
uses: ./src/electron/.github/actions/ssh-debug
|
|
||||||
with:
|
|
||||||
tunnel: 'true'
|
|
||||||
env:
|
|
||||||
CLOUDFLARE_TUNNEL_CERT: ${{ secrets.CLOUDFLARE_TUNNEL_CERT }}
|
|
||||||
CLOUDFLARE_TUNNEL_HOSTNAME: ${{ vars.CLOUDFLARE_TUNNEL_HOSTNAME }}
|
|
||||||
CLOUDFLARE_USER_CA_CERT: ${{ secrets.CLOUDFLARE_USER_CA_CERT }}
|
|
||||||
AUTHORIZED_USERS: ${{ secrets.SSH_DEBUG_AUTHORIZED_USERS }}
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- name: Free up space (macOS)
|
- name: Free up space (macOS)
|
||||||
if: ${{ inputs.target-platform == 'macos' }}
|
if: ${{ inputs.target-platform == 'macos' }}
|
||||||
uses: ./src/electron/.github/actions/free-space-macos
|
uses: ./src/electron/.github/actions/free-space-macos
|
||||||
@@ -119,9 +100,9 @@ jobs:
|
|||||||
run: df -h
|
run: df -h
|
||||||
- name: Setup Node.js/npm
|
- name: Setup Node.js/npm
|
||||||
if: ${{ inputs.target-platform == 'macos' }}
|
if: ${{ inputs.target-platform == 'macos' }}
|
||||||
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903
|
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af
|
||||||
with:
|
with:
|
||||||
node-version: 20.19.x
|
node-version: 20.11.x
|
||||||
cache: yarn
|
cache: yarn
|
||||||
cache-dependency-path: src/electron/yarn.lock
|
cache-dependency-path: src/electron/yarn.lock
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
@@ -144,10 +125,24 @@ jobs:
|
|||||||
GN_EXTRA_ARGS='is_asan=true'
|
GN_EXTRA_ARGS='is_asan=true'
|
||||||
fi
|
fi
|
||||||
echo "GN_EXTRA_ARGS=$GN_EXTRA_ARGS" >> $GITHUB_ENV
|
echo "GN_EXTRA_ARGS=$GN_EXTRA_ARGS" >> $GITHUB_ENV
|
||||||
- name: Set Chromium Git Cookie
|
- name: Get Depot Tools
|
||||||
uses: ./src/electron/.github/actions/set-chromium-cookie
|
timeout-minutes: 5
|
||||||
- name: Install Build Tools
|
run: |
|
||||||
uses: ./src/electron/.github/actions/install-build-tools
|
git clone --filter=tree:0 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||||
|
|
||||||
|
SEDOPTION="-i"
|
||||||
|
if [ "`uname`" = "Darwin" ]; then
|
||||||
|
SEDOPTION="-i ''"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# remove ninjalog_uploader_wrapper.py from autoninja since we don't use it and it causes problems
|
||||||
|
sed $SEDOPTION '/ninjalog_uploader_wrapper.py/d' ./depot_tools/autoninja
|
||||||
|
|
||||||
|
# Ensure depot_tools does not update.
|
||||||
|
test -d depot_tools && cd depot_tools
|
||||||
|
touch .disable_auto_update
|
||||||
|
- name: Add Depot Tools to PATH
|
||||||
|
run: echo "$(pwd)/depot_tools" >> $GITHUB_PATH
|
||||||
- name: Generate DEPS Hash
|
- name: Generate DEPS Hash
|
||||||
run: |
|
run: |
|
||||||
node src/electron/script/generate-deps-hash.js
|
node src/electron/script/generate-deps-hash.js
|
||||||
@@ -155,29 +150,27 @@ jobs:
|
|||||||
echo "DEPSHASH=$DEPSHASH" >> $GITHUB_ENV
|
echo "DEPSHASH=$DEPSHASH" >> $GITHUB_ENV
|
||||||
echo "CACHE_PATH=$DEPSHASH.tar" >> $GITHUB_ENV
|
echo "CACHE_PATH=$DEPSHASH.tar" >> $GITHUB_ENV
|
||||||
- name: Restore src cache via AZCopy
|
- name: Restore src cache via AZCopy
|
||||||
if: ${{ inputs.target-platform != 'linux' }}
|
if: ${{ inputs.target-platform == 'macos' }}
|
||||||
uses: ./src/electron/.github/actions/restore-cache-azcopy
|
uses: ./src/electron/.github/actions/restore-cache-azcopy
|
||||||
with:
|
|
||||||
target-platform: ${{ inputs.target-platform }}
|
|
||||||
- name: Restore src cache via AKS
|
- name: Restore src cache via AKS
|
||||||
if: ${{ inputs.target-platform == 'linux' }}
|
if: ${{ inputs.target-platform == 'linux' }}
|
||||||
uses: ./src/electron/.github/actions/restore-cache-aks
|
uses: ./src/electron/.github/actions/restore-cache-aks
|
||||||
|
- name: Checkout src via gclient sync
|
||||||
|
if: ${{ inputs.target-platform == 'win' }}
|
||||||
|
uses: ./src/electron/.github/actions/checkout
|
||||||
|
with:
|
||||||
|
use-cache: 'false'
|
||||||
- name: Checkout Electron
|
- name: Checkout Electron
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
with:
|
with:
|
||||||
path: src/electron
|
path: src/electron
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
- name: Fix Sync
|
- name: Install Build Tools
|
||||||
if: ${{ inputs.target-platform != 'linux' }}
|
uses: ./src/electron/.github/actions/install-build-tools
|
||||||
uses: ./src/electron/.github/actions/fix-sync
|
|
||||||
with:
|
|
||||||
target-platform: ${{ inputs.target-platform }}
|
|
||||||
env:
|
|
||||||
ELECTRON_DEPOT_TOOLS_DISABLE_LOG: true
|
|
||||||
- name: Init Build Tools
|
- name: Init Build Tools
|
||||||
run: |
|
run: |
|
||||||
e init -f --root=$(pwd) --out=Default ${{ inputs.gn-build-type }} --import ${{ inputs.gn-build-type }} --target-cpu ${{ inputs.target-arch }} --remote-build siso
|
e init -f --root=$(pwd) --out=Default ${{ inputs.gn-build-type }} --import ${{ inputs.gn-build-type }} --target-cpu ${{ inputs.target-arch }}
|
||||||
- name: Run Electron Only Hooks
|
- name: Run Electron Only Hooks
|
||||||
run: |
|
run: |
|
||||||
e d gclient runhooks --spec="solutions=[{'name':'src/electron','url':None,'deps_file':'DEPS','custom_vars':{'process_deps':False},'managed':False}]"
|
e d gclient runhooks --spec="solutions=[{'name':'src/electron','url':None,'deps_file':'DEPS','custom_vars':{'process_deps':False},'managed':False}]"
|
||||||
@@ -187,6 +180,12 @@ jobs:
|
|||||||
echo "DEPSHASH=$(cat src/electron/.depshash)" >> $GITHUB_ENV
|
echo "DEPSHASH=$(cat src/electron/.depshash)" >> $GITHUB_ENV
|
||||||
- name: Add CHROMIUM_BUILDTOOLS_PATH to env
|
- name: Add CHROMIUM_BUILDTOOLS_PATH to env
|
||||||
run: echo "CHROMIUM_BUILDTOOLS_PATH=$(pwd)/src/buildtools" >> $GITHUB_ENV
|
run: echo "CHROMIUM_BUILDTOOLS_PATH=$(pwd)/src/buildtools" >> $GITHUB_ENV
|
||||||
|
- name: Fix Sync (macOS)
|
||||||
|
if: ${{ inputs.target-platform == 'macos' }}
|
||||||
|
uses: ./src/electron/.github/actions/fix-sync-macos
|
||||||
|
- name: Setup Number of Ninja Processes
|
||||||
|
run: |
|
||||||
|
echo "NUMBER_OF_NINJA_PROCESSES=${{ inputs.target-platform != 'macos' && '300' || '200' }}" >> $GITHUB_ENV
|
||||||
- name: Free up space (macOS)
|
- name: Free up space (macOS)
|
||||||
if: ${{ inputs.target-platform == 'macos' }}
|
if: ${{ inputs.target-platform == 'macos' }}
|
||||||
uses: ./src/electron/.github/actions/free-space-macos
|
uses: ./src/electron/.github/actions/free-space-macos
|
||||||
@@ -199,6 +198,7 @@ jobs:
|
|||||||
artifact-platform: ${{ inputs.target-platform == 'macos' && 'darwin' || inputs.target-platform }}
|
artifact-platform: ${{ inputs.target-platform == 'macos' && 'darwin' || inputs.target-platform }}
|
||||||
is-release: '${{ inputs.is-release }}'
|
is-release: '${{ inputs.is-release }}'
|
||||||
generate-symbols: '${{ inputs.generate-symbols }}'
|
generate-symbols: '${{ inputs.generate-symbols }}'
|
||||||
|
strip-binaries: '${{ inputs.strip-binaries }}'
|
||||||
upload-to-storage: '${{ inputs.upload-to-storage }}'
|
upload-to-storage: '${{ inputs.upload-to-storage }}'
|
||||||
is-asan: '${{ inputs.is-asan }}'
|
is-asan: '${{ inputs.is-asan }}'
|
||||||
- name: Set GN_EXTRA_ARGS for MAS Build
|
- name: Set GN_EXTRA_ARGS for MAS Build
|
||||||
|
|||||||
@@ -26,8 +26,6 @@ on:
|
|||||||
type: string
|
type: string
|
||||||
default: testing
|
default: testing
|
||||||
|
|
||||||
permissions: {}
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: electron-gn-check-${{ inputs.target-platform }}-${{ github.ref }}
|
group: electron-gn-check-${{ inputs.target-platform }}-${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
@@ -43,12 +41,10 @@ jobs:
|
|||||||
run:
|
run:
|
||||||
shell: bash
|
shell: bash
|
||||||
runs-on: ${{ inputs.check-runs-on }}
|
runs-on: ${{ inputs.check-runs-on }}
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
container: ${{ fromJSON(inputs.check-container) }}
|
container: ${{ fromJSON(inputs.check-container) }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Electron
|
- name: Checkout Electron
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
with:
|
with:
|
||||||
path: src/electron
|
path: src/electron
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
@@ -69,9 +65,7 @@ jobs:
|
|||||||
sudo rm -rf $TMPDIR/del-target
|
sudo rm -rf $TMPDIR/del-target
|
||||||
- name: Check disk space after freeing up space
|
- name: Check disk space after freeing up space
|
||||||
if: ${{ inputs.target-platform == 'macos' }}
|
if: ${{ inputs.target-platform == 'macos' }}
|
||||||
run: df -h
|
run: df -h
|
||||||
- name: Set Chromium Git Cookie
|
|
||||||
uses: ./src/electron/.github/actions/set-chromium-cookie
|
|
||||||
- name: Install Build Tools
|
- name: Install Build Tools
|
||||||
uses: ./src/electron/.github/actions/install-build-tools
|
uses: ./src/electron/.github/actions/install-build-tools
|
||||||
- name: Enable windows toolchain
|
- name: Enable windows toolchain
|
||||||
@@ -87,13 +81,9 @@ jobs:
|
|||||||
- name: Restore src cache via AZCopy
|
- name: Restore src cache via AZCopy
|
||||||
if: ${{ inputs.target-platform == 'macos' }}
|
if: ${{ inputs.target-platform == 'macos' }}
|
||||||
uses: ./src/electron/.github/actions/restore-cache-azcopy
|
uses: ./src/electron/.github/actions/restore-cache-azcopy
|
||||||
with:
|
|
||||||
target-platform: ${{ inputs.target-platform }}
|
|
||||||
- name: Restore src cache via AKS
|
- name: Restore src cache via AKS
|
||||||
if: ${{ inputs.target-platform == 'linux' || inputs.target-platform == 'win' }}
|
if: ${{ inputs.target-platform == 'linux' || inputs.target-platform == 'win' }}
|
||||||
uses: ./src/electron/.github/actions/restore-cache-aks
|
uses: ./src/electron/.github/actions/restore-cache-aks
|
||||||
with:
|
|
||||||
target-platform: ${{ inputs.target-platform }}
|
|
||||||
- name: Run Electron Only Hooks
|
- name: Run Electron Only Hooks
|
||||||
run: |
|
run: |
|
||||||
echo "solutions=[{'name':'src/electron','url':None,'deps_file':'DEPS','custom_vars':{'process_deps':False},'managed':False}]" > tmpgclient
|
echo "solutions=[{'name':'src/electron','url':None,'deps_file':'DEPS','custom_vars':{'process_deps':False},'managed':False}]" > tmpgclient
|
||||||
@@ -115,7 +105,7 @@ jobs:
|
|||||||
- name: Add CHROMIUM_BUILDTOOLS_PATH to env
|
- name: Add CHROMIUM_BUILDTOOLS_PATH to env
|
||||||
run: echo "CHROMIUM_BUILDTOOLS_PATH=$(pwd)/src/buildtools" >> $GITHUB_ENV
|
run: echo "CHROMIUM_BUILDTOOLS_PATH=$(pwd)/src/buildtools" >> $GITHUB_ENV
|
||||||
- name: Checkout Electron
|
- name: Checkout Electron
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
with:
|
with:
|
||||||
path: src/electron
|
path: src/electron
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|||||||
@@ -1,237 +0,0 @@
|
|||||||
# AUTOGENERATED FILE - DO NOT EDIT MANUALLY
|
|
||||||
# ONLY EDIT .github/workflows/pipeline-segment-electron-build.yml
|
|
||||||
|
|
||||||
name: Pipeline Segment - Electron Build
|
|
||||||
on:
|
|
||||||
workflow_call:
|
|
||||||
inputs:
|
|
||||||
environment:
|
|
||||||
description: using the production or testing environment
|
|
||||||
required: false
|
|
||||||
type: string
|
|
||||||
target-platform:
|
|
||||||
type: string
|
|
||||||
description: Platform to run on, can be macos, win or linux
|
|
||||||
required: true
|
|
||||||
target-arch:
|
|
||||||
type: string
|
|
||||||
description: Arch to build for, can be x64, arm64, ia32 or arm
|
|
||||||
required: true
|
|
||||||
target-variant:
|
|
||||||
type: string
|
|
||||||
description: Variant to build for, no effect on non-macOS target platforms. Can
|
|
||||||
be darwin, mas or all.
|
|
||||||
default: all
|
|
||||||
build-runs-on:
|
|
||||||
type: string
|
|
||||||
description: What host to run the build
|
|
||||||
required: true
|
|
||||||
build-container:
|
|
||||||
type: string
|
|
||||||
description: JSON container information for aks runs-on
|
|
||||||
required: false
|
|
||||||
default: '{"image":null}'
|
|
||||||
is-release:
|
|
||||||
description: Whether this build job is a release job
|
|
||||||
required: true
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
gn-build-type:
|
|
||||||
description: The gn build type - testing or release
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
default: testing
|
|
||||||
generate-symbols:
|
|
||||||
description: Whether or not to generate symbols
|
|
||||||
required: true
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
upload-to-storage:
|
|
||||||
description: Whether or not to upload build artifacts to external storage
|
|
||||||
required: true
|
|
||||||
type: string
|
|
||||||
default: "0"
|
|
||||||
is-asan:
|
|
||||||
description: Building the Address Sanitizer (ASan) Linux build
|
|
||||||
required: false
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
enable-ssh:
|
|
||||||
description: Enable SSH debugging
|
|
||||||
required: false
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
permissions: {}
|
|
||||||
concurrency:
|
|
||||||
group: electron-build-${{ inputs.target-platform }}-${{ inputs.target-arch
|
|
||||||
}}-${{ inputs.target-variant }}-${{ inputs.is-asan }}-${{
|
|
||||||
github.ref_protected == true && github.run_id || github.ref }}
|
|
||||||
cancel-in-progress: ${{ github.ref_protected != true }}
|
|
||||||
env:
|
|
||||||
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
|
|
||||||
CHROMIUM_GIT_COOKIE_WINDOWS_STRING: ${{ secrets.CHROMIUM_GIT_COOKIE_WINDOWS_STRING }}
|
|
||||||
DD_API_KEY: ${{ secrets.DD_API_KEY }}
|
|
||||||
ELECTRON_ARTIFACTS_BLOB_STORAGE: ${{ secrets.ELECTRON_ARTIFACTS_BLOB_STORAGE }}
|
|
||||||
ELECTRON_RBE_JWT: ${{ secrets.ELECTRON_RBE_JWT }}
|
|
||||||
SUDOWOODO_EXCHANGE_URL: ${{ secrets.SUDOWOODO_EXCHANGE_URL }}
|
|
||||||
SUDOWOODO_EXCHANGE_TOKEN: ${{ secrets.SUDOWOODO_EXCHANGE_TOKEN }}
|
|
||||||
GCLIENT_EXTRA_ARGS: ${{ inputs.target-platform == 'macos' &&
|
|
||||||
'--custom-var=checkout_mac=True --custom-var=host_os=mac' ||
|
|
||||||
inputs.target-platform == 'win' && '--custom-var=checkout_win=True' ||
|
|
||||||
'--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' }}
|
|
||||||
ELECTRON_OUT_DIR: Default
|
|
||||||
ACTIONS_STEP_DEBUG: ${{ secrets.ACTIONS_STEP_DEBUG }}
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
defaults:
|
|
||||||
run:
|
|
||||||
shell: bash
|
|
||||||
runs-on: ${{ inputs.build-runs-on }}
|
|
||||||
permissions:
|
|
||||||
artifact-metadata: write
|
|
||||||
attestations: write
|
|
||||||
contents: read
|
|
||||||
id-token: write
|
|
||||||
container: ${{ fromJSON(inputs.build-container) }}
|
|
||||||
environment: ${{ inputs.environment }}
|
|
||||||
env:
|
|
||||||
TARGET_ARCH: ${{ inputs.target-arch }}
|
|
||||||
TARGET_PLATFORM: ${{ inputs.target-platform }}
|
|
||||||
steps:
|
|
||||||
- name: Create src dir
|
|
||||||
run: |
|
|
||||||
mkdir src
|
|
||||||
- name: Checkout Electron
|
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
|
||||||
with:
|
|
||||||
path: src/electron
|
|
||||||
fetch-depth: 0
|
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
|
||||||
- name: Setup SSH Debugging
|
|
||||||
if: ${{ inputs.target-platform == 'macos' && (inputs.enable-ssh ||
|
|
||||||
env.ACTIONS_STEP_DEBUG == 'true') }}
|
|
||||||
uses: ./src/electron/.github/actions/ssh-debug
|
|
||||||
with:
|
|
||||||
tunnel: "true"
|
|
||||||
env:
|
|
||||||
CLOUDFLARE_TUNNEL_CERT: ${{ secrets.CLOUDFLARE_TUNNEL_CERT }}
|
|
||||||
CLOUDFLARE_TUNNEL_HOSTNAME: ${{ vars.CLOUDFLARE_TUNNEL_HOSTNAME }}
|
|
||||||
CLOUDFLARE_USER_CA_CERT: ${{ secrets.CLOUDFLARE_USER_CA_CERT }}
|
|
||||||
AUTHORIZED_USERS: ${{ secrets.SSH_DEBUG_AUTHORIZED_USERS }}
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- name: Free up space (macOS)
|
|
||||||
if: ${{ inputs.target-platform == 'macos' }}
|
|
||||||
uses: ./src/electron/.github/actions/free-space-macos
|
|
||||||
- name: Check disk space after freeing up space
|
|
||||||
if: ${{ inputs.target-platform == 'macos' }}
|
|
||||||
run: df -h
|
|
||||||
- name: Setup Node.js/npm
|
|
||||||
if: ${{ inputs.target-platform == 'macos' }}
|
|
||||||
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903
|
|
||||||
with:
|
|
||||||
node-version: 20.19.x
|
|
||||||
cache: yarn
|
|
||||||
cache-dependency-path: src/electron/yarn.lock
|
|
||||||
- name: Install Dependencies
|
|
||||||
uses: ./src/electron/.github/actions/install-dependencies
|
|
||||||
- name: Install AZCopy
|
|
||||||
if: ${{ inputs.target-platform == 'macos' }}
|
|
||||||
run: brew install azcopy
|
|
||||||
- name: Set GN_EXTRA_ARGS for Linux
|
|
||||||
if: ${{ inputs.target-platform == 'linux' }}
|
|
||||||
run: >
|
|
||||||
if [ "${{ inputs.target-arch }}" = "arm" ]; then
|
|
||||||
if [ "${{ inputs.is-release }}" = true ]; then
|
|
||||||
GN_EXTRA_ARGS='target_cpu="arm" build_tflite_with_xnnpack=false symbol_level=1'
|
|
||||||
else
|
|
||||||
GN_EXTRA_ARGS='target_cpu="arm" build_tflite_with_xnnpack=false'
|
|
||||||
fi
|
|
||||||
elif [ "${{ inputs.target-arch }}" = "arm64" ]; then
|
|
||||||
GN_EXTRA_ARGS='target_cpu="arm64" fatal_linker_warnings=false enable_linux_installer=false'
|
|
||||||
elif [ "${{ inputs.is-asan }}" = true ]; then
|
|
||||||
GN_EXTRA_ARGS='is_asan=true'
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "GN_EXTRA_ARGS=$GN_EXTRA_ARGS" >> $GITHUB_ENV
|
|
||||||
- name: Set Chromium Git Cookie
|
|
||||||
uses: ./src/electron/.github/actions/set-chromium-cookie
|
|
||||||
- name: Install Build Tools
|
|
||||||
uses: ./src/electron/.github/actions/install-build-tools
|
|
||||||
- name: Generate DEPS Hash
|
|
||||||
run: |
|
|
||||||
node src/electron/script/generate-deps-hash.js
|
|
||||||
DEPSHASH=v1-src-cache-$(cat src/electron/.depshash)
|
|
||||||
echo "DEPSHASH=$DEPSHASH" >> $GITHUB_ENV
|
|
||||||
echo "CACHE_PATH=$DEPSHASH.tar" >> $GITHUB_ENV
|
|
||||||
- name: Restore src cache via AZCopy
|
|
||||||
if: ${{ inputs.target-platform != 'linux' }}
|
|
||||||
uses: ./src/electron/.github/actions/restore-cache-azcopy
|
|
||||||
with:
|
|
||||||
target-platform: ${{ inputs.target-platform }}
|
|
||||||
- name: Restore src cache via AKS
|
|
||||||
if: ${{ inputs.target-platform == 'linux' }}
|
|
||||||
uses: ./src/electron/.github/actions/restore-cache-aks
|
|
||||||
- name: Checkout Electron
|
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
|
||||||
with:
|
|
||||||
path: src/electron
|
|
||||||
fetch-depth: 0
|
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
|
||||||
- name: Fix Sync
|
|
||||||
if: ${{ inputs.target-platform != 'linux' }}
|
|
||||||
uses: ./src/electron/.github/actions/fix-sync
|
|
||||||
with:
|
|
||||||
target-platform: ${{ inputs.target-platform }}
|
|
||||||
env:
|
|
||||||
ELECTRON_DEPOT_TOOLS_DISABLE_LOG: true
|
|
||||||
- name: Init Build Tools
|
|
||||||
run: >
|
|
||||||
e init -f --root=$(pwd) --out=Default ${{ inputs.gn-build-type }}
|
|
||||||
--import ${{ inputs.gn-build-type }} --target-cpu ${{
|
|
||||||
inputs.target-arch }} --remote-build siso
|
|
||||||
- name: Run Electron Only Hooks
|
|
||||||
run: |
|
|
||||||
e d gclient runhooks --spec="solutions=[{'name':'src/electron','url':None,'deps_file':'DEPS','custom_vars':{'process_deps':False},'managed':False}]"
|
|
||||||
- name: Regenerate DEPS Hash
|
|
||||||
run: >
|
|
||||||
(cd src/electron && git checkout .) && node
|
|
||||||
src/electron/script/generate-deps-hash.js
|
|
||||||
|
|
||||||
echo "DEPSHASH=$(cat src/electron/.depshash)" >> $GITHUB_ENV
|
|
||||||
- name: Add CHROMIUM_BUILDTOOLS_PATH to env
|
|
||||||
run: echo "CHROMIUM_BUILDTOOLS_PATH=$(pwd)/src/buildtools" >> $GITHUB_ENV
|
|
||||||
- name: Free up space (macOS)
|
|
||||||
if: ${{ inputs.target-platform == 'macos' }}
|
|
||||||
uses: ./src/electron/.github/actions/free-space-macos
|
|
||||||
- name: Build Electron
|
|
||||||
if: ${{ inputs.target-platform != 'macos' || (inputs.target-variant == 'all' ||
|
|
||||||
inputs.target-variant == 'darwin') }}
|
|
||||||
uses: ./src/electron/.github/actions/build-electron
|
|
||||||
with:
|
|
||||||
target-arch: ${{ inputs.target-arch }}
|
|
||||||
target-platform: ${{ inputs.target-platform }}
|
|
||||||
artifact-platform: ${{ inputs.target-platform == 'macos' && 'darwin' ||
|
|
||||||
inputs.target-platform }}
|
|
||||||
is-release: ${{ inputs.is-release }}
|
|
||||||
generate-symbols: ${{ inputs.generate-symbols }}
|
|
||||||
upload-to-storage: ${{ inputs.upload-to-storage }}
|
|
||||||
is-asan: ${{ inputs.is-asan }}
|
|
||||||
- name: Set GN_EXTRA_ARGS for MAS Build
|
|
||||||
if: ${{ inputs.target-platform == 'macos' && (inputs.target-variant == 'all' ||
|
|
||||||
inputs.target-variant == 'mas') }}
|
|
||||||
run: |
|
|
||||||
echo "MAS_BUILD=true" >> $GITHUB_ENV
|
|
||||||
GN_EXTRA_ARGS='is_mas_build=true'
|
|
||||||
echo "GN_EXTRA_ARGS=$GN_EXTRA_ARGS" >> $GITHUB_ENV
|
|
||||||
- name: Build Electron (MAS)
|
|
||||||
if: ${{ inputs.target-platform == 'macos' && (inputs.target-variant == 'all' ||
|
|
||||||
inputs.target-variant == 'mas') }}
|
|
||||||
uses: ./src/electron/.github/actions/build-electron
|
|
||||||
with:
|
|
||||||
target-arch: ${{ inputs.target-arch }}
|
|
||||||
target-platform: ${{ inputs.target-platform }}
|
|
||||||
artifact-platform: mas
|
|
||||||
is-release: ${{ inputs.is-release }}
|
|
||||||
generate-symbols: ${{ inputs.generate-symbols }}
|
|
||||||
upload-to-storage: ${{ inputs.upload-to-storage }}
|
|
||||||
step-suffix: (mas)
|
|
||||||
129
.github/workflows/pipeline-segment-electron-test.yml
vendored
129
.github/workflows/pipeline-segment-electron-test.yml
vendored
@@ -25,24 +25,19 @@ on:
|
|||||||
required: false
|
required: false
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
enable-ssh:
|
|
||||||
description: 'Enable SSH debugging'
|
|
||||||
required: false
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: electron-test-${{ inputs.target-platform }}-${{ inputs.target-arch }}-${{ inputs.is-asan }}-${{ github.ref_protected == true && github.run_id || github.ref }}
|
group: electron-test-${{ inputs.target-platform }}-${{ inputs.target-arch }}-${{ inputs.is-asan }}-${{ github.ref }}
|
||||||
cancel-in-progress: ${{ github.ref_protected != true }}
|
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && !endsWith(github.ref, '-x-y') }}
|
||||||
|
|
||||||
permissions: {}
|
permissions:
|
||||||
|
contents: read
|
||||||
|
issues: read
|
||||||
|
pull-requests: read
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
|
|
||||||
CHROMIUM_GIT_COOKIE_WINDOWS_STRING: ${{ secrets.CHROMIUM_GIT_COOKIE_WINDOWS_STRING }}
|
|
||||||
ELECTRON_OUT_DIR: Default
|
ELECTRON_OUT_DIR: Default
|
||||||
ELECTRON_RBE_JWT: ${{ secrets.ELECTRON_RBE_JWT }}
|
ELECTRON_RBE_JWT: ${{ secrets.ELECTRON_RBE_JWT }}
|
||||||
ACTIONS_STEP_DEBUG: ${{ secrets.ACTIONS_STEP_DEBUG }}
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
@@ -50,10 +45,6 @@ jobs:
|
|||||||
run:
|
run:
|
||||||
shell: bash
|
shell: bash
|
||||||
runs-on: ${{ inputs.test-runs-on }}
|
runs-on: ${{ inputs.test-runs-on }}
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
issues: read
|
|
||||||
pull-requests: read
|
|
||||||
container: ${{ fromJSON(inputs.test-container) }}
|
container: ${{ fromJSON(inputs.test-container) }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
@@ -69,16 +60,28 @@ jobs:
|
|||||||
if: ${{ inputs.target-arch == 'arm' && inputs.target-platform == 'linux' }}
|
if: ${{ inputs.target-arch == 'arm' && inputs.target-platform == 'linux' }}
|
||||||
run: |
|
run: |
|
||||||
cp $(which node) /mnt/runner-externals/node20/bin/
|
cp $(which node) /mnt/runner-externals/node20/bin/
|
||||||
cp $(which node) /mnt/runner-externals/node24/bin/
|
- name: Install Git on Windows arm64 runners
|
||||||
|
if: ${{ inputs.target-arch == 'arm64' && inputs.target-platform == 'win' }}
|
||||||
|
shell: powershell
|
||||||
|
run: |
|
||||||
|
Set-ExecutionPolicy Bypass -Scope Process -Force
|
||||||
|
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072
|
||||||
|
iex ((New-Object System.Net.WebClient).DownloadString('https://community.chocolatey.org/install.ps1'))
|
||||||
|
choco install -y --no-progress git.install --params "'/GitAndUnixToolsOnPath'"
|
||||||
|
choco install -y --no-progress git
|
||||||
|
choco install -y --no-progress python --version 3.11.9
|
||||||
|
choco install -y --no-progress visualstudio2022-workload-vctools --package-parameters "--add Microsoft.VisualStudio.Component.VC.Tools.ARM64"
|
||||||
|
echo "C:\Program Files\Git\cmd" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||||
|
echo "C:\Program Files\Git\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||||
|
echo "C:\Python311" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
|
||||||
- name: Setup Node.js/npm
|
- name: Setup Node.js/npm
|
||||||
if: ${{ inputs.target-platform == 'win' }}
|
if: ${{ inputs.target-platform == 'win' }}
|
||||||
uses: actions/setup-node@2028fbc5c25fe9cf00d9f06a71cc4710d4507903
|
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6
|
||||||
with:
|
with:
|
||||||
node-version: 20.19.x
|
node-version: 20.11.x
|
||||||
- name: Add TCC permissions on macOS
|
- name: Add TCC permissions on macOS
|
||||||
if: ${{ inputs.target-platform == 'macos' }}
|
if: ${{ inputs.target-platform == 'macos' }}
|
||||||
run: |
|
run: |
|
||||||
epochdate=$(($(date +'%s * 1000 + %-N / 1000000')))
|
|
||||||
configure_user_tccdb () {
|
configure_user_tccdb () {
|
||||||
local values=$1
|
local values=$1
|
||||||
local dbPath="$HOME/Library/Application Support/com.apple.TCC/TCC.db"
|
local dbPath="$HOME/Library/Application Support/com.apple.TCC/TCC.db"
|
||||||
@@ -94,17 +97,14 @@ jobs:
|
|||||||
}
|
}
|
||||||
|
|
||||||
userValuesArray=(
|
userValuesArray=(
|
||||||
|
"'kTCCServiceMicrophone','/usr/local/opt/runner/provisioner/provisioner',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159"
|
||||||
"'kTCCServiceCamera','/usr/local/opt/runner/provisioner/provisioner',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159"
|
"'kTCCServiceCamera','/usr/local/opt/runner/provisioner/provisioner',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159"
|
||||||
"'kTCCServiceBluetoothAlways','/usr/local/opt/runner/provisioner/provisioner',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159"
|
"'kTCCServiceBluetoothAlways','/usr/local/opt/runner/provisioner/provisioner',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159"
|
||||||
"'kTCCServiceAppleEvents','/usr/local/opt/runner/provisioner/provisioner',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159"
|
|
||||||
"'kTCCServiceCamera','/opt/hca/hosted-compute-agent',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159"
|
|
||||||
"'kTCCServiceBluetoothAlways','/opt/hca/hosted-compute-agent',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159"
|
|
||||||
"'kTCCServiceScreenCapture','/bin/bash',1,2,3,1,NULL,NULL,NULL,'UNUSED',NULL,0,$epochdate"
|
|
||||||
)
|
)
|
||||||
for values in "${userValuesArray[@]}"; do
|
for values in "${userValuesArray[@]}"; do
|
||||||
# Sonoma and higher have a few extra values
|
# Sonoma and higher have a few extra values
|
||||||
# Ref: https://github.com/actions/runner-images/blob/main/images/macos/scripts/build/configure-tccdb-macos.sh
|
# Ref: https://github.com/actions/runner-images/blob/main/images/macos/scripts/build/configure-tccdb-macos.sh
|
||||||
if [ "$OSTYPE" = "darwin23" ] || [ "$OSTYPE" = "darwin24" ]; then
|
if [ "$OSTYPE" = "darwin23" ]; then
|
||||||
configure_user_tccdb "$values,NULL,NULL,'UNUSED',${values##*,}"
|
configure_user_tccdb "$values,NULL,NULL,'UNUSED',${values##*,}"
|
||||||
configure_sys_tccdb "$values,NULL,NULL,'UNUSED',${values##*,}"
|
configure_sys_tccdb "$values,NULL,NULL,'UNUSED',${values##*,}"
|
||||||
else
|
else
|
||||||
@@ -112,49 +112,20 @@ jobs:
|
|||||||
configure_sys_tccdb "$values"
|
configure_sys_tccdb "$values"
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
- name: Turn off the unexpectedly quit dialog on macOS
|
|
||||||
if: ${{ inputs.target-platform == 'macos' }}
|
|
||||||
run: defaults write com.apple.CrashReporter DialogType server
|
|
||||||
- name: Set xcode to 16.4
|
|
||||||
if: ${{ inputs.target-platform == 'macos' }}
|
|
||||||
run: sudo xcode-select --switch /Applications/Xcode_16.4.app
|
|
||||||
- name: Checkout Electron
|
- name: Checkout Electron
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
with:
|
with:
|
||||||
path: src/electron
|
path: src/electron
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
- name: Turn off screenshot nag on macOS
|
|
||||||
if: ${{ inputs.target-platform == 'macos' }}
|
|
||||||
run: |
|
|
||||||
defaults write ~/Library/Group\ Containers/group.com.apple.replayd/ScreenCaptureApprovals.plist "/bin/bash" -date "3024-09-23 12:00:00 +0000"
|
|
||||||
src/electron/script/actions/screencapture-nag-remover.sh -a $(which bash)
|
|
||||||
src/electron/script/actions/screencapture-nag-remover.sh -a /opt/hca/hosted-compute-agent
|
|
||||||
- name: Setup SSH Debugging
|
|
||||||
if: ${{ inputs.target-platform == 'macos' && (inputs.enable-ssh || env.ACTIONS_STEP_DEBUG == 'true') }}
|
|
||||||
uses: ./src/electron/.github/actions/ssh-debug
|
|
||||||
with:
|
|
||||||
tunnel: 'true'
|
|
||||||
env:
|
|
||||||
CLOUDFLARE_TUNNEL_CERT: ${{ secrets.CLOUDFLARE_TUNNEL_CERT }}
|
|
||||||
CLOUDFLARE_TUNNEL_HOSTNAME: ${{ vars.CLOUDFLARE_TUNNEL_HOSTNAME }}
|
|
||||||
CLOUDFLARE_USER_CA_CERT: ${{ secrets.CLOUDFLARE_USER_CA_CERT }}
|
|
||||||
AUTHORIZED_USERS: ${{ secrets.SSH_DEBUG_AUTHORIZED_USERS }}
|
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
uses: ./src/electron/.github/actions/install-dependencies
|
uses: ./src/electron/.github/actions/install-dependencies
|
||||||
- name: Set Chromium Git Cookie
|
|
||||||
uses: ./src/electron/.github/actions/set-chromium-cookie
|
|
||||||
- name: Get Depot Tools
|
- name: Get Depot Tools
|
||||||
timeout-minutes: 5
|
timeout-minutes: 5
|
||||||
run: |
|
run: |
|
||||||
git config --global core.filemode false
|
git config --global core.filemode false
|
||||||
git config --global core.autocrlf false
|
git config --global core.autocrlf false
|
||||||
git config --global branch.autosetuprebase always
|
git config --global branch.autosetuprebase always
|
||||||
git config --global core.fscache true
|
|
||||||
git config --global core.longpaths true
|
|
||||||
git config --global core.preloadindex true
|
|
||||||
git config --global core.longpaths true
|
|
||||||
git clone --filter=tree:0 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
git clone --filter=tree:0 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||||
# Ensure depot_tools does not update.
|
# Ensure depot_tools does not update.
|
||||||
test -d depot_tools && cd depot_tools
|
test -d depot_tools && cd depot_tools
|
||||||
@@ -168,42 +139,50 @@ jobs:
|
|||||||
echo "DISABLE_CRASH_REPORTER_TESTS=true" >> $GITHUB_ENV
|
echo "DISABLE_CRASH_REPORTER_TESTS=true" >> $GITHUB_ENV
|
||||||
echo "IS_ASAN=true" >> $GITHUB_ENV
|
echo "IS_ASAN=true" >> $GITHUB_ENV
|
||||||
- name: Download Generated Artifacts
|
- name: Download Generated Artifacts
|
||||||
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
|
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
|
||||||
with:
|
with:
|
||||||
name: generated_artifacts_${{ env.ARTIFACT_KEY }}
|
name: generated_artifacts_${{ env.ARTIFACT_KEY }}
|
||||||
path: ./generated_artifacts_${{ matrix.build-type }}_${{ inputs.target-arch }}
|
path: ./generated_artifacts_${{ matrix.build-type }}_${{ inputs.target-arch }}
|
||||||
- name: Download Src Artifacts
|
- name: Download Src Artifacts
|
||||||
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
|
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
|
||||||
with:
|
with:
|
||||||
name: src_artifacts_${{ env.ARTIFACT_KEY }}
|
name: src_artifacts_${{ env.ARTIFACT_KEY }}
|
||||||
path: ./src_artifacts_${{ matrix.build-type }}_${{ inputs.target-arch }}
|
path: ./src_artifacts_${{ matrix.build-type }}_${{ inputs.target-arch }}
|
||||||
- name: Restore Generated Artifacts
|
- name: Restore Generated Artifacts
|
||||||
run: ./src/electron/script/actions/restore-artifacts.sh
|
run: ./src/electron/script/actions/restore-artifacts.sh
|
||||||
- name: Unzip Dist (win)
|
- name: Unzip Dist, Mksnapshot & Chromedriver (win)
|
||||||
if: ${{ inputs.target-platform == 'win' }}
|
if: ${{ inputs.target-platform == 'win' }}
|
||||||
shell: powershell
|
shell: powershell
|
||||||
run: |
|
run: |
|
||||||
Set-ExecutionPolicy Bypass -Scope Process -Force
|
Set-ExecutionPolicy Bypass -Scope Process -Force
|
||||||
cd src/out/Default
|
cd src/out/Default
|
||||||
Expand-Archive -Force dist.zip -DestinationPath ./
|
Expand-Archive -Force dist.zip -DestinationPath ./
|
||||||
- name: Unzip Dist (unix)
|
Expand-Archive -Force chromedriver.zip -DestinationPath ./
|
||||||
|
Expand-Archive -Force mksnapshot.zip -DestinationPath ./
|
||||||
|
- name: Unzip Dist, Mksnapshot & Chromedriver (unix)
|
||||||
if: ${{ inputs.target-platform != 'win' }}
|
if: ${{ inputs.target-platform != 'win' }}
|
||||||
run: |
|
run: |
|
||||||
cd src/out/Default
|
cd src/out/Default
|
||||||
unzip -:o dist.zip
|
unzip -:o dist.zip
|
||||||
#- name: Import & Trust Self-Signed Codesigning Cert on MacOS
|
unzip -:o chromedriver.zip
|
||||||
# if: ${{ inputs.target-platform == 'macos' && inputs.target-arch == 'x64' }}
|
unzip -:o mksnapshot.zip
|
||||||
# run: |
|
- name: Import & Trust Self-Signed Codesigning Cert on MacOS
|
||||||
# sudo security authorizationdb write com.apple.trust-settings.admin allow
|
if: ${{ inputs.target-platform == 'macos' && inputs.target-arch == 'x64' }}
|
||||||
# cd src/electron
|
run: |
|
||||||
# ./script/codesign/generate-identity.sh
|
sudo security authorizationdb write com.apple.trust-settings.admin allow
|
||||||
|
cd src/electron
|
||||||
|
./script/codesign/generate-identity.sh
|
||||||
|
- name: Install Datadog CLI
|
||||||
|
run: |
|
||||||
|
cd src/electron
|
||||||
|
node script/yarn global add @datadog/datadog-ci
|
||||||
- name: Run Electron Tests
|
- name: Run Electron Tests
|
||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
MOCHA_REPORTER: mocha-multi-reporters
|
MOCHA_REPORTER: mocha-multi-reporters
|
||||||
MOCHA_MULTI_REPORTERS: mocha-junit-reporter, tap
|
MOCHA_MULTI_REPORTERS: mocha-junit-reporter, tap
|
||||||
ELECTRON_DISABLE_SECURITY_WARNINGS: 1
|
ELECTRON_DISABLE_SECURITY_WARNINGS: 1
|
||||||
|
ELECTRON_SKIP_NATIVE_MODULE_TESTS: true
|
||||||
DISPLAY: ':99.0'
|
DISPLAY: ':99.0'
|
||||||
NPM_CONFIG_MSVS_VERSION: '2022'
|
NPM_CONFIG_MSVS_VERSION: '2022'
|
||||||
run: |
|
run: |
|
||||||
@@ -223,7 +202,7 @@ jobs:
|
|||||||
export ELECTRON_FORCE_TEST_SUITE_EXIT="true"
|
export ELECTRON_FORCE_TEST_SUITE_EXIT="true"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
node script/yarn.js test --runners=main --enableRerun=3 --trace-uncaught --enable-logging --files $tests_files
|
node script/yarn test --runners=main --trace-uncaught --enable-logging --files $tests_files
|
||||||
else
|
else
|
||||||
chown :builduser .. && chmod g+w ..
|
chown :builduser .. && chmod g+w ..
|
||||||
chown -R :builduser . && chmod -R g+w .
|
chown -R :builduser . && chmod -R g+w .
|
||||||
@@ -240,14 +219,9 @@ jobs:
|
|||||||
export MOCHA_TIMEOUT=180000
|
export MOCHA_TIMEOUT=180000
|
||||||
echo "Piping output to ASAN_SYMBOLIZE ($ASAN_SYMBOLIZE)"
|
echo "Piping output to ASAN_SYMBOLIZE ($ASAN_SYMBOLIZE)"
|
||||||
cd electron
|
cd electron
|
||||||
runuser -u builduser -- xvfb-run script/actions/run-tests.sh script/yarn.js test --runners=main --trace-uncaught --enable-logging --files $tests_files | $ASAN_SYMBOLIZE
|
runuser -u builduser -- xvfb-run script/actions/run-tests.sh script/yarn test --runners=main --trace-uncaught --enable-logging --files $tests_files | $ASAN_SYMBOLIZE
|
||||||
else
|
else
|
||||||
if [ "${{ inputs.target-arch }}" = "arm" ]; then
|
runuser -u builduser -- xvfb-run script/actions/run-tests.sh script/yarn test --runners=main --trace-uncaught --enable-logging --files $tests_files
|
||||||
runuser -u builduser -- xvfb-run script/actions/run-tests.sh script/yarn.js test --skipYarnInstall --runners=main --enableRerun=3 --trace-uncaught --enable-logging --files $tests_files
|
|
||||||
else
|
|
||||||
runuser -u builduser -- xvfb-run script/actions/run-tests.sh script/yarn.js test --runners=main --enableRerun=3 --trace-uncaught --enable-logging --files $tests_files
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
- name: Upload Test results to Datadog
|
- name: Upload Test results to Datadog
|
||||||
@@ -259,14 +233,13 @@ jobs:
|
|||||||
DD_TAGS: "os.architecture:${{ inputs.target-arch }},os.family:${{ inputs.target-platform }},os.platform:${{ inputs.target-platform }},asan:${{ inputs.is-asan }}"
|
DD_TAGS: "os.architecture:${{ inputs.target-arch }},os.family:${{ inputs.target-platform }},os.platform:${{ inputs.target-platform }},asan:${{ inputs.is-asan }}"
|
||||||
run: |
|
run: |
|
||||||
if ! [ -z $DD_API_KEY ] && [ -f src/electron/junit/test-results-main.xml ]; then
|
if ! [ -z $DD_API_KEY ] && [ -f src/electron/junit/test-results-main.xml ]; then
|
||||||
cd src/electron
|
export DATADOG_PATH=`node src/electron/script/yarn global bin`
|
||||||
export DATADOG_PATH=`node script/yarn.js bin datadog-ci`
|
$DATADOG_PATH/datadog-ci junit upload src/electron/junit/test-results-main.xml
|
||||||
$DATADOG_PATH junit upload junit/test-results-main.xml
|
fi
|
||||||
fi
|
|
||||||
if: always() && !cancelled()
|
if: always() && !cancelled()
|
||||||
- name: Upload Test Artifacts
|
- name: Upload Test Artifacts
|
||||||
if: always() && !cancelled()
|
if: always() && !cancelled()
|
||||||
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4
|
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b
|
||||||
with:
|
with:
|
||||||
name: test_artifacts_${{ env.ARTIFACT_KEY }}_${{ matrix.shard }}
|
name: test_artifacts_${{ env.ARTIFACT_KEY }}_${{ matrix.shard }}
|
||||||
path: src/electron/spec/artifacts
|
path: src/electron/spec/artifacts
|
||||||
|
|||||||
@@ -26,37 +26,30 @@ on:
|
|||||||
type: string
|
type: string
|
||||||
default: testing
|
default: testing
|
||||||
|
|
||||||
permissions: {}
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: electron-node-nan-test-${{ inputs.target-platform }}-${{ inputs.target-arch }}-${{ github.ref_protected == true && github.run_id || github.ref }}
|
group: electron-node-nan-test-${{ inputs.target-platform }}-${{ inputs.target-arch }}-${{ github.ref }}
|
||||||
cancel-in-progress: ${{ github.ref_protected != true }}
|
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && !endsWith(github.ref, '-x-y') }}
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CHROMIUM_GIT_COOKIE: ${{ secrets.CHROMIUM_GIT_COOKIE }}
|
|
||||||
ELECTRON_OUT_DIR: Default
|
ELECTRON_OUT_DIR: Default
|
||||||
ELECTRON_RBE_JWT: ${{ secrets.ELECTRON_RBE_JWT }}
|
ELECTRON_RBE_JWT: ${{ secrets.ELECTRON_RBE_JWT }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
node-tests:
|
node-tests:
|
||||||
name: Run Node.js Tests
|
name: Run Node.js Tests
|
||||||
runs-on: electron-arc-centralus-linux-amd64-8core
|
runs-on: electron-arc-linux-amd64-8core
|
||||||
permissions:
|
timeout-minutes: 20
|
||||||
contents: read
|
|
||||||
timeout-minutes: 30
|
|
||||||
env:
|
env:
|
||||||
TARGET_ARCH: ${{ inputs.target-arch }}
|
TARGET_ARCH: ${{ inputs.target-arch }}
|
||||||
BUILD_TYPE: linux
|
BUILD_TYPE: linux
|
||||||
container: ${{ fromJSON(inputs.test-container) }}
|
container: ${{ fromJSON(inputs.test-container) }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Electron
|
- name: Checkout Electron
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
with:
|
with:
|
||||||
path: src/electron
|
path: src/electron
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
- name: Set Chromium Git Cookie
|
|
||||||
uses: ./src/electron/.github/actions/set-chromium-cookie
|
|
||||||
- name: Install Build Tools
|
- name: Install Build Tools
|
||||||
uses: ./src/electron/.github/actions/install-build-tools
|
uses: ./src/electron/.github/actions/install-build-tools
|
||||||
- name: Init Build Tools
|
- name: Init Build Tools
|
||||||
@@ -64,13 +57,22 @@ jobs:
|
|||||||
e init -f --root=$(pwd) --out=Default ${{ inputs.gn-build-type }} --import ${{ inputs.gn-build-type }} --target-cpu ${{ inputs.target-arch }}
|
e init -f --root=$(pwd) --out=Default ${{ inputs.gn-build-type }} --import ${{ inputs.gn-build-type }} --target-cpu ${{ inputs.target-arch }}
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
uses: ./src/electron/.github/actions/install-dependencies
|
uses: ./src/electron/.github/actions/install-dependencies
|
||||||
|
- name: Get Depot Tools
|
||||||
|
timeout-minutes: 5
|
||||||
|
run: |
|
||||||
|
git clone --filter=tree:0 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||||
|
# Ensure depot_tools does not update.
|
||||||
|
test -d depot_tools && cd depot_tools
|
||||||
|
touch .disable_auto_update
|
||||||
|
- name: Add Depot Tools to PATH
|
||||||
|
run: echo "$(pwd)/depot_tools" >> $GITHUB_PATH
|
||||||
- name: Download Generated Artifacts
|
- name: Download Generated Artifacts
|
||||||
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
|
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
|
||||||
with:
|
with:
|
||||||
name: generated_artifacts_${{ env.BUILD_TYPE }}_${{ env.TARGET_ARCH }}
|
name: generated_artifacts_${{ env.BUILD_TYPE }}_${{ env.TARGET_ARCH }}
|
||||||
path: ./generated_artifacts_${{ env.BUILD_TYPE }}_${{ env.TARGET_ARCH }}
|
path: ./generated_artifacts_${{ env.BUILD_TYPE }}_${{ env.TARGET_ARCH }}
|
||||||
- name: Download Src Artifacts
|
- name: Download Src Artifacts
|
||||||
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
|
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
|
||||||
with:
|
with:
|
||||||
name: src_artifacts_linux_${{ env.TARGET_ARCH }}
|
name: src_artifacts_linux_${{ env.TARGET_ARCH }}
|
||||||
path: ./src_artifacts_linux_${{ env.TARGET_ARCH }}
|
path: ./src_artifacts_linux_${{ env.TARGET_ARCH }}
|
||||||
@@ -96,23 +98,19 @@ jobs:
|
|||||||
done
|
done
|
||||||
nan-tests:
|
nan-tests:
|
||||||
name: Run Nan Tests
|
name: Run Nan Tests
|
||||||
runs-on: electron-arc-centralus-linux-amd64-4core
|
runs-on: electron-arc-linux-amd64-4core
|
||||||
permissions:
|
timeout-minutes: 20
|
||||||
contents: read
|
|
||||||
timeout-minutes: 30
|
|
||||||
env:
|
env:
|
||||||
TARGET_ARCH: ${{ inputs.target-arch }}
|
TARGET_ARCH: ${{ inputs.target-arch }}
|
||||||
BUILD_TYPE: linux
|
BUILD_TYPE: linux
|
||||||
container: ${{ fromJSON(inputs.test-container) }}
|
container: ${{ fromJSON(inputs.test-container) }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Electron
|
- name: Checkout Electron
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
|
||||||
with:
|
with:
|
||||||
path: src/electron
|
path: src/electron
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
ref: ${{ github.event.pull_request.head.sha }}
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
- name: Set Chromium Git Cookie
|
|
||||||
uses: ./src/electron/.github/actions/set-chromium-cookie
|
|
||||||
- name: Install Build Tools
|
- name: Install Build Tools
|
||||||
uses: ./src/electron/.github/actions/install-build-tools
|
uses: ./src/electron/.github/actions/install-build-tools
|
||||||
- name: Init Build Tools
|
- name: Init Build Tools
|
||||||
@@ -120,13 +118,22 @@ jobs:
|
|||||||
e init -f --root=$(pwd) --out=Default ${{ inputs.gn-build-type }}
|
e init -f --root=$(pwd) --out=Default ${{ inputs.gn-build-type }}
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
uses: ./src/electron/.github/actions/install-dependencies
|
uses: ./src/electron/.github/actions/install-dependencies
|
||||||
|
- name: Get Depot Tools
|
||||||
|
timeout-minutes: 5
|
||||||
|
run: |
|
||||||
|
git clone --filter=tree:0 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||||
|
# Ensure depot_tools does not update.
|
||||||
|
test -d depot_tools && cd depot_tools
|
||||||
|
touch .disable_auto_update
|
||||||
|
- name: Add Depot Tools to PATH
|
||||||
|
run: echo "$(pwd)/depot_tools" >> $GITHUB_PATH
|
||||||
- name: Download Generated Artifacts
|
- name: Download Generated Artifacts
|
||||||
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
|
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
|
||||||
with:
|
with:
|
||||||
name: generated_artifacts_${{ env.BUILD_TYPE }}_${{ env.TARGET_ARCH }}
|
name: generated_artifacts_${{ env.BUILD_TYPE }}_${{ env.TARGET_ARCH }}
|
||||||
path: ./generated_artifacts_${{ env.BUILD_TYPE }}_${{ env.TARGET_ARCH }}
|
path: ./generated_artifacts_${{ env.BUILD_TYPE }}_${{ env.TARGET_ARCH }}
|
||||||
- name: Download Src Artifacts
|
- name: Download Src Artifacts
|
||||||
uses: actions/download-artifact@018cc2cf5baa6db3ef3c5f8a56943fffe632ef53
|
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16
|
||||||
with:
|
with:
|
||||||
name: src_artifacts_linux_${{ env.TARGET_ARCH }}
|
name: src_artifacts_linux_${{ env.TARGET_ARCH }}
|
||||||
path: ./src_artifacts_linux_${{ env.TARGET_ARCH }}
|
path: ./src_artifacts_linux_${{ env.TARGET_ARCH }}
|
||||||
@@ -138,16 +145,10 @@ jobs:
|
|||||||
unzip -:o dist.zip
|
unzip -:o dist.zip
|
||||||
- name: Setup Linux for Headless Testing
|
- name: Setup Linux for Headless Testing
|
||||||
run: sh -e /etc/init.d/xvfb start
|
run: sh -e /etc/init.d/xvfb start
|
||||||
- name: Add Clang problem matcher
|
|
||||||
shell: bash
|
|
||||||
run: echo "::add-matcher::src/electron/.github/problem-matchers/clang.json"
|
|
||||||
- name: Run Nan Tests
|
- name: Run Nan Tests
|
||||||
run: |
|
run: |
|
||||||
cd src
|
cd src
|
||||||
node electron/script/nan-spec-runner.js
|
node electron/script/nan-spec-runner.js
|
||||||
- name: Remove Clang problem matcher
|
|
||||||
shell: bash
|
|
||||||
run: echo "::remove-matcher owner=clang::"
|
|
||||||
- name: Wait for active SSH sessions
|
- name: Wait for active SSH sessions
|
||||||
shell: bash
|
shell: bash
|
||||||
if: always() && !cancelled()
|
if: always() && !cancelled()
|
||||||
|
|||||||
15
.github/workflows/pull-request-labeled.yml
vendored
15
.github/workflows/pull-request-labeled.yml
vendored
@@ -11,25 +11,20 @@ jobs:
|
|||||||
name: backport/requested label added
|
name: backport/requested label added
|
||||||
if: github.event.label.name == 'backport/requested 🗳'
|
if: github.event.label.name == 'backport/requested 🗳'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions: {}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Trigger Slack workflow
|
- name: Trigger Slack workflow
|
||||||
uses: slackapi/slack-github-action@91efab103c0de0a537f72a35f6b8cda0ee76bf0a # v2.1.1
|
uses: slackapi/slack-github-action@485a9d42d3a73031f12ec201c457e2162c45d02d # v2.0.0
|
||||||
with:
|
with:
|
||||||
webhook: ${{ secrets.BACKPORT_REQUESTED_SLACK_WEBHOOK_URL }}
|
|
||||||
webhook-type: webhook-trigger
|
|
||||||
payload: |
|
payload: |
|
||||||
{
|
{
|
||||||
"base_ref": ${{ toJSON(github.event.pull_request.base.ref) }},
|
"url": "${{ github.event.pull_request.html_url }}"
|
||||||
"title": ${{ toJSON(github.event.pull_request.title) }},
|
|
||||||
"url": ${{ toJSON(github.event.pull_request.html_url) }},
|
|
||||||
"user": ${{ toJSON(github.event.pull_request.user.login) }}
|
|
||||||
}
|
}
|
||||||
|
env:
|
||||||
|
SLACK_WEBHOOK_URL: ${{ secrets.BACKPORT_REQUESTED_SLACK_WEBHOOK_URL }}
|
||||||
pull-request-labeled-deprecation-review-complete:
|
pull-request-labeled-deprecation-review-complete:
|
||||||
name: deprecation-review/complete label added
|
name: deprecation-review/complete label added
|
||||||
if: github.event.label.name == 'deprecation-review/complete ✅'
|
if: github.event.label.name == 'deprecation-review/complete ✅'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions: {}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Generate GitHub App token
|
- name: Generate GitHub App token
|
||||||
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
|
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
|
||||||
@@ -38,7 +33,7 @@ jobs:
|
|||||||
creds: ${{ secrets.RELEASE_BOARD_GH_APP_CREDS }}
|
creds: ${{ secrets.RELEASE_BOARD_GH_APP_CREDS }}
|
||||||
org: electron
|
org: electron
|
||||||
- name: Set status
|
- name: Set status
|
||||||
uses: dsanders11/project-actions/edit-item@2134fe7cc71c58b7ae259c82a8e63c6058255678 # v1.7.0
|
uses: dsanders11/project-actions/edit-item@438b25e007c2f4efec324497fadc6402e7cc61a6 # v1.4.0
|
||||||
with:
|
with:
|
||||||
token: ${{ steps.generate-token.outputs.token }}
|
token: ${{ steps.generate-token.outputs.token }}
|
||||||
project-number: 94
|
project-number: 94
|
||||||
|
|||||||
71
.github/workflows/rerun-apply-patches.yml
vendored
71
.github/workflows/rerun-apply-patches.yml
vendored
@@ -1,71 +0,0 @@
|
|||||||
name: Rerun PR Apply Patches
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- main
|
|
||||||
- '[1-9][0-9]-x-y'
|
|
||||||
paths:
|
|
||||||
- 'DEPS'
|
|
||||||
- 'patches/**'
|
|
||||||
|
|
||||||
permissions: {}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
rerun-apply-patches:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
permissions:
|
|
||||||
actions: write
|
|
||||||
checks: read
|
|
||||||
contents: read
|
|
||||||
pull-requests: read
|
|
||||||
steps:
|
|
||||||
- name: Find PRs and Rerun Apply Patches
|
|
||||||
env:
|
|
||||||
GH_REPO: ${{ github.repository }}
|
|
||||||
GH_TOKEN: ${{ github.token }}
|
|
||||||
run: |
|
|
||||||
BRANCH="${GITHUB_REF#refs/heads/}"
|
|
||||||
|
|
||||||
# Find all open PRs targeting this branch
|
|
||||||
PRS=$(gh pr list --base "$BRANCH" --state open --limit 250 --json number)
|
|
||||||
|
|
||||||
echo "$PRS" | jq -c '.[]' | while read -r pr; do
|
|
||||||
PR_NUMBER=$(echo "$pr" | jq -r '.number')
|
|
||||||
echo "Processing PR #${PR_NUMBER}"
|
|
||||||
|
|
||||||
# Find the Apply Patches workflow check for this PR
|
|
||||||
CHECK=$(gh pr view "$PR_NUMBER" --json statusCheckRollup --jq '[.statusCheckRollup[] | select(.workflowName == "Apply Patches" and .name == "apply-patches")] | first')
|
|
||||||
|
|
||||||
if [ -z "$CHECK" ] || [ "$CHECK" = "null" ]; then
|
|
||||||
echo " No Apply Patches workflow found for PR #${PR_NUMBER}"
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
CONCLUSION=$(echo "$CHECK" | jq -r '.conclusion')
|
|
||||||
if [ "$CONCLUSION" = "SKIPPED" ]; then
|
|
||||||
echo " apply-patches job was skipped for PR #${PR_NUMBER} (no patches)"
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
LINK=$(echo "$CHECK" | jq -r '.detailsUrl')
|
|
||||||
|
|
||||||
# Extract the run ID from the link (format: .../runs/RUN_ID/job/JOB_ID)
|
|
||||||
RUN_ID=$(echo "$LINK" | grep -oE 'runs/[0-9]+' | cut -d'/' -f2)
|
|
||||||
|
|
||||||
if [ -z "$RUN_ID" ]; then
|
|
||||||
echo " Could not extract run ID from link: ${LINK}"
|
|
||||||
continue
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Check if the workflow is currently in progress
|
|
||||||
RUN_STATUS=$(gh run view "$RUN_ID" --json status --jq '.status')
|
|
||||||
|
|
||||||
if [ "$RUN_STATUS" = "in_progress" ] || [ "$RUN_STATUS" = "queued" ] || [ "$RUN_STATUS" = "waiting" ]; then
|
|
||||||
echo " Workflow run ${RUN_ID} is ${RUN_STATUS}, cancelling..."
|
|
||||||
gh run cancel "$RUN_ID" --force
|
|
||||||
gh run watch "$RUN_ID"
|
|
||||||
fi
|
|
||||||
|
|
||||||
gh run rerun "$RUN_ID"
|
|
||||||
done
|
|
||||||
8
.github/workflows/scorecards.yml
vendored
8
.github/workflows/scorecards.yml
vendored
@@ -22,13 +22,13 @@ jobs:
|
|||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: "Checkout code"
|
- name: "Checkout code"
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
|
|
||||||
# This is a pre-submit / pre-release.
|
# This is a pre-submit / pre-release.
|
||||||
- name: "Run analysis"
|
- name: "Run analysis"
|
||||||
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
|
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
|
||||||
with:
|
with:
|
||||||
results_file: results.sarif
|
results_file: results.sarif
|
||||||
results_format: sarif
|
results_format: sarif
|
||||||
@@ -42,7 +42,7 @@ jobs:
|
|||||||
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
|
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
|
||||||
# format to the repository Actions tab.
|
# format to the repository Actions tab.
|
||||||
- name: "Upload artifact"
|
- name: "Upload artifact"
|
||||||
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
|
uses: actions/upload-artifact@6f51ac03b9356f520e9adb1b1b7802705f340c2b # v4.5.0
|
||||||
with:
|
with:
|
||||||
name: SARIF file
|
name: SARIF file
|
||||||
path: results.sarif
|
path: results.sarif
|
||||||
@@ -50,6 +50,6 @@ jobs:
|
|||||||
|
|
||||||
# Upload the results to GitHub's code scanning dashboard.
|
# Upload the results to GitHub's code scanning dashboard.
|
||||||
- name: "Upload to code-scanning"
|
- name: "Upload to code-scanning"
|
||||||
uses: github/codeql-action/upload-sarif@4e94bd11f71e507f7f87df81788dff88d1dacbfb # v3.29.5
|
uses: github/codeql-action/upload-sarif@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0
|
||||||
with:
|
with:
|
||||||
sarif_file: results.sarif
|
sarif_file: results.sarif
|
||||||
|
|||||||
5
.github/workflows/semantic.yml
vendored
5
.github/workflows/semantic.yml
vendored
@@ -7,7 +7,8 @@ on:
|
|||||||
- edited
|
- edited
|
||||||
- synchronize
|
- synchronize
|
||||||
|
|
||||||
permissions: {}
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
main:
|
main:
|
||||||
@@ -18,7 +19,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: semantic-pull-request
|
- name: semantic-pull-request
|
||||||
uses: amannn/action-semantic-pull-request@48f256284bd46cdaab1048c3721360e808335d50 # v6.1.1
|
uses: amannn/action-semantic-pull-request@0723387faaf9b38adef4775cd42cfd5155ed6017 # v5.5.3
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
with:
|
with:
|
||||||
|
|||||||
3
.github/workflows/stable-prep-items.yml
vendored
3
.github/workflows/stable-prep-items.yml
vendored
@@ -11,7 +11,6 @@ jobs:
|
|||||||
check-stable-prep-items:
|
check-stable-prep-items:
|
||||||
name: Check Stable Prep Items
|
name: Check Stable Prep Items
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions: {}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Generate GitHub App token
|
- name: Generate GitHub App token
|
||||||
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
|
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
|
||||||
@@ -28,7 +27,7 @@ jobs:
|
|||||||
PROJECT_NUMBER=$(gh project list --owner electron --format json | jq -r '.projects | map(select(.title | test("^[0-9]+-x-y$"))) | max_by(.number) | .number')
|
PROJECT_NUMBER=$(gh project list --owner electron --format json | jq -r '.projects | map(select(.title | test("^[0-9]+-x-y$"))) | max_by(.number) | .number')
|
||||||
echo "PROJECT_NUMBER=$PROJECT_NUMBER" >> "$GITHUB_OUTPUT"
|
echo "PROJECT_NUMBER=$PROJECT_NUMBER" >> "$GITHUB_OUTPUT"
|
||||||
- name: Update Completed Stable Prep Items
|
- name: Update Completed Stable Prep Items
|
||||||
uses: dsanders11/project-actions/completed-by@2134fe7cc71c58b7ae259c82a8e63c6058255678 # v1.7.0
|
uses: dsanders11/project-actions/completed-by@438b25e007c2f4efec324497fadc6402e7cc61a6 # v1.4.0
|
||||||
with:
|
with:
|
||||||
field: Prep Status
|
field: Prep Status
|
||||||
field-value: ✅ Complete
|
field-value: ✅ Complete
|
||||||
|
|||||||
8
.github/workflows/stale.yml
vendored
8
.github/workflows/stale.yml
vendored
@@ -10,14 +10,13 @@ permissions: {}
|
|||||||
jobs:
|
jobs:
|
||||||
stale:
|
stale:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions: {}
|
|
||||||
steps:
|
steps:
|
||||||
- name: Generate GitHub App token
|
- name: Generate GitHub App token
|
||||||
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
|
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
|
||||||
id: generate-token
|
id: generate-token
|
||||||
with:
|
with:
|
||||||
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
|
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
|
||||||
- uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # tag: v10.1.0
|
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # tag: v9.0.0
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ steps.generate-token.outputs.token }}
|
repo-token: ${{ steps.generate-token.outputs.token }}
|
||||||
days-before-stale: 90
|
days-before-stale: 90
|
||||||
@@ -28,11 +27,10 @@ jobs:
|
|||||||
This issue has been automatically marked as stale. **If this issue is still affecting you, please leave any comment** (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the [latest version of Electron](https://www.electronjs.org/releases/stable) or in the [beta](https://www.electronjs.org/releases/beta)—please include it with your comment!
|
This issue has been automatically marked as stale. **If this issue is still affecting you, please leave any comment** (for example, "bump"), and we'll keep it open. If you have any new additional information—in particular, if this is still reproducible in the [latest version of Electron](https://www.electronjs.org/releases/stable) or in the [beta](https://www.electronjs.org/releases/beta)—please include it with your comment!
|
||||||
close-issue-message: >
|
close-issue-message: >
|
||||||
This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue on a [supported version of Electron](https://www.electronjs.org/docs/latest/tutorial/electron-timelines#timeline) please open a new issue and include instructions for reproducing the issue.
|
This issue has been closed due to inactivity, and will not be monitored. If this is a bug and you can reproduce this issue on a [supported version of Electron](https://www.electronjs.org/docs/latest/tutorial/electron-timelines#timeline) please open a new issue and include instructions for reproducing the issue.
|
||||||
exempt-issue-labels: "discussion,security \U0001F512,enhancement :sparkles:,status/confirmed,stale-exempt,upgrade-follow-up,tracking-upstream"
|
exempt-issue-labels: "discussion,security \U0001F512,enhancement :sparkles:,status/confirmed,stale-exempt"
|
||||||
only-pr-labels: not-a-real-label
|
only-pr-labels: not-a-real-label
|
||||||
pending-repro:
|
pending-repro:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
permissions: {}
|
|
||||||
if: ${{ always() }}
|
if: ${{ always() }}
|
||||||
needs: stale
|
needs: stale
|
||||||
steps:
|
steps:
|
||||||
@@ -41,7 +39,7 @@ jobs:
|
|||||||
id: generate-token
|
id: generate-token
|
||||||
with:
|
with:
|
||||||
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
|
creds: ${{ secrets.ISSUE_TRIAGE_GH_APP_CREDS }}
|
||||||
- uses: actions/stale@5f858e3efba33a5ca4407a664cc011ad407f2008 # tag: v10.1.0
|
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # tag: v9.0.0
|
||||||
with:
|
with:
|
||||||
repo-token: ${{ steps.generate-token.outputs.token }}
|
repo-token: ${{ steps.generate-token.outputs.token }}
|
||||||
days-before-stale: -1
|
days-before-stale: -1
|
||||||
|
|||||||
39
.github/workflows/update-website-docs.yml
vendored
39
.github/workflows/update-website-docs.yml
vendored
@@ -1,39 +0,0 @@
|
|||||||
name: Update Website Docs
|
|
||||||
|
|
||||||
on:
|
|
||||||
release:
|
|
||||||
types: [published]
|
|
||||||
|
|
||||||
permissions: {}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
update-website-docs:
|
|
||||||
name: Update Website Docs
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
environment: website-docs-updater
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
id-token: write # needed for secret-service-action
|
|
||||||
steps:
|
|
||||||
- name: Get GitHub App token
|
|
||||||
id: secret-service
|
|
||||||
uses: electron/secret-service-action@3476425e8b30555aac15b1b7096938e254b0e155 # v1.0.0
|
|
||||||
- name: Check if this release is the latest
|
|
||||||
id: check-if-latest-release
|
|
||||||
env:
|
|
||||||
GH_REPO: electron/electron
|
|
||||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
run: |
|
|
||||||
LATEST_RELEASE_TAG="$(gh release view --json tagName --jq '.tagName')"
|
|
||||||
if [ "$LATEST_RELEASE_TAG" = "${GITHUB_REF#refs/tags/}" ]; then
|
|
||||||
echo "isLatestRelease=true" >> $GITHUB_OUTPUT
|
|
||||||
else
|
|
||||||
echo "isLatestRelease=false" >> $GITHUB_OUTPUT
|
|
||||||
fi
|
|
||||||
- name: Trigger website docs update
|
|
||||||
if: ${{ steps.check-if-latest-release.outputs.isLatestRelease == 'true' }}
|
|
||||||
env:
|
|
||||||
GH_REPO: electron/website
|
|
||||||
GH_TOKEN: ${{ fromJSON(steps.secret-service.outputs.secrets).WEBSITE_DOCS_UPDATER_APP_TOKEN }}
|
|
||||||
run: |
|
|
||||||
gh workflow run update-docs.yml -f sha=$GITHUB_SHA
|
|
||||||
78
.github/workflows/update_appveyor_image.yml
vendored
Normal file
78
.github/workflows/update_appveyor_image.yml
vendored
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
name: Update AppVeyor Image
|
||||||
|
|
||||||
|
# Run chron daily Mon-Fri
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 8 * * 1-5' # runs 8:00 every business day (see https://crontab.guru)
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
bake-appveyor-image:
|
||||||
|
name: Bake AppVeyor Image
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Generate GitHub App token
|
||||||
|
uses: electron/github-app-auth-action@384fd19694fe7b6dcc9a684746c6976ad78228ae # v1.1.1
|
||||||
|
id: generate-token
|
||||||
|
with:
|
||||||
|
creds: ${{ secrets.APPVEYOR_UPDATER_GH_APP_CREDS }}
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
token: ${{ steps.generate-token.outputs.token }}
|
||||||
|
ref: ${{ github.event.pull_request.head.sha }}
|
||||||
|
- name: Setup Node.js
|
||||||
|
uses: actions/setup-node@39370e3970a6d050c480ffad4ff0ed4d3fdee5af # v4.1.0
|
||||||
|
with:
|
||||||
|
node-version: 20.11.x
|
||||||
|
- name: Yarn install
|
||||||
|
run: |
|
||||||
|
node script/yarn.js install --frozen-lockfile
|
||||||
|
- name: Set Repo for Commit
|
||||||
|
run: git config --global --add safe.directory $GITHUB_WORKSPACE
|
||||||
|
- name: Check AppVeyor Image
|
||||||
|
env:
|
||||||
|
APPVEYOR_TOKEN: ${{ secrets.APPVEYOR_TOKEN }}
|
||||||
|
run: |
|
||||||
|
node ./script/prepare-appveyor
|
||||||
|
if [ -f ./image_version.txt ]; then
|
||||||
|
echo "APPVEYOR_IMAGE_VERSION="$(cat image_version.txt)"" >> $GITHUB_ENV
|
||||||
|
rm image_version.txt
|
||||||
|
fi
|
||||||
|
- name: (Optionally) Update Appveyor Image
|
||||||
|
if: ${{ env.APPVEYOR_IMAGE_VERSION }}
|
||||||
|
uses: mikefarah/yq@4839dbbf80445070a31c7a9c1055da527db2d5ee # v4.44.6
|
||||||
|
with:
|
||||||
|
cmd: |
|
||||||
|
yq '.image = "${{ env.APPVEYOR_IMAGE_VERSION }}"' "appveyor.yml" > "appveyor2.yml"
|
||||||
|
yq '.image = "${{ env.APPVEYOR_IMAGE_VERSION }}"' "appveyor-woa.yml" > "appveyor-woa2.yml"
|
||||||
|
- name: (Optionally) Generate Commit Diff
|
||||||
|
if: ${{ env.APPVEYOR_IMAGE_VERSION }}
|
||||||
|
run: |
|
||||||
|
diff -w -B appveyor.yml appveyor2.yml > appveyor.diff || true
|
||||||
|
patch -f appveyor.yml < appveyor.diff
|
||||||
|
rm appveyor2.yml appveyor.diff
|
||||||
|
git add appveyor.yml
|
||||||
|
- name: (Optionally) Generate Commit Diff for WOA
|
||||||
|
if: ${{ env.APPVEYOR_IMAGE_VERSION }}
|
||||||
|
run: |
|
||||||
|
diff -w -B appveyor-woa.yml appveyor-woa2.yml > appveyor-woa.diff || true
|
||||||
|
patch -f appveyor-woa.yml < appveyor-woa.diff
|
||||||
|
rm appveyor-woa2.yml appveyor-woa.diff
|
||||||
|
git add appveyor-woa.yml
|
||||||
|
- name: (Optionally) Commit to Branch
|
||||||
|
if: ${{ env.APPVEYOR_IMAGE_VERSION }}
|
||||||
|
uses: dsanders11/github-app-commit-action@43de6da2f4d927e997c0784c7a0b61bd19ad6aac # v1.5.0
|
||||||
|
with:
|
||||||
|
message: 'build: update appveyor image to latest version'
|
||||||
|
ref: bump-appveyor-image
|
||||||
|
token: ${{ steps.generate-token.outputs.token }}
|
||||||
|
- name: (Optionally) Create Pull Request
|
||||||
|
if: ${{ env.APPVEYOR_IMAGE_VERSION }}
|
||||||
|
run: |
|
||||||
|
printf "This PR updates appveyor.yml to the latest baked image, ${{ env.APPVEYOR_IMAGE_VERSION }}.\n\nNotes: none" | gh pr create --head bump-appveyor-image --label no-backport --label semver/none --title 'build: update appveyor image to latest version' --body-file=-
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
|
||||||
108
.github/workflows/windows-publish.yml
vendored
108
.github/workflows/windows-publish.yml
vendored
@@ -1,108 +0,0 @@
|
|||||||
name: Publish Windows
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch:
|
|
||||||
inputs:
|
|
||||||
build-image-sha:
|
|
||||||
type: string
|
|
||||||
description: 'SHA for electron/build image'
|
|
||||||
default: 'a82b87d7a4f5ff0cab61405f8151ac4cf4942aeb'
|
|
||||||
required: true
|
|
||||||
upload-to-storage:
|
|
||||||
description: 'Uploads to Azure storage'
|
|
||||||
required: false
|
|
||||||
default: '1'
|
|
||||||
type: string
|
|
||||||
run-windows-publish:
|
|
||||||
description: 'Run the publish jobs vs just the build jobs'
|
|
||||||
type: boolean
|
|
||||||
default: false
|
|
||||||
|
|
||||||
permissions: {}
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
checkout-windows:
|
|
||||||
runs-on: electron-arc-centralus-linux-amd64-32core
|
|
||||||
permissions:
|
|
||||||
contents: read
|
|
||||||
container:
|
|
||||||
image: ghcr.io/electron/build:${{ inputs.build-image-sha }}
|
|
||||||
options: --user root --device /dev/fuse --cap-add SYS_ADMIN
|
|
||||||
volumes:
|
|
||||||
- /mnt/win-cache:/mnt/win-cache
|
|
||||||
- /var/run/sas:/var/run/sas
|
|
||||||
env:
|
|
||||||
CHROMIUM_GIT_COOKIE_WINDOWS_STRING: ${{ secrets.CHROMIUM_GIT_COOKIE_WINDOWS_STRING }}
|
|
||||||
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_win=True'
|
|
||||||
TARGET_OS: 'win'
|
|
||||||
ELECTRON_DEPOT_TOOLS_WIN_TOOLCHAIN: '1'
|
|
||||||
outputs:
|
|
||||||
build-image-sha: ${{ inputs.build-image-sha }}
|
|
||||||
steps:
|
|
||||||
- name: Checkout Electron
|
|
||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8
|
|
||||||
with:
|
|
||||||
path: src/electron
|
|
||||||
fetch-depth: 0
|
|
||||||
- name: Checkout & Sync & Save
|
|
||||||
uses: ./src/electron/.github/actions/checkout
|
|
||||||
with:
|
|
||||||
generate-sas-token: 'true'
|
|
||||||
target-platform: win
|
|
||||||
|
|
||||||
publish-x64-win:
|
|
||||||
uses: ./.github/workflows/pipeline-segment-electron-publish.yml
|
|
||||||
permissions:
|
|
||||||
artifact-metadata: write
|
|
||||||
attestations: write
|
|
||||||
contents: read
|
|
||||||
id-token: write
|
|
||||||
needs: checkout-windows
|
|
||||||
with:
|
|
||||||
environment: production-release
|
|
||||||
build-runs-on: electron-arc-centralus-windows-amd64-16core
|
|
||||||
target-platform: win
|
|
||||||
target-arch: x64
|
|
||||||
is-release: true
|
|
||||||
gn-build-type: release
|
|
||||||
generate-symbols: true
|
|
||||||
upload-to-storage: ${{ inputs.upload-to-storage }}
|
|
||||||
secrets: inherit
|
|
||||||
|
|
||||||
publish-arm64-win:
|
|
||||||
uses: ./.github/workflows/pipeline-segment-electron-publish.yml
|
|
||||||
permissions:
|
|
||||||
artifact-metadata: write
|
|
||||||
attestations: write
|
|
||||||
contents: read
|
|
||||||
id-token: write
|
|
||||||
needs: checkout-windows
|
|
||||||
with:
|
|
||||||
environment: production-release
|
|
||||||
build-runs-on: electron-arc-centralus-windows-amd64-16core
|
|
||||||
target-platform: win
|
|
||||||
target-arch: arm64
|
|
||||||
is-release: true
|
|
||||||
gn-build-type: release
|
|
||||||
generate-symbols: true
|
|
||||||
upload-to-storage: ${{ inputs.upload-to-storage }}
|
|
||||||
secrets: inherit
|
|
||||||
|
|
||||||
publish-x86-win:
|
|
||||||
uses: ./.github/workflows/pipeline-segment-electron-publish.yml
|
|
||||||
permissions:
|
|
||||||
artifact-metadata: write
|
|
||||||
attestations: write
|
|
||||||
contents: read
|
|
||||||
id-token: write
|
|
||||||
needs: checkout-windows
|
|
||||||
with:
|
|
||||||
environment: production-release
|
|
||||||
build-runs-on: electron-arc-centralus-windows-amd64-16core
|
|
||||||
target-platform: win
|
|
||||||
target-arch: x86
|
|
||||||
is-release: true
|
|
||||||
gn-build-type: release
|
|
||||||
generate-symbols: true
|
|
||||||
upload-to-storage: ${{ inputs.upload-to-storage }}
|
|
||||||
secrets: inherit
|
|
||||||
2
.gitignore
vendored
2
.gitignore
vendored
@@ -53,5 +53,3 @@ ts-gen
|
|||||||
patches/mtime-cache.json
|
patches/mtime-cache.json
|
||||||
|
|
||||||
spec/fixtures/logo.png
|
spec/fixtures/logo.png
|
||||||
|
|
||||||
.yarn/install-state.gz
|
|
||||||
@@ -1 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
. "$(dirname "$0")/_/husky.sh"
|
||||||
|
|
||||||
npm run precommit
|
npm run precommit
|
||||||
@@ -1 +1,4 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
. "$(dirname "$0")/_/husky.sh"
|
||||||
|
|
||||||
npm run prepack
|
npm run prepack
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
{
|
{
|
||||||
"config": {
|
"config": {
|
||||||
"extends": "@electron/lint-roller/configs/markdownlint.json",
|
"extends": "@electron/lint-roller/configs/markdownlint.json",
|
||||||
"descriptive-link-text": false,
|
|
||||||
"link-image-style": {
|
"link-image-style": {
|
||||||
"autolink": false,
|
"autolink": false,
|
||||||
"shortcut": false
|
"shortcut": false
|
||||||
@@ -21,14 +20,12 @@
|
|||||||
"ul",
|
"ul",
|
||||||
"unknown",
|
"unknown",
|
||||||
"Tabs",
|
"Tabs",
|
||||||
"TabItem",
|
"TabItem"
|
||||||
"DocCardList",
|
|
||||||
"kbd"
|
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"no-newline-in-links": true
|
"no-newline-in-links": true
|
||||||
},
|
},
|
||||||
"customRules": [
|
"customRules": [
|
||||||
"./node_modules/@electron/lint-roller/markdownlint-rules/index.mjs"
|
"@electron/lint-roller/markdownlint-rules/"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
942
.yarn/releases/yarn-4.12.0.cjs
vendored
942
.yarn/releases/yarn-4.12.0.cjs
vendored
File diff suppressed because one or more lines are too long
12
.yarnrc.yml
12
.yarnrc.yml
@@ -1,12 +0,0 @@
|
|||||||
enableScripts: false
|
|
||||||
|
|
||||||
nmHoistingLimits: workspaces
|
|
||||||
|
|
||||||
nodeLinker: node-modules
|
|
||||||
|
|
||||||
npmMinimalAgeGate: 10080
|
|
||||||
|
|
||||||
npmPreapprovedPackages:
|
|
||||||
- "@electron/*"
|
|
||||||
|
|
||||||
yarnPath: .yarn/releases/yarn-4.12.0.cjs
|
|
||||||
179
BUILD.gn
179
BUILD.gn
@@ -4,9 +4,9 @@ import("//build/config/win/manifest.gni")
|
|||||||
import("//components/os_crypt/sync/features.gni")
|
import("//components/os_crypt/sync/features.gni")
|
||||||
import("//components/spellcheck/spellcheck_build_features.gni")
|
import("//components/spellcheck/spellcheck_build_features.gni")
|
||||||
import("//content/public/app/mac_helpers.gni")
|
import("//content/public/app/mac_helpers.gni")
|
||||||
import("//content/public/common/features.gni")
|
|
||||||
import("//extensions/buildflags/buildflags.gni")
|
import("//extensions/buildflags/buildflags.gni")
|
||||||
import("//pdf/features.gni")
|
import("//pdf/features.gni")
|
||||||
|
import("//ppapi/buildflags/buildflags.gni")
|
||||||
import("//printing/buildflags/buildflags.gni")
|
import("//printing/buildflags/buildflags.gni")
|
||||||
import("//testing/test.gni")
|
import("//testing/test.gni")
|
||||||
import("//third_party/electron_node/node.gni")
|
import("//third_party/electron_node/node.gni")
|
||||||
@@ -17,19 +17,19 @@ import("//tools/grit/repack.gni")
|
|||||||
import("//tools/v8_context_snapshot/v8_context_snapshot.gni")
|
import("//tools/v8_context_snapshot/v8_context_snapshot.gni")
|
||||||
import("//v8/gni/snapshot_toolchain.gni")
|
import("//v8/gni/snapshot_toolchain.gni")
|
||||||
import("build/asar.gni")
|
import("build/asar.gni")
|
||||||
import("build/electron_paks.gni")
|
|
||||||
import("build/extract_symbols.gni")
|
import("build/extract_symbols.gni")
|
||||||
import("build/js2c_toolchain.gni")
|
|
||||||
import("build/npm.gni")
|
import("build/npm.gni")
|
||||||
import("build/templated_file.gni")
|
import("build/templated_file.gni")
|
||||||
import("build/tsc.gni")
|
import("build/tsc.gni")
|
||||||
import("build/webpack/webpack.gni")
|
import("build/webpack/webpack.gni")
|
||||||
import("buildflags/buildflags.gni")
|
import("buildflags/buildflags.gni")
|
||||||
|
import("electron_paks.gni")
|
||||||
import("filenames.auto.gni")
|
import("filenames.auto.gni")
|
||||||
import("filenames.gni")
|
import("filenames.gni")
|
||||||
import("filenames.hunspell.gni")
|
import("filenames.hunspell.gni")
|
||||||
import("filenames.libcxx.gni")
|
import("filenames.libcxx.gni")
|
||||||
import("filenames.libcxxabi.gni")
|
import("filenames.libcxxabi.gni")
|
||||||
|
import("js2c_toolchain.gni")
|
||||||
|
|
||||||
if (is_mac) {
|
if (is_mac) {
|
||||||
import("//build/config/mac/rules.gni")
|
import("//build/config/mac/rules.gni")
|
||||||
@@ -38,13 +38,12 @@ if (is_mac) {
|
|||||||
import("build/rules.gni")
|
import("build/rules.gni")
|
||||||
|
|
||||||
assert(
|
assert(
|
||||||
mac_deployment_target == "12.0",
|
mac_deployment_target == "11.0",
|
||||||
"Chromium has updated the mac_deployment_target, please update this assert and flag this as a breaking change (docs/breaking-changes.md)")
|
"Chromium has updated the mac_deployment_target, please update this assert, update the supported versions documentation (docs/tutorial/support.md) and flag this as a breaking change")
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_linux) {
|
if (is_linux) {
|
||||||
import("//build/config/linux/pkg_config.gni")
|
import("//build/config/linux/pkg_config.gni")
|
||||||
import("//electron/build/linux/strip_binary.gni")
|
|
||||||
import("//tools/generate_stubs/rules.gni")
|
import("//tools/generate_stubs/rules.gni")
|
||||||
|
|
||||||
pkg_config("gio_unix") {
|
pkg_config("gio_unix") {
|
||||||
@@ -315,7 +314,7 @@ asar("default_app_asar") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
grit("resources") {
|
grit("resources") {
|
||||||
source = "build/electron_resources.grd"
|
source = "electron_resources.grd"
|
||||||
|
|
||||||
outputs = [
|
outputs = [
|
||||||
"grit/electron_resources.h",
|
"grit/electron_resources.h",
|
||||||
@@ -442,7 +441,6 @@ source_set("electron_lib") {
|
|||||||
"chromium_src:chrome_spellchecker",
|
"chromium_src:chrome_spellchecker",
|
||||||
"shell/common:mojo",
|
"shell/common:mojo",
|
||||||
"shell/common:plugin",
|
"shell/common:plugin",
|
||||||
"shell/common:web_contents_utility",
|
|
||||||
"shell/services/node/public/mojom",
|
"shell/services/node/public/mojom",
|
||||||
"//base:base_static",
|
"//base:base_static",
|
||||||
"//base/allocator:buildflags",
|
"//base/allocator:buildflags",
|
||||||
@@ -452,8 +450,8 @@ source_set("electron_lib") {
|
|||||||
"//components/autofill/core/common:features",
|
"//components/autofill/core/common:features",
|
||||||
"//components/certificate_transparency",
|
"//components/certificate_transparency",
|
||||||
"//components/compose:buildflags",
|
"//components/compose:buildflags",
|
||||||
"//components/embedder_support:user_agent",
|
"//components/embedder_support:browser_util",
|
||||||
"//components/input",
|
"//components/input:input",
|
||||||
"//components/language/core/browser",
|
"//components/language/core/browser",
|
||||||
"//components/net_log",
|
"//components/net_log",
|
||||||
"//components/network_hints/browser",
|
"//components/network_hints/browser",
|
||||||
@@ -480,14 +478,13 @@ source_set("electron_lib") {
|
|||||||
"//device/bluetooth",
|
"//device/bluetooth",
|
||||||
"//device/bluetooth/public/cpp",
|
"//device/bluetooth/public/cpp",
|
||||||
"//gin",
|
"//gin",
|
||||||
"//gpu/ipc/client",
|
|
||||||
"//media/capture/mojom:video_capture",
|
"//media/capture/mojom:video_capture",
|
||||||
"//media/mojo/mojom",
|
"//media/mojo/mojom",
|
||||||
"//media/mojo/mojom:web_speech_recognition",
|
"//media/mojo/mojom:web_speech_recognition",
|
||||||
"//net:extras",
|
"//net:extras",
|
||||||
"//net:net_resources",
|
"//net:net_resources",
|
||||||
"//printing/buildflags",
|
"//printing/buildflags",
|
||||||
"//services/device/public/cpp/bluetooth",
|
"//services/device/public/cpp/bluetooth:bluetooth",
|
||||||
"//services/device/public/cpp/geolocation",
|
"//services/device/public/cpp/geolocation",
|
||||||
"//services/device/public/cpp/hid",
|
"//services/device/public/cpp/hid",
|
||||||
"//services/device/public/mojom",
|
"//services/device/public/mojom",
|
||||||
@@ -520,15 +517,10 @@ source_set("electron_lib") {
|
|||||||
"//v8:v8_libplatform",
|
"//v8:v8_libplatform",
|
||||||
]
|
]
|
||||||
|
|
||||||
if (v8_use_external_startup_data && use_v8_context_snapshot) {
|
|
||||||
deps += [ ":mksnapshot_checksum_gen" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
public_deps = [
|
public_deps = [
|
||||||
"//base",
|
"//base",
|
||||||
"//base:i18n",
|
"//base:i18n",
|
||||||
"//content/public/app",
|
"//content/public/app",
|
||||||
"//ui/base/unowned_user_data",
|
|
||||||
]
|
]
|
||||||
|
|
||||||
include_dirs = [
|
include_dirs = [
|
||||||
@@ -588,13 +580,7 @@ source_set("electron_lib") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (is_mac) {
|
if (is_mac) {
|
||||||
# Disable C++ modules to resolve linking error when including MacOS SDK
|
|
||||||
# headers from third_party/electron_node/deps/uv/include/uv/darwin.h
|
|
||||||
# TODO(samuelmaddock): consider revisiting this in the future
|
|
||||||
use_libcxx_modules = false
|
|
||||||
|
|
||||||
deps += [
|
deps += [
|
||||||
"//components/os_crypt/common:keychain_password_mac",
|
|
||||||
"//components/remote_cocoa/app_shim",
|
"//components/remote_cocoa/app_shim",
|
||||||
"//components/remote_cocoa/browser",
|
"//components/remote_cocoa/browser",
|
||||||
"//content/browser:mac_helpers",
|
"//content/browser:mac_helpers",
|
||||||
@@ -663,7 +649,6 @@ source_set("electron_lib") {
|
|||||||
"//ui/events/devices/x11",
|
"//ui/events/devices/x11",
|
||||||
"//ui/events/platform/x11",
|
"//ui/events/platform/x11",
|
||||||
"//ui/gtk:gtk_config",
|
"//ui/gtk:gtk_config",
|
||||||
"//ui/linux:display_server_utils",
|
|
||||||
"//ui/linux:linux_ui",
|
"//ui/linux:linux_ui",
|
||||||
"//ui/linux:linux_ui_factory",
|
"//ui/linux:linux_ui_factory",
|
||||||
"//ui/wm",
|
"//ui/wm",
|
||||||
@@ -684,8 +669,6 @@ source_set("electron_lib") {
|
|||||||
sources += [
|
sources += [
|
||||||
"shell/browser/certificate_manager_model.cc",
|
"shell/browser/certificate_manager_model.cc",
|
||||||
"shell/browser/certificate_manager_model.h",
|
"shell/browser/certificate_manager_model.h",
|
||||||
"shell/browser/linux/x11_util.cc",
|
|
||||||
"shell/browser/linux/x11_util.h",
|
|
||||||
"shell/browser/ui/gtk_util.cc",
|
"shell/browser/ui/gtk_util.cc",
|
||||||
"shell/browser/ui/gtk_util.h",
|
"shell/browser/ui/gtk_util.h",
|
||||||
]
|
]
|
||||||
@@ -696,7 +679,7 @@ source_set("electron_lib") {
|
|||||||
deps += [
|
deps += [
|
||||||
"//components/app_launch_prefetch",
|
"//components/app_launch_prefetch",
|
||||||
"//components/crash/core/app:crash_export_thunks",
|
"//components/crash/core/app:crash_export_thunks",
|
||||||
"//third_party/libxml:xml_writer",
|
"//ui/native_theme:native_theme_browser",
|
||||||
"//ui/wm",
|
"//ui/wm",
|
||||||
"//ui/wm/public",
|
"//ui/wm/public",
|
||||||
]
|
]
|
||||||
@@ -741,7 +724,7 @@ source_set("electron_lib") {
|
|||||||
"shell/common/extensions/api:extensions_features",
|
"shell/common/extensions/api:extensions_features",
|
||||||
"//chrome/browser/resources:component_extension_resources",
|
"//chrome/browser/resources:component_extension_resources",
|
||||||
"//components/guest_view/common:mojom",
|
"//components/guest_view/common:mojom",
|
||||||
"//components/update_client",
|
"//components/update_client:update_client",
|
||||||
"//components/zoom",
|
"//components/zoom",
|
||||||
"//extensions/browser",
|
"//extensions/browser",
|
||||||
"//extensions/browser/api:api_provider",
|
"//extensions/browser/api:api_provider",
|
||||||
@@ -763,13 +746,11 @@ source_set("electron_lib") {
|
|||||||
if (enable_pdf_viewer) {
|
if (enable_pdf_viewer) {
|
||||||
deps += [
|
deps += [
|
||||||
"//chrome/browser/resources/pdf:resources",
|
"//chrome/browser/resources/pdf:resources",
|
||||||
"//chrome/browser/ui:browser_element_identifiers",
|
|
||||||
"//components/pdf/browser",
|
"//components/pdf/browser",
|
||||||
"//components/pdf/browser:interceptors",
|
"//components/pdf/browser:interceptors",
|
||||||
"//components/pdf/common:constants",
|
"//components/pdf/common:constants",
|
||||||
"//components/pdf/common:util",
|
"//components/pdf/common:util",
|
||||||
"//components/pdf/renderer",
|
"//components/pdf/renderer",
|
||||||
"//components/user_education/webui",
|
|
||||||
"//pdf",
|
"//pdf",
|
||||||
"//pdf:content_restriction",
|
"//pdf:content_restriction",
|
||||||
]
|
]
|
||||||
@@ -788,18 +769,6 @@ source_set("electron_lib") {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
action("mksnapshot_checksum_gen") {
|
|
||||||
script = "build/checksum_header.py"
|
|
||||||
|
|
||||||
outputs = [ "$target_gen_dir/snapshot_checksum.h" ]
|
|
||||||
inputs = [ "$root_out_dir/$v8_context_snapshot_filename" ]
|
|
||||||
args = rebase_path(inputs)
|
|
||||||
|
|
||||||
args += rebase_path(outputs)
|
|
||||||
|
|
||||||
deps = [ "//tools/v8_context_snapshot" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
electron_paks("packed_resources") {
|
electron_paks("packed_resources") {
|
||||||
if (is_mac) {
|
if (is_mac) {
|
||||||
output_dir = "$root_gen_dir/electron_repack"
|
output_dir = "$root_gen_dir/electron_repack"
|
||||||
@@ -843,7 +812,7 @@ if (is_mac) {
|
|||||||
sources = []
|
sources = []
|
||||||
public_deps = []
|
public_deps = []
|
||||||
sources += [ "$root_out_dir/libffmpeg.dylib" ]
|
sources += [ "$root_out_dir/libffmpeg.dylib" ]
|
||||||
public_deps += [ "//third_party/ffmpeg" ]
|
public_deps += [ "//third_party/ffmpeg:ffmpeg" ]
|
||||||
outputs = [ "{{bundle_contents_dir}}/Libraries/{{source_file_part}}" ]
|
outputs = [ "{{bundle_contents_dir}}/Libraries/{{source_file_part}}" ]
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -1258,7 +1227,7 @@ if (is_mac) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (use_v8_context_snapshot) {
|
if (use_v8_context_snapshot) {
|
||||||
public_deps = [ "//tools/v8_context_snapshot" ]
|
public_deps = [ "//tools/v8_context_snapshot:v8_context_snapshot" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_linux) {
|
if (is_linux) {
|
||||||
@@ -1276,7 +1245,7 @@ if (is_mac) {
|
|||||||
"//components/crash/core/app:run_as_crashpad_handler",
|
"//components/crash/core/app:run_as_crashpad_handler",
|
||||||
]
|
]
|
||||||
|
|
||||||
ldflags = [ "/DELAYLOAD:ffmpeg.dll" ]
|
ldflags = []
|
||||||
|
|
||||||
libs = [
|
libs = [
|
||||||
"comctl32.lib",
|
"comctl32.lib",
|
||||||
@@ -1437,18 +1406,6 @@ dist_zip("electron_dist_zip") {
|
|||||||
":licenses",
|
":licenses",
|
||||||
]
|
]
|
||||||
if (is_linux) {
|
if (is_linux) {
|
||||||
if (is_official_build) {
|
|
||||||
data_deps += [
|
|
||||||
":strip_chrome_crashpad_handler",
|
|
||||||
":strip_chrome_sandbox",
|
|
||||||
":strip_electron_binary",
|
|
||||||
":strip_libEGL_shlib",
|
|
||||||
":strip_libGLESv2_shlib",
|
|
||||||
":strip_libffmpeg_shlib",
|
|
||||||
":strip_libvk_swiftshader_shlib",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
|
|
||||||
data_deps += [ "//sandbox/linux:chrome_sandbox" ]
|
data_deps += [ "//sandbox/linux:chrome_sandbox" ]
|
||||||
}
|
}
|
||||||
deps = data_deps
|
deps = data_deps
|
||||||
@@ -1494,16 +1451,6 @@ group("electron_mksnapshot") {
|
|||||||
|
|
||||||
dist_zip("electron_mksnapshot_zip") {
|
dist_zip("electron_mksnapshot_zip") {
|
||||||
data_deps = mksnapshot_deps
|
data_deps = mksnapshot_deps
|
||||||
if (is_linux && is_official_build) {
|
|
||||||
data_deps += [
|
|
||||||
":strip_libEGL_shlib",
|
|
||||||
":strip_libGLESv2_shlib",
|
|
||||||
":strip_libffmpeg_shlib",
|
|
||||||
":strip_libvk_swiftshader_shlib",
|
|
||||||
":strip_mksnapshot_binary",
|
|
||||||
":strip_v8_context_snapshot_generator_binary",
|
|
||||||
]
|
|
||||||
}
|
|
||||||
deps = data_deps
|
deps = data_deps
|
||||||
outputs = [ "$root_build_dir/mksnapshot.zip" ]
|
outputs = [ "$root_build_dir/mksnapshot.zip" ]
|
||||||
}
|
}
|
||||||
@@ -1628,101 +1575,3 @@ group("copy_node_headers") {
|
|||||||
group("node_headers") {
|
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) {
|
|
||||||
strip_binary("strip_electron_binary") {
|
|
||||||
binary_input = "$root_out_dir/$electron_project_name"
|
|
||||||
symbol_output = "$root_out_dir/debug/$electron_project_name.debug"
|
|
||||||
compress_debug_sections = true
|
|
||||||
deps = [ ":electron_app" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
strip_binary("strip_chrome_crashpad_handler") {
|
|
||||||
binary_input = "$root_out_dir/chrome_crashpad_handler"
|
|
||||||
symbol_output = "$root_out_dir/debug/chrome_crashpad_handler.debug"
|
|
||||||
compress_debug_sections = true
|
|
||||||
deps = [ "//components/crash/core/app:chrome_crashpad_handler" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
strip_binary("strip_chrome_sandbox") {
|
|
||||||
binary_input = "$root_out_dir/chrome_sandbox"
|
|
||||||
symbol_output = "$root_out_dir/debug/chrome-sandbox.debug"
|
|
||||||
compress_debug_sections = true
|
|
||||||
deps = [ "//sandbox/linux:chrome_sandbox" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
strip_binary("strip_libEGL_shlib") {
|
|
||||||
binary_input = "$root_out_dir/libEGL.so"
|
|
||||||
symbol_output = "$root_out_dir/debug/libEGL.so.debug"
|
|
||||||
compress_debug_sections = true
|
|
||||||
deps = [ "//third_party/angle:libEGL" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
strip_binary("strip_libGLESv2_shlib") {
|
|
||||||
binary_input = "$root_out_dir/libGLESv2.so"
|
|
||||||
symbol_output = "$root_out_dir/debug/libGLESv2.so.debug"
|
|
||||||
compress_debug_sections = true
|
|
||||||
deps = [ "//third_party/angle:libGLESv2" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
strip_binary("strip_libffmpeg_shlib") {
|
|
||||||
binary_input = "$root_out_dir/libffmpeg.so"
|
|
||||||
symbol_output = "$root_out_dir/debug/libffmpeg.so.debug"
|
|
||||||
compress_debug_sections = true
|
|
||||||
deps = [ "//third_party/ffmpeg" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
strip_binary("strip_libvk_swiftshader_shlib") {
|
|
||||||
binary_input = "$root_out_dir/libvk_swiftshader.so"
|
|
||||||
symbol_output = "$root_out_dir/debug/libvk_swiftshader.so.debug"
|
|
||||||
compress_debug_sections = true
|
|
||||||
deps = [ "//third_party/swiftshader/src/Vulkan:swiftshader_libvulkan" ]
|
|
||||||
}
|
|
||||||
|
|
||||||
strip_binary("strip_mksnapshot_binary") {
|
|
||||||
_binary_path = rebase_path(
|
|
||||||
get_label_info(
|
|
||||||
":v8_context_snapshot_generator($v8_snapshot_toolchain)",
|
|
||||||
"root_out_dir") + "/mksnapshot",
|
|
||||||
root_build_dir)
|
|
||||||
binary_input = "$root_out_dir/$_binary_path"
|
|
||||||
symbol_output = "$root_out_dir/debug/${_binary_path}.debug"
|
|
||||||
compress_debug_sections = true
|
|
||||||
deps = mksnapshot_deps
|
|
||||||
}
|
|
||||||
|
|
||||||
strip_binary("strip_v8_context_snapshot_generator_binary") {
|
|
||||||
_binary_path = rebase_path(
|
|
||||||
get_label_info(
|
|
||||||
":v8_context_snapshot_generator($v8_snapshot_toolchain)",
|
|
||||||
"root_out_dir") + "/v8_context_snapshot_generator",
|
|
||||||
root_build_dir)
|
|
||||||
binary_input = "$root_out_dir/$_binary_path"
|
|
||||||
symbol_output = "$root_out_dir/debug/${_binary_path}.debug"
|
|
||||||
compress_debug_sections = true
|
|
||||||
deps = mksnapshot_deps
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -71,4 +71,4 @@ See [Coding Style](https://electronjs.org/docs/development/coding-style) for inf
|
|||||||
## Further Reading
|
## Further Reading
|
||||||
|
|
||||||
For more in-depth guides on developing Electron, see
|
For more in-depth guides on developing Electron, see
|
||||||
[/docs/development](/docs/development/README.md).
|
[/docs/development](/docs/development/README.md)
|
||||||
|
|||||||
17
DEPS
17
DEPS
@@ -2,11 +2,11 @@ gclient_gn_args_from = 'src'
|
|||||||
|
|
||||||
vars = {
|
vars = {
|
||||||
'chromium_version':
|
'chromium_version':
|
||||||
'144.0.7559.225',
|
'133.0.6887.0',
|
||||||
'node_version':
|
'node_version':
|
||||||
'v24.14.0',
|
'v22.9.0',
|
||||||
'nan_version':
|
'nan_version':
|
||||||
'675cefebca42410733da8a454c8d9391fcebfbc2',
|
'e14bdcd1f72d62bca1d541b66da43130384ec213',
|
||||||
'squirrel.mac_version':
|
'squirrel.mac_version':
|
||||||
'0e5d146ba13101a1302d59ea6e6e0b3cace4ae38',
|
'0e5d146ba13101a1302d59ea6e6e0b3cace4ae38',
|
||||||
'reactiveobjc_version':
|
'reactiveobjc_version':
|
||||||
@@ -30,6 +30,9 @@ vars = {
|
|||||||
# The path of the sysroots.json file.
|
# The path of the sysroots.json file.
|
||||||
'sysroots_json_path': 'electron/script/sysroots.json',
|
'sysroots_json_path': 'electron/script/sysroots.json',
|
||||||
|
|
||||||
|
# KEEP IN SYNC WITH utils.js FILE
|
||||||
|
'yarn_version': '1.15.2',
|
||||||
|
|
||||||
# To be able to build clean Chromium from sources.
|
# To be able to build clean Chromium from sources.
|
||||||
'apply_patches': True,
|
'apply_patches': True,
|
||||||
|
|
||||||
@@ -59,6 +62,10 @@ vars = {
|
|||||||
|
|
||||||
'checkout_nacl':
|
'checkout_nacl':
|
||||||
False,
|
False,
|
||||||
|
'checkout_libaom':
|
||||||
|
True,
|
||||||
|
'checkout_oculus_sdk':
|
||||||
|
False,
|
||||||
'checkout_openxr':
|
'checkout_openxr':
|
||||||
False,
|
False,
|
||||||
'build_with_chromium':
|
'build_with_chromium':
|
||||||
@@ -67,6 +74,8 @@ vars = {
|
|||||||
False,
|
False,
|
||||||
'checkout_android_native_support':
|
'checkout_android_native_support':
|
||||||
False,
|
False,
|
||||||
|
'checkout_google_benchmark':
|
||||||
|
False,
|
||||||
'checkout_clang_tidy':
|
'checkout_clang_tidy':
|
||||||
True,
|
True,
|
||||||
}
|
}
|
||||||
@@ -152,7 +161,7 @@ hooks = [
|
|||||||
'action': [
|
'action': [
|
||||||
'python3',
|
'python3',
|
||||||
'-c',
|
'-c',
|
||||||
'import os, subprocess; os.chdir(os.path.join("src", "electron")); subprocess.check_call(["node", ".yarn/releases/yarn-4.12.0.cjs", "install", "--immutable"]);',
|
'import os, subprocess; os.chdir(os.path.join("src", "electron")); subprocess.check_call(["python3", "script/lib/npx.py", "yarn@' + (Var("yarn_version")) + '", "install", "--frozen-lockfile"]);',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
19
README.md
19
README.md
@@ -1,6 +1,7 @@
|
|||||||
[](https://electronjs.org)
|
[](https://electronjs.org)
|
||||||
|
|
||||||
[](https://github.com/electron/electron/actions/workflows/build.yml)
|
[](https://github.com/electron/electron/actions/workflows/build.yml)
|
||||||
|
[](https://ci.appveyor.com/project/electron-bot/electron-ljo26/branch/main)
|
||||||
[](https://discord.gg/electronjs)
|
[](https://discord.gg/electronjs)
|
||||||
|
|
||||||
:memo: Available Translations: 🇨🇳 🇧🇷 🇪🇸 🇯🇵 🇷🇺 🇫🇷 🇺🇸 🇩🇪.
|
:memo: Available Translations: 🇨🇳 🇧🇷 🇪🇸 🇯🇵 🇷🇺 🇫🇷 🇺🇸 🇩🇪.
|
||||||
@@ -37,24 +38,36 @@ For more installation options and troubleshooting tips, see
|
|||||||
|
|
||||||
Each Electron release provides binaries for macOS, Windows, and Linux.
|
Each Electron release provides binaries for macOS, Windows, and Linux.
|
||||||
|
|
||||||
* macOS (Monterey and up): Electron provides 64-bit Intel and Apple Silicon / ARM binaries for macOS.
|
* macOS (Big Sur and up): Electron provides 64-bit Intel and Apple Silicon / ARM binaries for macOS.
|
||||||
* Windows (Windows 10 and up): Electron provides `ia32` (`x86`), `x64` (`amd64`), and `arm64` binaries for Windows. Windows on ARM support was added in Electron 5.0.8. Support for Windows 7, 8 and 8.1 was [removed in Electron 23, in line with Chromium's Windows deprecation policy](https://www.electronjs.org/blog/windows-7-to-8-1-deprecation-notice).
|
* Windows (Windows 10 and up): Electron provides `ia32` (`x86`), `x64` (`amd64`), and `arm64` binaries for Windows. Windows on ARM support was added in Electron 5.0.8. Support for Windows 7, 8 and 8.1 was [removed in Electron 23, in line with Chromium's Windows deprecation policy](https://www.electronjs.org/blog/windows-7-to-8-1-deprecation-notice).
|
||||||
* Linux: The prebuilt binaries of Electron are built on Ubuntu 22.04. They have also been verified to work on:
|
* Linux: The prebuilt binaries of Electron are built on Ubuntu 20.04. They have also been verified to work on:
|
||||||
* Ubuntu 18.04 and newer
|
* Ubuntu 18.04 and newer
|
||||||
* Fedora 32 and newer
|
* Fedora 32 and newer
|
||||||
* Debian 10 and newer
|
* Debian 10 and newer
|
||||||
|
|
||||||
## Electron Fiddle
|
## Quick start & Electron Fiddle
|
||||||
|
|
||||||
Use [`Electron Fiddle`](https://github.com/electron/fiddle)
|
Use [`Electron Fiddle`](https://github.com/electron/fiddle)
|
||||||
to build, run, and package small Electron experiments, to see code examples for all of Electron's APIs, and
|
to build, run, and package small Electron experiments, to see code examples for all of Electron's APIs, and
|
||||||
to try out different versions of Electron. It's designed to make the start of your journey with
|
to try out different versions of Electron. It's designed to make the start of your journey with
|
||||||
Electron easier.
|
Electron easier.
|
||||||
|
|
||||||
|
Alternatively, clone and run the
|
||||||
|
[electron/electron-quick-start](https://github.com/electron/electron-quick-start)
|
||||||
|
repository to see a minimal Electron app in action:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
git clone https://github.com/electron/electron-quick-start
|
||||||
|
cd electron-quick-start
|
||||||
|
npm install
|
||||||
|
npm start
|
||||||
|
```
|
||||||
|
|
||||||
## Resources for learning Electron
|
## Resources for learning Electron
|
||||||
|
|
||||||
* [electronjs.org/docs](https://electronjs.org/docs) - All of Electron's documentation
|
* [electronjs.org/docs](https://electronjs.org/docs) - All of Electron's documentation
|
||||||
* [electron/fiddle](https://github.com/electron/fiddle) - A tool to build, run, and package small Electron experiments
|
* [electron/fiddle](https://github.com/electron/fiddle) - A tool to build, run, and package small Electron experiments
|
||||||
|
* [electron/electron-quick-start](https://github.com/electron/electron-quick-start) - A very basic starter Electron app
|
||||||
* [electronjs.org/community#boilerplates](https://electronjs.org/community#boilerplates) - Sample starter apps created by the community
|
* [electronjs.org/community#boilerplates](https://electronjs.org/community#boilerplates) - Sample starter apps created by the community
|
||||||
|
|
||||||
## Programmatic usage
|
## Programmatic usage
|
||||||
|
|||||||
@@ -8,12 +8,6 @@ The Electron team will send a response indicating the next steps in handling you
|
|||||||
|
|
||||||
Report security bugs in third-party modules to the person or team maintaining the module. You can also report a vulnerability through the [npm contact form](https://www.npmjs.com/support) by selecting "I'm reporting a security vulnerability".
|
Report security bugs in third-party modules to the person or team maintaining the module. You can also report a vulnerability through the [npm contact form](https://www.npmjs.com/support) by selecting "I'm reporting a security vulnerability".
|
||||||
|
|
||||||
## Escalation
|
|
||||||
|
|
||||||
If you do not receive an acknowledgement of your report within 6 business days, or if you cannot find a private security contact for the project, you may escalate to the OpenJS Foundation CNA at `security@lists.openjsf.org`.
|
|
||||||
|
|
||||||
If the project acknowledges your report but does not provide any further response or engagement within 14 days, escalation is also appropriate.
|
|
||||||
|
|
||||||
## The Electron Security Notification Process
|
## The Electron Security Notification Process
|
||||||
|
|
||||||
For context on Electron's security notification process, please see the [Notifications](https://github.com/electron/governance/blob/main/wg-security/membership-and-notifications.md#notifications) section of the Security WG's [Membership and Notifications](https://github.com/electron/governance/blob/main/wg-security/membership-and-notifications.md) Governance document.
|
For context on Electron's security notification process, please see the [Notifications](https://github.com/electron/governance/blob/main/wg-security/membership-and-notifications.md#notifications) section of the Security WG's [Membership and Notifications](https://github.com/electron/governance/blob/main/wg-security/membership-and-notifications.md) Governance document.
|
||||||
|
|||||||
107
appveyor-bake.yml
Normal file
107
appveyor-bake.yml
Normal file
@@ -0,0 +1,107 @@
|
|||||||
|
# The config is used to bake appveyor images, not for running CI jobs.
|
||||||
|
# The config expects the following environment variables to be set:
|
||||||
|
# - "APPVEYOR_BAKE_IMAGE" e.g. 'electron-99.0.4767.0'. Name of the image to be baked.
|
||||||
|
# Typically named after the Chromium version on which the image is built.
|
||||||
|
# This can be set dynamically in the prepare-appveyor script.
|
||||||
|
|
||||||
|
version: 1.0.{build}
|
||||||
|
build_cloud: electronhq-16-core
|
||||||
|
image: base-bake-image
|
||||||
|
environment:
|
||||||
|
GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache
|
||||||
|
ELECTRON_OUT_DIR: Default
|
||||||
|
ELECTRON_ENABLE_STACK_DUMPING: 1
|
||||||
|
MOCHA_REPORTER: mocha-multi-reporters
|
||||||
|
MOCHA_MULTI_REPORTERS: mocha-appveyor-reporter, tap
|
||||||
|
DEPOT_TOOLS_WIN_TOOLCHAIN: 0
|
||||||
|
PYTHONIOENCODING: UTF-8
|
||||||
|
|
||||||
|
# The following lines are needed when baking from a completely new image (eg MicrosoftWindowsServer:WindowsServer:2019-Datacenter:latest via image: base-windows-server2019)
|
||||||
|
# init:
|
||||||
|
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||||
|
# - appveyor version
|
||||||
|
# - ps: $ErrorActionPreference = 'Stop'
|
||||||
|
# - ps: 'Write-Host "OS Build: $((Get-CimInstance Win32_OperatingSystem).BuildNumber)"'
|
||||||
|
|
||||||
|
# clone_folder: '%USERPROFILE%\image-bake-scripts'
|
||||||
|
|
||||||
|
# clone_script:
|
||||||
|
# - ps: Invoke-WebRequest "https://github.com/appveyor/build-images/archive/1f90d94e74c8243c909a09b994e527584dfcb838.zip" -OutFile "$env:temp\scripts.zip"
|
||||||
|
# - ps: Expand-Archive -Path "$env:temp\scripts.zip" -DestinationPath "$env:temp\scripts" -Force
|
||||||
|
# - ps: Copy-Item -Path "$env:temp\scripts\build-images-1f90d94e74c8243c909a09b994e527584dfcb838\scripts\Windows\*" -Destination $env:APPVEYOR_BUILD_FOLDER -Recurse
|
||||||
|
|
||||||
|
build_script:
|
||||||
|
# The following lines are needed when baking from a completely new image (eg MicrosoftWindowsServer:WindowsServer:2019-Datacenter:latest via image: base-windows-server2019)
|
||||||
|
# - ps: .\init_server.ps1
|
||||||
|
# - ps: .\extend_system_volume.ps1
|
||||||
|
|
||||||
|
# # Restart VM
|
||||||
|
# - ps: Start-Sleep -s 5; Restart-Computer
|
||||||
|
# - ps: Start-Sleep -s 5
|
||||||
|
|
||||||
|
# - appveyor version
|
||||||
|
# - ps: .\install_path_utils.ps1
|
||||||
|
# - ps: .\install_powershell_core.ps1
|
||||||
|
# - ps: .\install_powershell_get.ps1
|
||||||
|
# - ps: .\install_7zip.ps1
|
||||||
|
# - ps: .\install_chocolatey.ps1
|
||||||
|
# - ps: .\install_webpi.ps1
|
||||||
|
# - ps: .\install_nuget.ps1
|
||||||
|
# - ps: .\install_pstools.ps1
|
||||||
|
|
||||||
|
# - ps: .\install_git.ps1
|
||||||
|
# - ps: .\install_git_lfs.ps1
|
||||||
|
|
||||||
|
# # Restart VM
|
||||||
|
# - ps: Start-Sleep -s 5; Restart-Computer
|
||||||
|
# - ps: Start-Sleep -s 5
|
||||||
|
# END LINES FOR COMPLETELY NEW IMAGE
|
||||||
|
|
||||||
|
- git config --global core.longpaths true
|
||||||
|
- ps: >-
|
||||||
|
if (-not (Test-Path -Path C:\projects\src)) {
|
||||||
|
New-Item -Path C:\projects\src -ItemType Directory
|
||||||
|
}
|
||||||
|
- cd C:\projects\
|
||||||
|
- git clone -q --branch=%APPVEYOR_REPO_BRANCH% https://github.com/electron/electron.git C:\projects\src\electron
|
||||||
|
- git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||||
|
- ps: $env:PATH="$pwd\depot_tools;$env:PATH"
|
||||||
|
- update_depot_tools.bat
|
||||||
|
# Uncomment the following line if windows deps change
|
||||||
|
- src\electron\script\setup-win-for-dev.bat
|
||||||
|
- >-
|
||||||
|
gclient config
|
||||||
|
--name "src\electron"
|
||||||
|
--unmanaged
|
||||||
|
%GCLIENT_EXTRA_ARGS%
|
||||||
|
"https://github.com/electron/electron"
|
||||||
|
- ps: cd src\electron
|
||||||
|
- ps: node script\generate-deps-hash.js
|
||||||
|
- ps: $depshash = Get-Content .\.depshash -Raw
|
||||||
|
- ps: Copy-Item -path .\.depshash -destination ..\.depshash
|
||||||
|
- ps: cd ..\..
|
||||||
|
- gclient sync --with_branch_heads --with_tags --nohooks
|
||||||
|
- ps: regsvr32 /s "C:\Program Files\Microsoft Visual Studio\2022\Community\DIA SDK\bin\amd64\msdia140.dll"
|
||||||
|
- ps: set vs2022_install="C:\Program Files\Microsoft Visual Studio\2022\Community"
|
||||||
|
|
||||||
|
# The following lines are needed when baking from a completely new image (eg MicrosoftWindowsServer:WindowsServer:2019-Datacenter:latest via image: base-windows-server2019)
|
||||||
|
# # Restart VM
|
||||||
|
# - ps: Start-Sleep -s 5; Restart-Computer
|
||||||
|
# - ps: Start-Sleep -s 5
|
||||||
|
|
||||||
|
# - cd %USERPROFILE%\image-bake-scripts
|
||||||
|
# - appveyor version
|
||||||
|
# - ps: .\optimize_dotnet_runtime.ps1
|
||||||
|
# - ps: .\disable_windows_background_services.ps1
|
||||||
|
# - ps: .\enforce_windows_firewall.ps1
|
||||||
|
# - ps: .\cleanup_windows.ps1
|
||||||
|
# END LINES FOR COMPLETELY NEW IMAGE
|
||||||
|
on_image_bake:
|
||||||
|
- ps: >-
|
||||||
|
echo "Baking image: $env:APPVEYOR_BAKE_IMAGE at dir $PWD"
|
||||||
|
- ps: Remove-Item -Recurse -Force C:\projects\depot_tools
|
||||||
|
- ps: Remove-Item -Recurse -Force C:\projects\src\electron
|
||||||
|
# Uncomment these lines and set APPVEYOR_RDP_PASSWORD in project settings to enable RDP after bake is done
|
||||||
|
# # on_finish:
|
||||||
|
# - ps: >-
|
||||||
|
# $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||||
352
appveyor-woa.yml
Normal file
352
appveyor-woa.yml
Normal file
@@ -0,0 +1,352 @@
|
|||||||
|
# NOTE IF CHANGING THIS FILE, ALSO APPLY THE CHANGE TO appveyor.yml
|
||||||
|
# IF APPLICABLE!!!!
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# The config expects the following environment variables to be set:
|
||||||
|
# - "GN_CONFIG" Build type. One of {'testing', 'release'}.
|
||||||
|
# - "GN_EXTRA_ARGS" Additional gn arguments for a build config,
|
||||||
|
# e.g. 'target_cpu="x86"' to build for a 32bit platform.
|
||||||
|
# https://gn.googlesource.com/gn/+/main/docs/reference.md#var_target_cpu
|
||||||
|
# Don't forget to set up "NPM_CONFIG_ARCH" and "TARGET_ARCH" accordingly
|
||||||
|
# if you pass a custom value for 'target_cpu'.
|
||||||
|
# - "ELECTRON_RELEASE" Set it to '1' upload binaries on success.
|
||||||
|
# - "NPM_CONFIG_ARCH" E.g. 'x86'. Is used to build native Node.js modules.
|
||||||
|
# Must match 'target_cpu' passed to "GN_EXTRA_ARGS" and "TARGET_ARCH" value.
|
||||||
|
# - "TARGET_ARCH" Choose from {'ia32', 'x64', 'arm', 'arm64'}.
|
||||||
|
# Is used in some publishing scripts, but does NOT affect the Electron binary.
|
||||||
|
# Must match 'target_cpu' passed to "GN_EXTRA_ARGS" and "NPM_CONFIG_ARCH" value.
|
||||||
|
# - "UPLOAD_TO_STORAGE" Set it to '1' upload a release to the Azure bucket.
|
||||||
|
# Otherwise the release will be uploaded to the GitHub Releases.
|
||||||
|
# (The value is only checked if "ELECTRON_RELEASE" is defined.)
|
||||||
|
#
|
||||||
|
# The publishing scripts expect access tokens to be defined as env vars,
|
||||||
|
# but those are not covered here.
|
||||||
|
#
|
||||||
|
# AppVeyor docs on variables:
|
||||||
|
# https://www.appveyor.com/docs/environment-variables/
|
||||||
|
# https://www.appveyor.com/docs/build-configuration/#secure-variables
|
||||||
|
# https://www.appveyor.com/docs/build-configuration/#custom-environment-variables
|
||||||
|
|
||||||
|
version: 1.0.{build}
|
||||||
|
build_cloud: electronhq-16-core
|
||||||
|
image: e-133.0.6878.0
|
||||||
|
environment:
|
||||||
|
GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache
|
||||||
|
ELECTRON_OUT_DIR: Default
|
||||||
|
ELECTRON_ENABLE_STACK_DUMPING: 1
|
||||||
|
ELECTRON_ALSO_LOG_TO_STDERR: 1
|
||||||
|
MOCHA_REPORTER: mocha-multi-reporters
|
||||||
|
MOCHA_MULTI_REPORTERS: "@marshallofsound/mocha-appveyor-reporter, mocha-junit-reporter, tap"
|
||||||
|
DEPOT_TOOLS_WIN_TOOLCHAIN: 1
|
||||||
|
DEPOT_TOOLS_WIN_TOOLCHAIN_BASE_URL: "https://dev-cdn.electronjs.org/windows-toolchains/_"
|
||||||
|
GYP_MSVS_HASH_7393122652: 3ba76c5c20
|
||||||
|
PYTHONIOENCODING: UTF-8
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
|
||||||
|
- job_name: Build Arm on X64 Windows
|
||||||
|
- job_name: Test On Windows On Arm Hardware 1
|
||||||
|
job_depends_on: Build Arm on X64 Windows
|
||||||
|
APPVEYOR_BUILD_WORKER_IMAGE: base-woa
|
||||||
|
APPVEYOR_BUILD_WORKER_CLOUD: electronhq-woa
|
||||||
|
shard: 1
|
||||||
|
- job_name: Test On Windows On Arm Hardware 2
|
||||||
|
job_depends_on: Build Arm on X64 Windows
|
||||||
|
APPVEYOR_BUILD_WORKER_IMAGE: base-woa
|
||||||
|
APPVEYOR_BUILD_WORKER_CLOUD: electronhq-woa
|
||||||
|
shard: 2
|
||||||
|
|
||||||
|
clone_script:
|
||||||
|
- ps: git clone -q $("--branch=" + $Env:APPVEYOR_REPO_BRANCH) $("https://github.com/" + $Env:APPVEYOR_REPO_NAME + ".git") $Env:APPVEYOR_BUILD_FOLDER
|
||||||
|
- ps: if (!$Env:APPVEYOR_PULL_REQUEST_NUMBER) {$("git checkout -qf " + $Env:APPVEYOR_REPO_COMMIT)}
|
||||||
|
- ps: if ($Env:APPVEYOR_PULL_REQUEST_NUMBER) {git fetch -q origin +refs/pull/$($Env:APPVEYOR_PULL_REQUEST_NUMBER)/head; git checkout -qf FETCH_HEAD}
|
||||||
|
|
||||||
|
clone_folder: C:\projects\src\electron
|
||||||
|
|
||||||
|
skip_branch_with_pr: true
|
||||||
|
|
||||||
|
# the first failed job cancels other jobs and fails entire build
|
||||||
|
matrix:
|
||||||
|
fast_finish: true
|
||||||
|
|
||||||
|
for:
|
||||||
|
|
||||||
|
- matrix:
|
||||||
|
only:
|
||||||
|
- job_name: Build Arm on X64 Windows
|
||||||
|
|
||||||
|
build_script:
|
||||||
|
# TODO: Remove --ignore-engines once WOA image is up to node 20
|
||||||
|
- ps: |
|
||||||
|
node script/yarn.js install --frozen-lockfile --ignore-engines
|
||||||
|
node script/doc-only-change.js --prNumber=$env:APPVEYOR_PULL_REQUEST_NUMBER
|
||||||
|
$env:SHOULD_SKIP_ARTIFACT_VALIDATION = "false"
|
||||||
|
if ($LASTEXITCODE -eq 0) {
|
||||||
|
Write-warning "Skipping build for doc-only change"
|
||||||
|
$env:SHOULD_SKIP_ARTIFACT_VALIDATION = "true"
|
||||||
|
Exit-AppveyorBuild
|
||||||
|
} else {
|
||||||
|
$global:LASTEXITCODE = 0
|
||||||
|
}
|
||||||
|
- cd ..
|
||||||
|
- ps: Write-Host "Building $env:GN_CONFIG build"
|
||||||
|
- git config --global core.longpaths true
|
||||||
|
- ps: >-
|
||||||
|
if (Test-Path -Path "$pwd\depot_tools") {
|
||||||
|
Remove-Item -Recurse -Force $pwd\depot_tools
|
||||||
|
}
|
||||||
|
- ps: >-
|
||||||
|
if (Test-Path -Path "$pwd\build-tools") {
|
||||||
|
Remove-Item -Recurse -Force $pwd\build-tools
|
||||||
|
}
|
||||||
|
- git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||||
|
- ps: New-Item -Name depot_tools\.disable_auto_update -ItemType File
|
||||||
|
- depot_tools\bootstrap\win_tools.bat
|
||||||
|
- ps: |
|
||||||
|
Set-Content -Path $pwd\depot_tools\build_telemetry.cfg -Value '{"user": "info@electronjs.org", "status": "opt-out", "countdown": 10, "version": 1}'
|
||||||
|
- ps: $env:PATH="$pwd\depot_tools;$env:PATH"
|
||||||
|
- ps: >-
|
||||||
|
if (Test-Path -Path "$pwd\src\electron") {
|
||||||
|
Remove-Item -Recurse -Force $pwd\src\electron
|
||||||
|
}
|
||||||
|
- git clone https://github.com/electron/build-tools.git
|
||||||
|
- cd build-tools
|
||||||
|
- npx yarn --ignore-engines
|
||||||
|
- mkdir third_party
|
||||||
|
- ps: >-
|
||||||
|
node -e "require('./src/utils/reclient.js').downloadAndPrepare({})"
|
||||||
|
- ps: $env:RECLIENT_HELPER = node -p "require('./src/utils/reclient.js').helperPath({})"
|
||||||
|
- ps: >-
|
||||||
|
& $env:RECLIENT_HELPER login
|
||||||
|
- ps: >-
|
||||||
|
$env:RBE_service = node -e "console.log(require('./src/utils/reclient.js').serviceAddress)"
|
||||||
|
- ps: >-
|
||||||
|
$env:RBE_credentials_helper = $env:RECLIENT_HELPER
|
||||||
|
- ps: >-
|
||||||
|
$env:RBE_credentials_helper_args = "print"
|
||||||
|
- ps: >-
|
||||||
|
if ($env:ELECTRON_RBE_JWT -eq '') {
|
||||||
|
$env:RBE_fail_early_min_action_count = "0"
|
||||||
|
$env:RBE_fail_early_min_fallback_ratio = "0"
|
||||||
|
}
|
||||||
|
- cd ..\..
|
||||||
|
- ps: $env:CHROMIUM_BUILDTOOLS_PATH="$pwd\src\buildtools"
|
||||||
|
- ps: >-
|
||||||
|
if ($env:GN_CONFIG -ne 'release') {
|
||||||
|
$env:NINJA_STATUS="[%r processes, %f/%t @ %o/s : %es] "
|
||||||
|
}
|
||||||
|
- gclient config --name "src\electron" --unmanaged %GCLIENT_EXTRA_ARGS% "https://github.com/electron/electron"
|
||||||
|
# Patches are applied in the image bake. Check depshash to see if patches have changed.
|
||||||
|
- ps: $env:RUN_GCLIENT_SYNC="false"
|
||||||
|
- ps: $depshash_baked = Get-Content .\src\.depshash -Raw
|
||||||
|
- ps: cd src\electron
|
||||||
|
- ps: node script\generate-deps-hash.js
|
||||||
|
- ps: $depshash = Get-Content .\.depshash -Raw
|
||||||
|
- ps: cd ..\..
|
||||||
|
- ps: >-
|
||||||
|
if ($depshash_baked -ne $depshash) {
|
||||||
|
$env:RUN_GCLIENT_SYNC="true"
|
||||||
|
}
|
||||||
|
- if "%RUN_GCLIENT_SYNC%"=="true" ( gclient sync --with_branch_heads --with_tags ) else ( gclient runhooks )
|
||||||
|
- cd src
|
||||||
|
- ps: $env:PATH="$pwd\third_party\ninja;$env:PATH"
|
||||||
|
- set BUILD_CONFIG_PATH=//electron/build/args/%GN_CONFIG%.gn
|
||||||
|
- gn gen out/Default "--args=import(\"%BUILD_CONFIG_PATH%\") use_remoteexec=true %GN_EXTRA_ARGS% "
|
||||||
|
- gn check out/Default //electron:electron_lib
|
||||||
|
- gn check out/Default //electron:electron_app
|
||||||
|
- gn check out/Default //electron/shell/common:mojo
|
||||||
|
- gn check out/Default //electron/shell/common:plugin
|
||||||
|
- autoninja -j 300 -C out/Default electron:electron_app
|
||||||
|
- if "%GN_CONFIG%"=="testing" ( python C:\depot_tools\post_build_ninja_summary.py -C out\Default )
|
||||||
|
- gn gen out/ffmpeg "--args=import(\"//electron/build/args/ffmpeg.gn\") use_remoteexec=true %GN_EXTRA_ARGS%"
|
||||||
|
- autoninja -C out/ffmpeg electron:electron_ffmpeg_zip
|
||||||
|
- autoninja -C out/Default electron:electron_dist_zip
|
||||||
|
- gn desc out/Default v8:run_mksnapshot_default args > out/Default/default_mksnapshot_args
|
||||||
|
# Remove unused args from mksnapshot_args
|
||||||
|
- ps: >-
|
||||||
|
Get-Content out/Default/default_mksnapshot_args | Where-Object { -not $_.Contains('--turbo-profiling-input') -And -not $_.Contains('builtins-pgo') } | Set-Content out/Default/mksnapshot_args
|
||||||
|
- autoninja -C out/Default electron:electron_mksnapshot_zip
|
||||||
|
- cd out\Default
|
||||||
|
- 7z a mksnapshot.zip mksnapshot_args gen\v8\embedded.S
|
||||||
|
- cd ..\..
|
||||||
|
- autoninja -C out/Default electron:hunspell_dictionaries_zip
|
||||||
|
- autoninja -C out/Default electron:electron_chromedriver_zip
|
||||||
|
- autoninja -C out/Default electron:node_headers
|
||||||
|
- ps: >-
|
||||||
|
Get-CimInstance -Namespace root\cimv2 -Class Win32_product | Select vendor, description, @{l='install_location';e='InstallLocation'}, @{l='install_date';e='InstallDate'}, @{l='install_date_2';e='InstallDate2'}, caption, version, name, @{l='sku_number';e='SKUNumber'} | ConvertTo-Json | Out-File -Encoding utf8 -FilePath .\installed_software.json
|
||||||
|
- python3 electron/build/profile_toolchain.py --output-json=out/Default/windows_toolchain_profile.json
|
||||||
|
- 7z a node_headers.zip out\Default\gen\node_headers
|
||||||
|
- 7z a nan.zip third_party\nan
|
||||||
|
- ps: >-
|
||||||
|
if ($env:GN_CONFIG -eq 'release') {
|
||||||
|
# Needed for msdia140.dll on 64-bit windows
|
||||||
|
$env:Path += ";$pwd\third_party\llvm-build\Release+Asserts\bin"
|
||||||
|
}
|
||||||
|
- if "%GN_CONFIG%"=="release" ( autoninja -C out/Default electron:electron_symbols )
|
||||||
|
- ps: >-
|
||||||
|
if ($env:GN_CONFIG -eq 'release') {
|
||||||
|
python3 electron\script\zip-symbols.py
|
||||||
|
appveyor-retry appveyor PushArtifact out/Default/symbols.zip
|
||||||
|
} else {
|
||||||
|
# It's useful to have pdb files when debugging testing builds that are
|
||||||
|
# built on CI.
|
||||||
|
7z a pdb.zip out\Default\*.pdb
|
||||||
|
}
|
||||||
|
- ps: |
|
||||||
|
$manifest_file = "electron/script/zip_manifests/dist_zip.win.$env:TARGET_ARCH.manifest"
|
||||||
|
python3 electron/script/zip_manifests/check-zip-manifest.py out/Default/dist.zip $manifest_file
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
throw "Zip contains files not listed in the manifest $manifest_file"
|
||||||
|
}
|
||||||
|
- ps: |
|
||||||
|
cd C:\projects\src
|
||||||
|
$missing_artifacts = $false
|
||||||
|
if ($env:SHOULD_SKIP_ARTIFACT_VALIDATION -eq 'true') {
|
||||||
|
Write-warning "Skipping artifact validation for doc-only $env:APPVEYOR_PROJECT_NAME"
|
||||||
|
} else {
|
||||||
|
$artifacts_to_validate = 'dist.zip','windows_toolchain_profile.json','chromedriver.zip','ffmpeg.zip','node_headers.zip','mksnapshot.zip','electron.lib','hunspell_dictionaries.zip','nan.zip'
|
||||||
|
foreach($artifact_name in $artifacts_to_validate) {
|
||||||
|
if ($artifact_name -eq 'ffmpeg.zip') {
|
||||||
|
$artifact_file = "out\ffmpeg\ffmpeg.zip"
|
||||||
|
} elseif (
|
||||||
|
$artifact_name -eq 'node_headers.zip') {
|
||||||
|
$artifact_file = $artifact_name
|
||||||
|
} elseif (
|
||||||
|
$artifact_name -eq 'nan.zip') {
|
||||||
|
$artifact_file = $artifact_name
|
||||||
|
} else {
|
||||||
|
$artifact_file = "out\Default\$artifact_name"
|
||||||
|
}
|
||||||
|
if (-not(Test-Path $artifact_file)) {
|
||||||
|
Write-warning "$artifact_name is missing and cannot be added to artifacts"
|
||||||
|
$missing_artifacts = $true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($missing_artifacts) {
|
||||||
|
throw "Build failed due to missing artifacts"
|
||||||
|
}
|
||||||
|
|
||||||
|
deploy_script:
|
||||||
|
- cd electron
|
||||||
|
- ps: >-
|
||||||
|
if (Test-Path Env:\ELECTRON_RELEASE) {
|
||||||
|
if (Test-Path Env:\UPLOAD_TO_STORAGE) {
|
||||||
|
Write-Output "Uploading Electron release distribution to azure"
|
||||||
|
& python3 script\release\uploaders\upload.py --verbose --upload_to_storage
|
||||||
|
} else {
|
||||||
|
Write-Output "Uploading Electron release distribution to github releases"
|
||||||
|
& python3 script\release\uploaders\upload.py --verbose
|
||||||
|
}
|
||||||
|
}
|
||||||
|
on_finish:
|
||||||
|
# Uncomment this lines to enable RDP
|
||||||
|
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||||
|
- cd C:\projects\src
|
||||||
|
- if exist out\Default\windows_toolchain_profile.json ( appveyor-retry appveyor PushArtifact out\Default\windows_toolchain_profile.json )
|
||||||
|
- if exist out\Default\dist.zip (appveyor-retry appveyor PushArtifact out\Default\dist.zip)
|
||||||
|
- if exist out\Default\chromedriver.zip (appveyor-retry appveyor PushArtifact out\Default\chromedriver.zip)
|
||||||
|
- if exist out\ffmpeg\ffmpeg.zip (appveyor-retry appveyor PushArtifact out\ffmpeg\ffmpeg.zip)
|
||||||
|
- if exist node_headers.zip (appveyor-retry appveyor PushArtifact node_headers.zip)
|
||||||
|
- if exist nan.zip (appveyor-retry appveyor PushArtifact nan.zip)
|
||||||
|
- if exist out\Default\mksnapshot.zip (appveyor-retry appveyor PushArtifact out\Default\mksnapshot.zip)
|
||||||
|
- if exist out\Default\hunspell_dictionaries.zip (appveyor-retry appveyor PushArtifact out\Default\hunspell_dictionaries.zip)
|
||||||
|
- if exist out\Default\electron.lib (appveyor-retry appveyor PushArtifact out\Default\electron.lib)
|
||||||
|
- ps: >-
|
||||||
|
if ((Test-Path "pdb.zip") -And ($env:GN_CONFIG -ne 'release')) {
|
||||||
|
appveyor-retry appveyor PushArtifact pdb.zip
|
||||||
|
}
|
||||||
|
- matrix:
|
||||||
|
only:
|
||||||
|
- job_name: Test On Windows On Arm Hardware 1
|
||||||
|
- job_name: Test On Windows On Arm Hardware 2
|
||||||
|
|
||||||
|
environment:
|
||||||
|
IGNORE_YARN_INSTALL_ERROR: 1
|
||||||
|
ELECTRON_TEST_RESULTS_DIR: C:\projects\src\electron\junit
|
||||||
|
MOCHA_MULTI_REPORTERS: "@marshallofsound/mocha-appveyor-reporter, mocha-junit-reporter, tap"
|
||||||
|
MOCHA_REPORTER: mocha-multi-reporters
|
||||||
|
ELECTRON_SKIP_NATIVE_MODULE_TESTS: true
|
||||||
|
DD_ENV: ci
|
||||||
|
DD_SERVICE: electron
|
||||||
|
DD_CIVISIBILITY_LOGS_ENABLED: true
|
||||||
|
DD_GIT_REPOSITORY_URL: "https://github.com/electron/electron.git"
|
||||||
|
|
||||||
|
build_script:
|
||||||
|
- ps: |
|
||||||
|
node script/yarn.js install --frozen-lockfile --ignore-engines
|
||||||
|
node script/doc-only-change.js --prNumber=$env:APPVEYOR_PULL_REQUEST_NUMBER
|
||||||
|
if ($LASTEXITCODE -eq 0) {
|
||||||
|
Write-warning "Skipping build for doc only change"
|
||||||
|
Exit-AppveyorBuild
|
||||||
|
} else {
|
||||||
|
$global:LASTEXITCODE = 0
|
||||||
|
}
|
||||||
|
- ps: Invoke-WebRequest -Uri "https://github.com/DataDog/datadog-ci/releases/latest/download/datadog-ci_win-x64" -OutFile "C:\projects\src\electron\datadog-ci.exe"
|
||||||
|
- cd ..
|
||||||
|
- mkdir out\Default
|
||||||
|
- cd ..
|
||||||
|
- ps: |
|
||||||
|
# Download build artifacts
|
||||||
|
$apiUrl = 'https://ci.appveyor.com/api'
|
||||||
|
$build_info = Invoke-RestMethod -Method Get -Uri "$apiUrl/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/builds/$env:APPVEYOR_BUILD_ID"
|
||||||
|
$artifacts_to_download = @('dist.zip','ffmpeg.zip','node_headers.zip','electron.lib', 'nan.zip')
|
||||||
|
foreach ($job in $build_info.build.jobs) {
|
||||||
|
if ($job.name -eq "Build Arm on X64 Windows") {
|
||||||
|
$jobId = $job.jobId
|
||||||
|
foreach($artifact_name in $artifacts_to_download) {
|
||||||
|
if ($artifact_name -eq 'electron.lib') {
|
||||||
|
$outfile = "src\out\Default\$artifact_name"
|
||||||
|
} else {
|
||||||
|
$outfile = $artifact_name
|
||||||
|
}
|
||||||
|
Invoke-RestMethod -Method Get -Uri "$apiUrl/buildjobs/$jobId/artifacts/$artifact_name" -OutFile $outfile
|
||||||
|
}
|
||||||
|
# Uncomment the following lines to download the pdb.zip to show real stacktraces when crashes happen during testing
|
||||||
|
Invoke-RestMethod -Method Get -Uri "$apiUrl/buildjobs/$jobId/artifacts/pdb.zip" -OutFile pdb.zip
|
||||||
|
7z x -y -osrc pdb.zip
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- ps: |
|
||||||
|
$out_default_zips = @('dist.zip')
|
||||||
|
foreach($zip_name in $out_default_zips) {
|
||||||
|
7z x -y -osrc\out\Default $zip_name
|
||||||
|
}
|
||||||
|
- ps: 7z x -y -osrc\out\ffmpeg ffmpeg.zip
|
||||||
|
- ps: 7z x -y -osrc node_headers.zip
|
||||||
|
- ps: 7z x -y -osrc nan.zip
|
||||||
|
|
||||||
|
test_script:
|
||||||
|
# Workaround for https://github.com/appveyor/ci/issues/2420
|
||||||
|
- set "PATH=%PATH%;C:\Program Files\Git\mingw64\libexec\git-core"
|
||||||
|
- ps: |
|
||||||
|
cd src
|
||||||
|
New-Item .\out\Default\gen\node_headers\Release -Type directory
|
||||||
|
Copy-Item -path .\out\Default\electron.lib -destination .\out\Default\gen\node_headers\Release\node.lib
|
||||||
|
- set npm_config_nodedir=%cd%\out\Default\gen\node_headers
|
||||||
|
- set npm_config_arch=arm64
|
||||||
|
- cd electron
|
||||||
|
# Explicitly set npm_config_arch because the .env doesn't persist
|
||||||
|
- ps: >-
|
||||||
|
if ($env:TARGET_ARCH -eq 'ia32') {
|
||||||
|
$env:npm_config_arch = "ia32"
|
||||||
|
}
|
||||||
|
- ps: $env:tests_files=node script\split-tests $env:shard 2
|
||||||
|
- echo "Running shard %shard% specs %tests_files%"
|
||||||
|
- echo Running main test suite & node script/yarn test --runners=main --enable-logging --disable-features=CalculateNativeWinOcclusion --files %tests_files%
|
||||||
|
- cd ..
|
||||||
|
- echo Verifying non proprietary ffmpeg & python electron\script\verify-ffmpeg.py --build-dir out\Default --source-root %cd% --ffmpeg-path out\ffmpeg
|
||||||
|
|
||||||
|
on_finish:
|
||||||
|
# Uncomment these lines to enable RDP
|
||||||
|
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||||
|
- if exist electron\junit\test-results-main.xml ( appveyor-retry appveyor PushArtifact electron\junit\test-results-main.xml )
|
||||||
|
- ps: |
|
||||||
|
if ($env:DD_API_KEY) {
|
||||||
|
$env:DD_GIT_COMMIT_SHA = $env:APPVEYOR_REPO_COMMIT
|
||||||
|
$env:DD_GIT_BRANCH = $env:APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH
|
||||||
|
$env:DD_TAGS = "os.architecture:$env:TARGET_ARCH,os.family:windows,os.platform:win32"
|
||||||
|
if (Test-Path -Path "C:\projects\src\electron\junit\test-results-main.xml") {
|
||||||
|
C:\projects\src\electron\datadog-ci.exe junit upload --verbose C:\projects\src\electron\junit\test-results-main.xml
|
||||||
|
}
|
||||||
|
}
|
||||||
350
appveyor.yml
Normal file
350
appveyor.yml
Normal file
@@ -0,0 +1,350 @@
|
|||||||
|
# NOTE IF CHANGING THIS FILE, ALSO APPLY THE CHANGE TO appveyor-woa.yml
|
||||||
|
# IF APPLICABLE!!!!
|
||||||
|
#
|
||||||
|
#
|
||||||
|
# The config expects the following environment variables to be set:
|
||||||
|
# - "GN_CONFIG" Build type. One of {'testing', 'release'}.
|
||||||
|
# - "GN_EXTRA_ARGS" Additional gn arguments for a build config,
|
||||||
|
# e.g. 'target_cpu="x86"' to build for a 32bit platform.
|
||||||
|
# https://gn.googlesource.com/gn/+/main/docs/reference.md#var_target_cpu
|
||||||
|
# Don't forget to set up "NPM_CONFIG_ARCH" and "TARGET_ARCH" accordingly
|
||||||
|
# if you pass a custom value for 'target_cpu'.
|
||||||
|
# - "ELECTRON_RELEASE" Set it to '1' upload binaries on success.
|
||||||
|
# - "NPM_CONFIG_ARCH" E.g. 'x86'. Is used to build native Node.js modules.
|
||||||
|
# Must match 'target_cpu' passed to "GN_EXTRA_ARGS" and "TARGET_ARCH" value.
|
||||||
|
# - "TARGET_ARCH" Choose from {'ia32', 'x64', 'arm', 'arm64'}.
|
||||||
|
# Is used in some publishing scripts, but does NOT affect the Electron binary.
|
||||||
|
# Must match 'target_cpu' passed to "GN_EXTRA_ARGS" and "NPM_CONFIG_ARCH" value.
|
||||||
|
# - "UPLOAD_TO_STORAGE" Set it to '1' upload a release to the Azure bucket.
|
||||||
|
# Otherwise the release will be uploaded to the GitHub Releases.
|
||||||
|
# (The value is only checked if "ELECTRON_RELEASE" is defined.)
|
||||||
|
#
|
||||||
|
# The publishing scripts expect access tokens to be defined as env vars,
|
||||||
|
# but those are not covered here.
|
||||||
|
#
|
||||||
|
# AppVeyor docs on variables:
|
||||||
|
# https://www.appveyor.com/docs/environment-variables/
|
||||||
|
# https://www.appveyor.com/docs/build-configuration/#secure-variables
|
||||||
|
# https://www.appveyor.com/docs/build-configuration/#custom-environment-variables
|
||||||
|
|
||||||
|
version: 1.0.{build}
|
||||||
|
build_cloud: electronhq-16-core
|
||||||
|
image: e-133.0.6878.0
|
||||||
|
environment:
|
||||||
|
GIT_CACHE_PATH: C:\Users\appveyor\libcc_cache
|
||||||
|
ELECTRON_OUT_DIR: Default
|
||||||
|
ELECTRON_ENABLE_STACK_DUMPING: 1
|
||||||
|
ELECTRON_ALSO_LOG_TO_STDERR: 1
|
||||||
|
MOCHA_REPORTER: mocha-multi-reporters
|
||||||
|
MOCHA_MULTI_REPORTERS: "@marshallofsound/mocha-appveyor-reporter, mocha-junit-reporter, tap"
|
||||||
|
DEPOT_TOOLS_WIN_TOOLCHAIN: 1
|
||||||
|
DEPOT_TOOLS_WIN_TOOLCHAIN_BASE_URL: "https://dev-cdn.electronjs.org/windows-toolchains/_"
|
||||||
|
GYP_MSVS_HASH_7393122652: 3ba76c5c20
|
||||||
|
PYTHONIOENCODING: UTF-8
|
||||||
|
|
||||||
|
matrix:
|
||||||
|
|
||||||
|
- job_name: Build
|
||||||
|
- job_name: Test 1
|
||||||
|
job_depends_on: Build
|
||||||
|
shard: 1
|
||||||
|
- job_name: Test 2
|
||||||
|
job_depends_on: Build
|
||||||
|
shard: 2
|
||||||
|
|
||||||
|
clone_script:
|
||||||
|
- ps: git clone -q $("--branch=" + $Env:APPVEYOR_REPO_BRANCH) $("https://github.com/" + $Env:APPVEYOR_REPO_NAME + ".git") $Env:APPVEYOR_BUILD_FOLDER
|
||||||
|
- ps: if (!$Env:APPVEYOR_PULL_REQUEST_NUMBER) {$("git checkout -qf " + $Env:APPVEYOR_REPO_COMMIT)}
|
||||||
|
- ps: if ($Env:APPVEYOR_PULL_REQUEST_NUMBER) {git fetch -q origin +refs/pull/$($Env:APPVEYOR_PULL_REQUEST_NUMBER)/head; git checkout -qf FETCH_HEAD}
|
||||||
|
|
||||||
|
clone_folder: C:\projects\src\electron
|
||||||
|
|
||||||
|
skip_branch_with_pr: true
|
||||||
|
|
||||||
|
# the first failed job cancels other jobs and fails entire build
|
||||||
|
matrix:
|
||||||
|
fast_finish: true
|
||||||
|
|
||||||
|
for:
|
||||||
|
|
||||||
|
- matrix:
|
||||||
|
only:
|
||||||
|
- job_name: Build
|
||||||
|
|
||||||
|
build_script:
|
||||||
|
- ps: |
|
||||||
|
node script/yarn.js install --frozen-lockfile
|
||||||
|
node script/doc-only-change.js --prNumber=$env:APPVEYOR_PULL_REQUEST_NUMBER
|
||||||
|
$env:SHOULD_SKIP_ARTIFACT_VALIDATION = "false"
|
||||||
|
if ($LASTEXITCODE -eq 0) {
|
||||||
|
Write-warning "Skipping build for doc-only change"
|
||||||
|
$env:SHOULD_SKIP_ARTIFACT_VALIDATION = "true"
|
||||||
|
Exit-AppveyorBuild
|
||||||
|
} else {
|
||||||
|
$global:LASTEXITCODE = 0
|
||||||
|
}
|
||||||
|
- cd ..
|
||||||
|
- ps: Write-Host "Building $env:GN_CONFIG build"
|
||||||
|
- git config --global core.longpaths true
|
||||||
|
- ps: >-
|
||||||
|
if (Test-Path -Path "$pwd\depot_tools") {
|
||||||
|
Remove-Item -Recurse -Force $pwd\depot_tools
|
||||||
|
}
|
||||||
|
- ps: >-
|
||||||
|
if (Test-Path -Path "$pwd\build-tools") {
|
||||||
|
Remove-Item -Recurse -Force $pwd\build-tools
|
||||||
|
}
|
||||||
|
- git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||||
|
- ps: New-Item -Name depot_tools\.disable_auto_update -ItemType File
|
||||||
|
- depot_tools\bootstrap\win_tools.bat
|
||||||
|
- ps: |
|
||||||
|
Set-Content -Path $pwd\depot_tools\build_telemetry.cfg -Value '{"user": "info@electronjs.org", "status": "opt-out", "countdown": 10, "version": 1}'
|
||||||
|
- ps: $env:PATH="$pwd\depot_tools;$env:PATH"
|
||||||
|
- ps: >-
|
||||||
|
if (Test-Path -Path "$pwd\src\electron") {
|
||||||
|
Remove-Item -Recurse -Force $pwd\src\electron
|
||||||
|
}
|
||||||
|
- git clone https://github.com/electron/build-tools.git
|
||||||
|
- cd build-tools
|
||||||
|
- npx yarn --ignore-engines
|
||||||
|
- mkdir third_party
|
||||||
|
- ps: >-
|
||||||
|
node -e "require('./src/utils/reclient.js').downloadAndPrepare({})"
|
||||||
|
- ps: $env:RECLIENT_HELPER = node -p "require('./src/utils/reclient.js').helperPath({})"
|
||||||
|
- ps: >-
|
||||||
|
& $env:RECLIENT_HELPER login
|
||||||
|
- ps: >-
|
||||||
|
$env:RBE_service = node -e "console.log(require('./src/utils/reclient.js').serviceAddress)"
|
||||||
|
- ps: >-
|
||||||
|
$env:RBE_credentials_helper = $env:RECLIENT_HELPER
|
||||||
|
- ps: >-
|
||||||
|
$env:RBE_credentials_helper_args = "print"
|
||||||
|
- ps: >-
|
||||||
|
if ($env:ELECTRON_RBE_JWT -eq '') {
|
||||||
|
$env:RBE_fail_early_min_action_count = "0"
|
||||||
|
$env:RBE_fail_early_min_fallback_ratio = "0"
|
||||||
|
}
|
||||||
|
- cd ..\..
|
||||||
|
- ps: $env:CHROMIUM_BUILDTOOLS_PATH="$pwd\src\buildtools"
|
||||||
|
- ps: >-
|
||||||
|
if ($env:GN_CONFIG -ne 'release') {
|
||||||
|
$env:NINJA_STATUS="[%r processes, %f/%t @ %o/s : %es] "
|
||||||
|
}
|
||||||
|
- gclient config --name "src\electron" --unmanaged %GCLIENT_EXTRA_ARGS% "https://github.com/electron/electron"
|
||||||
|
# Patches are applied in the image bake. Check depshash to see if patches have changed.
|
||||||
|
- ps: $env:RUN_GCLIENT_SYNC="false"
|
||||||
|
- ps: $depshash_baked = Get-Content .\src\.depshash -Raw
|
||||||
|
- ps: cd src\electron
|
||||||
|
- ps: node script\generate-deps-hash.js
|
||||||
|
- ps: $depshash = Get-Content .\.depshash -Raw
|
||||||
|
- ps: cd ..\..
|
||||||
|
- ps: >-
|
||||||
|
if ($depshash_baked -ne $depshash) {
|
||||||
|
$env:RUN_GCLIENT_SYNC="true"
|
||||||
|
}
|
||||||
|
- if "%RUN_GCLIENT_SYNC%"=="true" ( gclient sync --with_branch_heads --with_tags ) else ( gclient runhooks )
|
||||||
|
- cd src
|
||||||
|
- ps: $env:PATH="$pwd\third_party\ninja;$env:PATH"
|
||||||
|
- set BUILD_CONFIG_PATH=//electron/build/args/%GN_CONFIG%.gn
|
||||||
|
- gn gen out/Default "--args=import(\"%BUILD_CONFIG_PATH%\") use_remoteexec=true %GN_EXTRA_ARGS% "
|
||||||
|
- gn check out/Default //electron:electron_lib
|
||||||
|
- gn check out/Default //electron:electron_app
|
||||||
|
- gn check out/Default //electron/shell/common:mojo
|
||||||
|
- gn check out/Default //electron/shell/common:plugin
|
||||||
|
- autoninja -j 300 -C out/Default electron:electron_app
|
||||||
|
- if "%GN_CONFIG%"=="testing" ( python C:\depot_tools\post_build_ninja_summary.py -C out\Default )
|
||||||
|
- gn gen out/ffmpeg "--args=import(\"//electron/build/args/ffmpeg.gn\") use_remoteexec=true %GN_EXTRA_ARGS%"
|
||||||
|
- autoninja -C out/ffmpeg electron:electron_ffmpeg_zip
|
||||||
|
- autoninja -C out/Default electron:electron_dist_zip
|
||||||
|
- gn desc out/Default v8:run_mksnapshot_default args > out/Default/default_mksnapshot_args
|
||||||
|
# Remove unused args from mksnapshot_args
|
||||||
|
- ps: >-
|
||||||
|
Get-Content out/Default/default_mksnapshot_args | Where-Object { -not $_.Contains('--turbo-profiling-input') -And -not $_.Contains('builtins-pgo') } | Set-Content out/Default/mksnapshot_args
|
||||||
|
- autoninja -C out/Default electron:electron_mksnapshot_zip
|
||||||
|
- cd out\Default
|
||||||
|
- 7z a mksnapshot.zip mksnapshot_args gen\v8\embedded.S
|
||||||
|
- cd ..\..
|
||||||
|
- autoninja -C out/Default electron:hunspell_dictionaries_zip
|
||||||
|
- autoninja -C out/Default electron:electron_chromedriver_zip
|
||||||
|
- autoninja -C out/Default electron:node_headers
|
||||||
|
- ps: >-
|
||||||
|
Get-CimInstance -Namespace root\cimv2 -Class Win32_product | Select vendor, description, @{l='install_location';e='InstallLocation'}, @{l='install_date';e='InstallDate'}, @{l='install_date_2';e='InstallDate2'}, caption, version, name, @{l='sku_number';e='SKUNumber'} | ConvertTo-Json | Out-File -Encoding utf8 -FilePath .\installed_software.json
|
||||||
|
- python3 electron/build/profile_toolchain.py --output-json=out/Default/windows_toolchain_profile.json
|
||||||
|
- 7z a node_headers.zip out\Default\gen\node_headers
|
||||||
|
- ps: >-
|
||||||
|
if ($env:GN_CONFIG -eq 'release') {
|
||||||
|
# Needed for msdia140.dll on 64-bit windows
|
||||||
|
$env:Path += ";$pwd\third_party\llvm-build\Release+Asserts\bin"
|
||||||
|
}
|
||||||
|
- if "%GN_CONFIG%"=="release" ( autoninja -C out/Default electron:electron_symbols )
|
||||||
|
- ps: >-
|
||||||
|
if ($env:GN_CONFIG -eq 'release') {
|
||||||
|
python3 electron\script\zip-symbols.py
|
||||||
|
appveyor-retry appveyor PushArtifact out/Default/symbols.zip
|
||||||
|
} else {
|
||||||
|
# It's useful to have pdb files when debugging testing builds that are
|
||||||
|
# built on CI.
|
||||||
|
7z a pdb.zip out\Default\*.pdb
|
||||||
|
}
|
||||||
|
- ps: |
|
||||||
|
if ($env:TARGET_ARCH -eq 'ia32') {
|
||||||
|
$env:MANIFEST_ARCH = "x86"
|
||||||
|
} else {
|
||||||
|
$env:MANIFEST_ARCH = $env:TARGET_ARCH
|
||||||
|
}
|
||||||
|
$manifest_file = "electron/script/zip_manifests/dist_zip.win.$env:MANIFEST_ARCH.manifest"
|
||||||
|
python3 electron/script/zip_manifests/check-zip-manifest.py out/Default/dist.zip $manifest_file
|
||||||
|
if ($LASTEXITCODE -ne 0) {
|
||||||
|
throw "Zip contains files not listed in the manifest $manifest_file"
|
||||||
|
}
|
||||||
|
- ps: |
|
||||||
|
cd C:\projects\src
|
||||||
|
$missing_artifacts = $false
|
||||||
|
if ($env:SHOULD_SKIP_ARTIFACT_VALIDATION -eq 'true') {
|
||||||
|
Write-warning "Skipping artifact validation for doc-only $env:APPVEYOR_PROJECT_NAME"
|
||||||
|
} else {
|
||||||
|
$artifacts_to_validate = 'dist.zip','windows_toolchain_profile.json','chromedriver.zip','ffmpeg.zip','node_headers.zip','mksnapshot.zip','electron.lib','hunspell_dictionaries.zip'
|
||||||
|
foreach($artifact_name in $artifacts_to_validate) {
|
||||||
|
if ($artifact_name -eq 'ffmpeg.zip') {
|
||||||
|
$artifact_file = "out\ffmpeg\ffmpeg.zip"
|
||||||
|
} elseif (
|
||||||
|
$artifact_name -eq 'node_headers.zip') {
|
||||||
|
$artifact_file = $artifact_name
|
||||||
|
} else {
|
||||||
|
$artifact_file = "out\Default\$artifact_name"
|
||||||
|
}
|
||||||
|
if (-not(Test-Path $artifact_file)) {
|
||||||
|
Write-warning "$artifact_name is missing and cannot be added to artifacts"
|
||||||
|
$missing_artifacts = $true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if ($missing_artifacts) {
|
||||||
|
throw "Build failed due to missing artifacts"
|
||||||
|
}
|
||||||
|
|
||||||
|
deploy_script:
|
||||||
|
- cd electron
|
||||||
|
- ps: >-
|
||||||
|
if (Test-Path Env:\ELECTRON_RELEASE) {
|
||||||
|
if (Test-Path Env:\UPLOAD_TO_STORAGE) {
|
||||||
|
Write-Output "Uploading Electron release distribution to azure"
|
||||||
|
& python3 script\release\uploaders\upload.py --verbose --upload_to_storage
|
||||||
|
} else {
|
||||||
|
Write-Output "Uploading Electron release distribution to github releases"
|
||||||
|
& python3 script\release\uploaders\upload.py --verbose
|
||||||
|
}
|
||||||
|
}
|
||||||
|
on_finish:
|
||||||
|
# Uncomment this lines to enable RDP
|
||||||
|
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||||
|
- cd C:\projects\src
|
||||||
|
- if exist out\Default\windows_toolchain_profile.json ( appveyor-retry appveyor PushArtifact out\Default\windows_toolchain_profile.json )
|
||||||
|
- if exist out\Default\dist.zip (appveyor-retry appveyor PushArtifact out\Default\dist.zip)
|
||||||
|
- if exist out\Default\chromedriver.zip (appveyor-retry appveyor PushArtifact out\Default\chromedriver.zip)
|
||||||
|
- if exist out\ffmpeg\ffmpeg.zip (appveyor-retry appveyor PushArtifact out\ffmpeg\ffmpeg.zip)
|
||||||
|
- if exist node_headers.zip (appveyor-retry appveyor PushArtifact node_headers.zip)
|
||||||
|
- if exist out\Default\mksnapshot.zip (appveyor-retry appveyor PushArtifact out\Default\mksnapshot.zip)
|
||||||
|
- if exist out\Default\hunspell_dictionaries.zip (appveyor-retry appveyor PushArtifact out\Default\hunspell_dictionaries.zip)
|
||||||
|
- if exist out\Default\electron.lib (appveyor-retry appveyor PushArtifact out\Default\electron.lib)
|
||||||
|
- ps: >-
|
||||||
|
if ((Test-Path "pdb.zip") -And ($env:GN_CONFIG -ne 'release')) {
|
||||||
|
appveyor-retry appveyor PushArtifact pdb.zip
|
||||||
|
}
|
||||||
|
- matrix:
|
||||||
|
only:
|
||||||
|
- job_name: Test 1
|
||||||
|
- job_name: Test 2
|
||||||
|
|
||||||
|
environment:
|
||||||
|
DD_ENV: ci
|
||||||
|
DD_SERVICE: electron
|
||||||
|
DD_CIVISIBILITY_LOGS_ENABLED: true
|
||||||
|
DD_GIT_REPOSITORY_URL: "https://github.com/electron/electron.git"
|
||||||
|
ELECTRON_TEST_RESULTS_DIR: C:\projects\src\electron\junit
|
||||||
|
|
||||||
|
init:
|
||||||
|
- ps: |
|
||||||
|
if ($env:RUN_TESTS -ne 'true') {
|
||||||
|
Write-warning "Skipping tests for $env:APPVEYOR_PROJECT_NAME"; Exit-AppveyorBuild
|
||||||
|
}
|
||||||
|
build_script:
|
||||||
|
- ps: |
|
||||||
|
node script/yarn.js install --frozen-lockfile
|
||||||
|
node script/doc-only-change.js --prNumber=$env:APPVEYOR_PULL_REQUEST_NUMBER
|
||||||
|
if ($LASTEXITCODE -eq 0) {
|
||||||
|
Write-warning "Skipping build for doc only change"
|
||||||
|
Exit-AppveyorBuild
|
||||||
|
} else {
|
||||||
|
$global:LASTEXITCODE = 0
|
||||||
|
}
|
||||||
|
- npm install -g @datadog/datadog-ci
|
||||||
|
- cd ..
|
||||||
|
- mkdir out\Default
|
||||||
|
- cd ..
|
||||||
|
- ps: |
|
||||||
|
# Download build artifacts
|
||||||
|
$apiUrl = 'https://ci.appveyor.com/api'
|
||||||
|
$build_info = Invoke-RestMethod -Method Get -Uri "$apiUrl/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/builds/$env:APPVEYOR_BUILD_ID"
|
||||||
|
$artifacts_to_download = @('dist.zip','chromedriver.zip','ffmpeg.zip','node_headers.zip','mksnapshot.zip','electron.lib')
|
||||||
|
foreach ($job in $build_info.build.jobs) {
|
||||||
|
if ($job.name -eq "Build") {
|
||||||
|
$jobId = $job.jobId
|
||||||
|
foreach($artifact_name in $artifacts_to_download) {
|
||||||
|
if ($artifact_name -eq 'electron.lib') {
|
||||||
|
$outfile = "src\out\Default\$artifact_name"
|
||||||
|
} else {
|
||||||
|
$outfile = $artifact_name
|
||||||
|
}
|
||||||
|
Invoke-RestMethod -Method Get -Uri "$apiUrl/buildjobs/$jobId/artifacts/$artifact_name" -OutFile $outfile
|
||||||
|
}
|
||||||
|
# Uncomment the following lines to download the pdb.zip to show real stacktraces when crashes happen during testing
|
||||||
|
Invoke-RestMethod -Method Get -Uri "$apiUrl/buildjobs/$jobId/artifacts/pdb.zip" -OutFile pdb.zip
|
||||||
|
7z x -y -osrc pdb.zip
|
||||||
|
}
|
||||||
|
}
|
||||||
|
- ps: |
|
||||||
|
$out_default_zips = @('dist.zip','chromedriver.zip','mksnapshot.zip')
|
||||||
|
foreach($zip_name in $out_default_zips) {
|
||||||
|
7z x -y -osrc\out\Default $zip_name
|
||||||
|
}
|
||||||
|
- ps: 7z x -y -osrc\out\ffmpeg ffmpeg.zip
|
||||||
|
- ps: 7z x -y -osrc node_headers.zip
|
||||||
|
|
||||||
|
test_script:
|
||||||
|
# Workaround for https://github.com/appveyor/ci/issues/2420
|
||||||
|
- set "PATH=%PATH%;C:\Program Files\Git\mingw64\libexec\git-core"
|
||||||
|
- ps: |
|
||||||
|
cd src
|
||||||
|
New-Item .\out\Default\gen\node_headers\Release -Type directory
|
||||||
|
Copy-Item -path .\out\Default\electron.lib -destination .\out\Default\gen\node_headers\Release\node.lib
|
||||||
|
- cd electron
|
||||||
|
# Explicitly set npm_config_arch because the .env doesn't persist
|
||||||
|
- ps: >-
|
||||||
|
if ($env:TARGET_ARCH -eq 'ia32') {
|
||||||
|
$env:npm_config_arch = "ia32"
|
||||||
|
}
|
||||||
|
- ps: $env:tests_files=node script\split-tests $env:shard 2
|
||||||
|
- echo "Running shard %shard% specs %tests_files%"
|
||||||
|
- echo Running main test suite & node script/yarn test -- --trace-uncaught --runners=main --enable-logging --files %tests_files%
|
||||||
|
- cd ..
|
||||||
|
- echo Verifying non proprietary ffmpeg & python electron\script\verify-ffmpeg.py --build-dir out\Default --source-root %cd% --ffmpeg-path out\ffmpeg
|
||||||
|
- echo "About to verify mksnapshot"
|
||||||
|
- echo Verifying mksnapshot & python electron\script\verify-mksnapshot.py --build-dir out\Default --source-root %cd%
|
||||||
|
- echo "Done verifying mksnapshot"
|
||||||
|
- echo Verifying chromedriver & python electron\script\verify-chromedriver.py --build-dir out\Default --source-root %cd%
|
||||||
|
- echo "Done verifying chromedriver"
|
||||||
|
|
||||||
|
on_finish:
|
||||||
|
# Uncomment these lines to enable RDP
|
||||||
|
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
|
||||||
|
- if exist electron\junit\test-results-main.xml ( appveyor-retry appveyor PushArtifact electron\junit\test-results-main.xml )
|
||||||
|
- ps: |
|
||||||
|
if ($env:RUN_TESTS -eq 'true' -And $env:DD_API_KEY) {
|
||||||
|
$env:DD_GIT_COMMIT_SHA = $env:APPVEYOR_REPO_COMMIT
|
||||||
|
$env:DD_GIT_BRANCH = $env:APPVEYOR_PULL_REQUEST_HEAD_REPO_BRANCH
|
||||||
|
$env:DD_TAGS = "os.architecture:$env:TARGET_ARCH,os.family:windows,os.platform:win32"
|
||||||
|
if (Test-Path -Path "C:\projects\src\electron\junit\test-results-main.xml") {
|
||||||
|
C:\Users\appveyor\AppData\Roaming\npm\datadog-ci.ps1 junit upload --verbose C:\projects\src\electron\junit\test-results-main.xml
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"import"
|
"unicorn"
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
"import/enforce-node-protocol-usage": ["error", "always"]
|
"unicorn/prefer-node-protocol": "error"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ is_electron_build = true
|
|||||||
root_extra_deps = [ "//electron" ]
|
root_extra_deps = [ "//electron" ]
|
||||||
|
|
||||||
# Registry of NMVs --> https://github.com/nodejs/node/blob/main/doc/abi_version_registry.json
|
# Registry of NMVs --> https://github.com/nodejs/node/blob/main/doc/abi_version_registry.json
|
||||||
node_module_version = 143
|
node_module_version = 132
|
||||||
|
|
||||||
v8_promise_internal_field_count = 1
|
v8_promise_internal_field_count = 1
|
||||||
v8_embedder_string = "-electron.0"
|
v8_embedder_string = "-electron.0"
|
||||||
@@ -14,20 +14,20 @@ v8_enable_snapshot_native_code_counters = false
|
|||||||
v8_enable_javascript_promise_hooks = true
|
v8_enable_javascript_promise_hooks = true
|
||||||
|
|
||||||
enable_cdm_host_verification = false
|
enable_cdm_host_verification = false
|
||||||
ffmpeg_branding = "Chrome"
|
|
||||||
proprietary_codecs = true
|
proprietary_codecs = true
|
||||||
|
ffmpeg_branding = "Chrome"
|
||||||
|
|
||||||
enable_printing = true
|
enable_printing = true
|
||||||
|
|
||||||
# Refs https://chromium-review.googlesource.com/c/chromium/src/+/6986517
|
|
||||||
# CI is using MacOS 15.5 which doesn't have the required modulemaps.
|
|
||||||
use_clang_modules = false
|
|
||||||
|
|
||||||
# Removes DLLs from the build, which are only meant to be used for Chromium development.
|
# Removes DLLs from the build, which are only meant to be used for Chromium development.
|
||||||
# See https://github.com/electron/electron/pull/17985
|
# See https://github.com/electron/electron/pull/17985
|
||||||
angle_enable_vulkan_validation_layers = false
|
angle_enable_vulkan_validation_layers = false
|
||||||
dawn_enable_vulkan_validation_layers = false
|
dawn_enable_vulkan_validation_layers = false
|
||||||
|
|
||||||
|
# Removes dxc dll's that are only used experimentally.
|
||||||
|
# See https://bugs.chromium.org/p/chromium/issues/detail?id=1474897
|
||||||
|
dawn_use_built_dxc = false
|
||||||
|
|
||||||
# These are disabled because they cause the zip manifest to differ between
|
# These are disabled because they cause the zip manifest to differ between
|
||||||
# testing and release builds.
|
# testing and release builds.
|
||||||
# See https://chromium-review.googlesource.com/c/chromium/src/+/2774898.
|
# See https://chromium-review.googlesource.com/c/chromium/src/+/2774898.
|
||||||
@@ -48,8 +48,7 @@ enable_cet_shadow_stack = false
|
|||||||
is_cfi = false
|
is_cfi = false
|
||||||
|
|
||||||
# TODO: fix this once sysroots have been updated.
|
# TODO: fix this once sysroots have been updated.
|
||||||
use_qt5 = false
|
use_qt = false
|
||||||
use_qt6 = false
|
|
||||||
|
|
||||||
# Disables the builtins PGO for V8
|
# Disables the builtins PGO for V8
|
||||||
v8_builtins_profiling_log_file = ""
|
v8_builtins_profiling_log_file = ""
|
||||||
@@ -66,12 +65,18 @@ v8_enable_private_mapping_fork_optimization = true
|
|||||||
# Expose public V8 symbols for native modules.
|
# Expose public V8 symbols for native modules.
|
||||||
v8_expose_public_symbols = true
|
v8_expose_public_symbols = true
|
||||||
|
|
||||||
|
# Disables unsafe-buffers-usage plugin due to incompatibilities with our reclient implementation
|
||||||
|
# Ref: https://chromium-review.googlesource.com/c/chromium/src/+/5426599
|
||||||
|
# Ref: https://github.com/electron/electron/commit/8e20f16ea35eeaeb149ae63bad3703d782665f6a
|
||||||
|
clang_unsafe_buffers_paths = ""
|
||||||
|
|
||||||
# Disable snapshotting a page when printing for its content to be analyzed for
|
# Disable snapshotting a page when printing for its content to be analyzed for
|
||||||
# sensitive content by enterprise users.
|
# sensitive content by enterprise users.
|
||||||
enterprise_cloud_content_analysis = false
|
enterprise_cloud_content_analysis = false
|
||||||
|
|
||||||
# We don't use anything from here, and it causes target collisions
|
# TODO: remove dependency on legacy ipc
|
||||||
enable_linux_installer = false
|
# https://issues.chromium.org/issues/40943039
|
||||||
|
content_enable_legacy_ipc = true
|
||||||
|
|
||||||
# Disable "Save to Drive" feature in PDF viewer
|
# Electron has its own unsafe-buffers enforcement directories.
|
||||||
enable_pdf_save_to_drive = false
|
clang_unsafe_buffers_paths = "//electron/electron_unsafe_buffers_paths.txt"
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
import("//electron/build/args/all.gn")
|
import("all.gn")
|
||||||
is_component_build = false
|
is_component_build = false
|
||||||
is_component_ffmpeg = true
|
is_component_ffmpeg = true
|
||||||
is_official_build = true
|
is_official_build = true
|
||||||
|
proprietary_codecs = false
|
||||||
ffmpeg_branding = "Chromium"
|
ffmpeg_branding = "Chromium"
|
||||||
enable_dsyms = false
|
enable_dsyms = false
|
||||||
proprietary_codecs = false
|
|
||||||
|
|||||||
@@ -1,7 +1,14 @@
|
|||||||
import("//electron/build/args/all.gn")
|
import("all.gn")
|
||||||
is_component_build = false
|
is_component_build = false
|
||||||
is_official_build = true
|
is_official_build = true
|
||||||
|
|
||||||
|
# This may be guarded behind is_chrome_branded alongside
|
||||||
|
# proprietary_codecs https://webrtc-review.googlesource.com/c/src/+/36321,
|
||||||
|
# explicitly override here to build OpenH264 encoder/FFmpeg decoder.
|
||||||
|
# The initialization of the decoder depends on whether ffmpeg has
|
||||||
|
# been built with H.264 support.
|
||||||
|
rtc_use_h264 = proprietary_codecs
|
||||||
|
|
||||||
# By default, Electron builds ffmpeg with proprietary codecs enabled. In order
|
# By default, Electron builds ffmpeg with proprietary codecs enabled. In order
|
||||||
# to facilitate users who don't want to ship proprietary codecs in ffmpeg, or
|
# to facilitate users who don't want to ship proprietary codecs in ffmpeg, or
|
||||||
# who have an LGPL requirement to ship ffmpeg as a dynamically linked library,
|
# who have an LGPL requirement to ship ffmpeg as a dynamically linked library,
|
||||||
|
|||||||
@@ -1,7 +1,14 @@
|
|||||||
import("//electron/build/args/all.gn")
|
import("all.gn")
|
||||||
is_debug = false
|
is_debug = false
|
||||||
is_component_build = false
|
is_component_build = false
|
||||||
is_component_ffmpeg = true
|
is_component_ffmpeg = true
|
||||||
is_official_build = false
|
is_official_build = false
|
||||||
dcheck_always_on = true
|
dcheck_always_on = true
|
||||||
symbol_level = 1
|
symbol_level = 1
|
||||||
|
|
||||||
|
# This may be guarded behind is_chrome_branded alongside
|
||||||
|
# proprietary_codecs https://webrtc-review.googlesource.com/c/src/+/36321,
|
||||||
|
# explicitly override here to build OpenH264 encoder/FFmpeg decoder.
|
||||||
|
# The initialization of the decoder depends on whether ffmpeg has
|
||||||
|
# been built with H.264 support.
|
||||||
|
rtc_use_h264 = proprietary_codecs
|
||||||
|
|||||||
@@ -1,37 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
|
|
||||||
import os
|
|
||||||
import sys
|
|
||||||
import hashlib
|
|
||||||
|
|
||||||
dir_path = os.path.dirname(os.path.realpath(__file__))
|
|
||||||
|
|
||||||
TEMPLATE_H = """
|
|
||||||
#ifndef ELECTRON_SNAPSHOT_CHECKSUM_H_
|
|
||||||
#define ELECTRON_SNAPSHOT_CHECKSUM_H_
|
|
||||||
|
|
||||||
namespace electron::snapshot_checksum {
|
|
||||||
|
|
||||||
inline constexpr std::string_view kChecksum = "{checksum}";
|
|
||||||
|
|
||||||
} // namespace electron::snapshot_checksum
|
|
||||||
|
|
||||||
#endif // ELECTRON_SNAPSHOT_CHECKSUM_H_
|
|
||||||
"""
|
|
||||||
|
|
||||||
def calculate_sha256(filepath):
|
|
||||||
sha256_hash = hashlib.sha256()
|
|
||||||
with open(filepath, "rb") as f:
|
|
||||||
for byte_block in iter(lambda: f.read(4096), b""):
|
|
||||||
sha256_hash.update(byte_block)
|
|
||||||
return sha256_hash.hexdigest()
|
|
||||||
|
|
||||||
input_file = sys.argv[1]
|
|
||||||
output_file = sys.argv[2]
|
|
||||||
|
|
||||||
checksum = calculate_sha256(input_file)
|
|
||||||
|
|
||||||
checksum_h = TEMPLATE_H.replace("{checksum}", checksum)
|
|
||||||
|
|
||||||
with open(output_file, 'w') as f:
|
|
||||||
f.write(checksum_h)
|
|
||||||
@@ -1,70 +0,0 @@
|
|||||||
# Copyright 2021 The Chromium Authors
|
|
||||||
# Use of this source code is governed by a BSD-style license that can be
|
|
||||||
# found in the LICENSE file.
|
|
||||||
|
|
||||||
# This has been adapted from https://source.chromium.org/chromium/chromium/src/+/main:build/linux/strip_binary.gni;drc=c220a41e0422d45f1657c28146d32e99cc53640b
|
|
||||||
# The notable difference is it has an option to compress the debug sections
|
|
||||||
|
|
||||||
import("//build/config/clang/clang.gni")
|
|
||||||
import("//build/toolchain/toolchain.gni")
|
|
||||||
|
|
||||||
# Extracts symbols from a binary into a symbol file.
|
|
||||||
#
|
|
||||||
# Args:
|
|
||||||
# binary_input: Path to the binary containing symbols to extract, e.g.:
|
|
||||||
# "$root_out_dir/chrome"
|
|
||||||
# symbol_output: Desired output file for symbols, e.g.:
|
|
||||||
# "$root_out_dir/chrome.debug"
|
|
||||||
# stripped_binary_output: Desired output file for stripped file, e.g.:
|
|
||||||
# "$root_out_dir/chrome.stripped"
|
|
||||||
# compress_debug_sections: If true, compress the extracted debug sections
|
|
||||||
template("strip_binary") {
|
|
||||||
forward_variables_from(invoker,
|
|
||||||
[
|
|
||||||
"deps",
|
|
||||||
"testonly",
|
|
||||||
])
|
|
||||||
action("${target_name}") {
|
|
||||||
llvm_strip_binary = "${clang_base_path}/bin/llvm-strip"
|
|
||||||
llvm_objcopy_binary = "${clang_base_path}/bin/llvm-objcopy"
|
|
||||||
script = "//electron/build/linux/strip_binary.py"
|
|
||||||
|
|
||||||
if (defined(invoker.stripped_binary_output)) {
|
|
||||||
stripped_binary_output = invoker.stripped_binary_output
|
|
||||||
} else {
|
|
||||||
stripped_binary_output = invoker.binary_input + ".stripped"
|
|
||||||
}
|
|
||||||
if (defined(invoker.symbol_output)) {
|
|
||||||
symbol_output = invoker.symbol_output
|
|
||||||
} else {
|
|
||||||
symbol_output = invoker.binary_input + ".debug"
|
|
||||||
}
|
|
||||||
|
|
||||||
inputs = [
|
|
||||||
invoker.binary_input,
|
|
||||||
llvm_strip_binary,
|
|
||||||
llvm_objcopy_binary,
|
|
||||||
]
|
|
||||||
outputs = [
|
|
||||||
symbol_output,
|
|
||||||
stripped_binary_output,
|
|
||||||
]
|
|
||||||
args = [
|
|
||||||
"--llvm-strip-binary-path",
|
|
||||||
rebase_path(llvm_strip_binary, root_build_dir),
|
|
||||||
"--llvm-objcopy-binary-path",
|
|
||||||
rebase_path(llvm_objcopy_binary, root_build_dir),
|
|
||||||
"--symbol-output",
|
|
||||||
rebase_path(symbol_output, root_build_dir),
|
|
||||||
"--stripped-binary-output",
|
|
||||||
rebase_path(stripped_binary_output, root_build_dir),
|
|
||||||
"--binary-input",
|
|
||||||
rebase_path(invoker.binary_input, root_build_dir),
|
|
||||||
]
|
|
||||||
|
|
||||||
if (defined(invoker.compress_debug_sections) &&
|
|
||||||
invoker.compress_debug_sections) {
|
|
||||||
args += [ "--compress-debug-sections" ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,63 +0,0 @@
|
|||||||
#!/usr/bin/env python3
|
|
||||||
#
|
|
||||||
# Copyright 2021 The Chromium Authors
|
|
||||||
# Use of this source code is governed by a BSD-style license that can be
|
|
||||||
# found in the LICENSE file.
|
|
||||||
|
|
||||||
# This has been adapted from https://source.chromium.org/chromium/chromium/src/+/main:build/linux/strip_binary.py;drc=c220a41e0422d45f1657c28146d32e99cc53640b
|
|
||||||
# The notable difference is it has an option to compress the debug sections
|
|
||||||
|
|
||||||
import argparse
|
|
||||||
import subprocess
|
|
||||||
import sys
|
|
||||||
|
|
||||||
|
|
||||||
def main() -> int:
|
|
||||||
parser = argparse.ArgumentParser(description="Strip binary using LLVM tools.")
|
|
||||||
parser.add_argument("--llvm-strip-binary-path",
|
|
||||||
help="Path to llvm-strip executable.")
|
|
||||||
parser.add_argument("--llvm-objcopy-binary-path",
|
|
||||||
required=True,
|
|
||||||
help="Path to llvm-objcopy executable.")
|
|
||||||
parser.add_argument("--binary-input", help="Input ELF binary.")
|
|
||||||
parser.add_argument("--symbol-output",
|
|
||||||
help="File to write extracted debug info (.debug).")
|
|
||||||
parser.add_argument("--compress-debug-sections",
|
|
||||||
action="store_true",
|
|
||||||
help="Compress extracted debug info.")
|
|
||||||
parser.add_argument("--stripped-binary-output",
|
|
||||||
help="File to write stripped binary.")
|
|
||||||
args = parser.parse_args()
|
|
||||||
|
|
||||||
# Replicate the behavior of:
|
|
||||||
# eu-strip <binary_input> -o <stripped_binary_output> -f <symbol_output>
|
|
||||||
|
|
||||||
objcopy_args = [
|
|
||||||
"--only-keep-debug",
|
|
||||||
args.binary_input,
|
|
||||||
args.symbol_output,
|
|
||||||
]
|
|
||||||
|
|
||||||
if args.compress_debug_sections:
|
|
||||||
objcopy_args.insert(0, "--compress-debug-sections")
|
|
||||||
|
|
||||||
subprocess.check_output([args.llvm_objcopy_binary_path] + objcopy_args)
|
|
||||||
subprocess.check_output([
|
|
||||||
args.llvm_strip_binary_path,
|
|
||||||
"--strip-debug",
|
|
||||||
"--strip-unneeded",
|
|
||||||
"-o",
|
|
||||||
args.stripped_binary_output,
|
|
||||||
args.binary_input,
|
|
||||||
])
|
|
||||||
subprocess.check_output([
|
|
||||||
args.llvm_objcopy_binary_path,
|
|
||||||
f"--add-gnu-debuglink={args.symbol_output}",
|
|
||||||
args.stripped_binary_output,
|
|
||||||
])
|
|
||||||
|
|
||||||
return 0
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == "__main__":
|
|
||||||
sys.exit(main())
|
|
||||||
@@ -45,7 +45,7 @@ def windows_profile():
|
|||||||
win_sdk_dir = SetEnvironmentAndGetSDKDir()
|
win_sdk_dir = SetEnvironmentAndGetSDKDir()
|
||||||
path = NormalizePath(os.environ['GYP_MSVS_OVERRIDE_PATH'])
|
path = NormalizePath(os.environ['GYP_MSVS_OVERRIDE_PATH'])
|
||||||
|
|
||||||
# since current windows executable are symbols path dependent,
|
# since current windows executable are symbols path dependant,
|
||||||
# profile the current directory too
|
# profile the current directory too
|
||||||
return {
|
return {
|
||||||
'pwd': os.getcwd(),
|
'pwd': os.getcwd(),
|
||||||
|
|||||||
@@ -67,6 +67,10 @@ template("mac_xib_bundle_data") {
|
|||||||
ibtool_flags = [
|
ibtool_flags = [
|
||||||
"--minimum-deployment-target",
|
"--minimum-deployment-target",
|
||||||
mac_deployment_target,
|
mac_deployment_target,
|
||||||
|
|
||||||
|
# TODO(rsesek): Enable this once all the bots are on Xcode 7+.
|
||||||
|
# "--target-device",
|
||||||
|
# "mac",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +0,0 @@
|
|||||||
# -*- bazel-starlark -*-
|
|
||||||
|
|
||||||
load("@builtin//struct.star", "module")
|
|
||||||
|
|
||||||
def __platform_properties(ctx):
|
|
||||||
container_image = "docker://gcr.io/chops-public-images-prod/rbe/siso-chromium/linux@sha256:d7cb1ab14a0f20aa669c23f22c15a9dead761dcac19f43985bf9dd5f41fbef3a"
|
|
||||||
return {
|
|
||||||
"default": {
|
|
||||||
"OSFamily": "Linux",
|
|
||||||
"container-image": container_image,
|
|
||||||
},
|
|
||||||
"large": {
|
|
||||||
"OSFamily": "Linux",
|
|
||||||
"container-image": container_image,
|
|
||||||
},
|
|
||||||
}
|
|
||||||
|
|
||||||
backend = module(
|
|
||||||
"backend",
|
|
||||||
platform_properties = __platform_properties,
|
|
||||||
)
|
|
||||||
@@ -1,66 +0,0 @@
|
|||||||
load("@builtin//encoding.star", "json")
|
|
||||||
load("@builtin//path.star", "path")
|
|
||||||
load("@builtin//runtime.star", "runtime")
|
|
||||||
load("@builtin//struct.star", "module")
|
|
||||||
load("@config//main.star", upstream_init = "init")
|
|
||||||
load("@config//win_sdk.star", "win_sdk")
|
|
||||||
load("@config//gn_logs.star", "gn_logs")
|
|
||||||
|
|
||||||
def init(ctx):
|
|
||||||
mod = upstream_init(ctx)
|
|
||||||
step_config = json.decode(mod.step_config)
|
|
||||||
|
|
||||||
# Buildbarn doesn't support input_root_absolute_path so disable that
|
|
||||||
for rule in step_config["rules"]:
|
|
||||||
input_root_absolute_path = rule.get("input_root_absolute_path", False)
|
|
||||||
if input_root_absolute_path:
|
|
||||||
rule.pop("input_root_absolute_path", None)
|
|
||||||
|
|
||||||
# Only wrap clang rules with a remote wrapper if not on Linux. These are currently only
|
|
||||||
# needed for X-Compile builds, which run on Windows and Mac.
|
|
||||||
if runtime.os != "linux":
|
|
||||||
for rule in step_config["rules"]:
|
|
||||||
if rule["name"].startswith("clang/") or rule["name"].startswith("clang-cl/"):
|
|
||||||
rule["remote_wrapper"] = "../../buildtools/reclient_cfgs/chromium-browser-clang/clang_remote_wrapper"
|
|
||||||
if "inputs" not in rule:
|
|
||||||
rule["inputs"] = []
|
|
||||||
rule["inputs"].append("buildtools/reclient_cfgs/chromium-browser-clang/clang_remote_wrapper")
|
|
||||||
rule["inputs"].append("third_party/llvm-build/Release+Asserts_linux/bin/clang")
|
|
||||||
|
|
||||||
if "executables" not in step_config:
|
|
||||||
step_config["executables"] = []
|
|
||||||
step_config["executables"].append("buildtools/reclient_cfgs/chromium-browser-clang/clang_remote_wrapper")
|
|
||||||
step_config["executables"].append("third_party/llvm-build/Release+Asserts_linux/bin/clang")
|
|
||||||
|
|
||||||
if runtime.os == "darwin":
|
|
||||||
# Update platforms to match our default siso config instead of reclient configs.
|
|
||||||
step_config["platforms"].update({
|
|
||||||
"clang": step_config["platforms"]["default"],
|
|
||||||
"clang_large": step_config["platforms"]["default"],
|
|
||||||
})
|
|
||||||
|
|
||||||
if runtime.os == "windows":
|
|
||||||
# Add additional Windows SDK headers needed by Electron
|
|
||||||
win_toolchain_dir = win_sdk.toolchain_dir(ctx)
|
|
||||||
if win_toolchain_dir:
|
|
||||||
sdk_version = gn_logs.read(ctx).get("windows_sdk_version")
|
|
||||||
step_config["input_deps"][win_toolchain_dir + ":headers"].extend([
|
|
||||||
# third_party/electron_node/deps/uv/include/uv/win.h includes mswsock.h
|
|
||||||
path.join(win_toolchain_dir, "Windows Kits/10/Include", sdk_version, "um/mswsock.h"),
|
|
||||||
# third_party/electron_node/src/debug_utils.cc includes lm.h
|
|
||||||
path.join(win_toolchain_dir, "Windows Kits/10/Include", sdk_version, "um/Lm.h"),
|
|
||||||
])
|
|
||||||
|
|
||||||
# Update platforms to match our default siso config instead of reclient configs.
|
|
||||||
step_config["platforms"].update({
|
|
||||||
"clang-cl": step_config["platforms"]["default"],
|
|
||||||
"clang-cl_large": step_config["platforms"]["default"],
|
|
||||||
"lld-link": step_config["platforms"]["default"],
|
|
||||||
})
|
|
||||||
|
|
||||||
return module(
|
|
||||||
"config",
|
|
||||||
step_config = json.encode(step_config),
|
|
||||||
filegroups = mod.filegroups,
|
|
||||||
handlers = mod.handlers,
|
|
||||||
)
|
|
||||||
@@ -121,7 +121,6 @@ if ((globalThis.process || binding.process).argv.includes("--profile-electron-in
|
|||||||
'electron/main$': electronAPIFile,
|
'electron/main$': electronAPIFile,
|
||||||
'electron/renderer$': electronAPIFile,
|
'electron/renderer$': electronAPIFile,
|
||||||
'electron/common$': electronAPIFile,
|
'electron/common$': electronAPIFile,
|
||||||
'electron/utility$': electronAPIFile,
|
|
||||||
// Force timers to resolve to our dependency that doesn't use window.postMessage
|
// Force timers to resolve to our dependency that doesn't use window.postMessage
|
||||||
timers: path.resolve(electronRoot, 'node_modules', 'timers-browserify', 'main.js')
|
timers: path.resolve(electronRoot, 'node_modules', 'timers-browserify', 'main.js')
|
||||||
},
|
},
|
||||||
@@ -144,9 +143,7 @@ if ((globalThis.process || binding.process).argv.includes("--profile-electron-in
|
|||||||
transpileOnly: onlyPrintingGraph,
|
transpileOnly: onlyPrintingGraph,
|
||||||
ignoreDiagnostics: [
|
ignoreDiagnostics: [
|
||||||
// File '{0}' is not under 'rootDir' '{1}'.
|
// File '{0}' is not under 'rootDir' '{1}'.
|
||||||
6059,
|
6059
|
||||||
// Private field '{0}' must be declared in an enclosing class.
|
|
||||||
1111
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
}]
|
}]
|
||||||
|
|||||||
12
build/zip.py
12
build/zip.py
@@ -41,8 +41,6 @@ PATHS_TO_SKIP = [
|
|||||||
'resources/inspector',
|
'resources/inspector',
|
||||||
'gen/third_party/devtools-frontend/src',
|
'gen/third_party/devtools-frontend/src',
|
||||||
'gen/ui/webui',
|
'gen/ui/webui',
|
||||||
# Skip because these get zipped separately in script/zip-symbols.py
|
|
||||||
'debug',
|
|
||||||
]
|
]
|
||||||
|
|
||||||
def skip_path(dep, dist_zip, target_cpu):
|
def skip_path(dep, dist_zip, target_cpu):
|
||||||
@@ -82,11 +80,6 @@ def main(argv):
|
|||||||
dep = dep.strip()
|
dep = dep.strip()
|
||||||
if not skip_path(dep, dist_zip, target_cpu):
|
if not skip_path(dep, dist_zip, target_cpu):
|
||||||
dist_files.add(dep)
|
dist_files.add(dep)
|
||||||
# On Linux, filter out any files which have a .stripped companion
|
|
||||||
if sys.platform == 'linux':
|
|
||||||
dist_files = {
|
|
||||||
dep for dep in dist_files if f"{dep.removeprefix('./')}.stripped" not in dist_files
|
|
||||||
}
|
|
||||||
if sys.platform == 'darwin' and not should_flatten:
|
if sys.platform == 'darwin' and not should_flatten:
|
||||||
execute(['zip', '-r', '-y', dist_zip] + list(dist_files))
|
execute(['zip', '-r', '-y', dist_zip] + list(dist_files))
|
||||||
else:
|
else:
|
||||||
@@ -103,13 +96,10 @@ def main(argv):
|
|||||||
dirname = os.path.dirname(dep)
|
dirname = os.path.dirname(dep)
|
||||||
arcname = (
|
arcname = (
|
||||||
os.path.join(dirname, 'chrome-sandbox')
|
os.path.join(dirname, 'chrome-sandbox')
|
||||||
if basename.removesuffix('.stripped') == 'chrome_sandbox'
|
if basename == 'chrome_sandbox'
|
||||||
else dep
|
else dep
|
||||||
)
|
)
|
||||||
name_to_write = arcname
|
name_to_write = arcname
|
||||||
# On Linux, strip the .stripped suffix from the name before zipping
|
|
||||||
if sys.platform == 'linux':
|
|
||||||
name_to_write = name_to_write.removesuffix('.stripped')
|
|
||||||
if should_flatten:
|
if should_flatten:
|
||||||
if flatten_relative_to:
|
if flatten_relative_to:
|
||||||
if name_to_write.startswith(flatten_relative_to):
|
if name_to_write.startswith(flatten_relative_to):
|
||||||
|
|||||||
@@ -23,8 +23,6 @@ static_library("chrome") {
|
|||||||
"//chrome/browser/browser_process.h",
|
"//chrome/browser/browser_process.h",
|
||||||
"//chrome/browser/devtools/devtools_contents_resizing_strategy.cc",
|
"//chrome/browser/devtools/devtools_contents_resizing_strategy.cc",
|
||||||
"//chrome/browser/devtools/devtools_contents_resizing_strategy.h",
|
"//chrome/browser/devtools/devtools_contents_resizing_strategy.h",
|
||||||
"//chrome/browser/devtools/devtools_dispatch_http_request_params.cc",
|
|
||||||
"//chrome/browser/devtools/devtools_dispatch_http_request_params.h",
|
|
||||||
"//chrome/browser/devtools/devtools_embedder_message_dispatcher.cc",
|
"//chrome/browser/devtools/devtools_embedder_message_dispatcher.cc",
|
||||||
"//chrome/browser/devtools/devtools_embedder_message_dispatcher.h",
|
"//chrome/browser/devtools/devtools_embedder_message_dispatcher.h",
|
||||||
"//chrome/browser/devtools/devtools_eye_dropper.cc",
|
"//chrome/browser/devtools/devtools_eye_dropper.cc",
|
||||||
@@ -36,6 +34,8 @@ static_library("chrome") {
|
|||||||
"//chrome/browser/devtools/features.h",
|
"//chrome/browser/devtools/features.h",
|
||||||
"//chrome/browser/devtools/visual_logging.cc",
|
"//chrome/browser/devtools/visual_logging.cc",
|
||||||
"//chrome/browser/devtools/visual_logging.h",
|
"//chrome/browser/devtools/visual_logging.h",
|
||||||
|
"//chrome/browser/extensions/global_shortcut_listener.cc",
|
||||||
|
"//chrome/browser/extensions/global_shortcut_listener.h",
|
||||||
"//chrome/browser/file_system_access/file_system_access_features.cc",
|
"//chrome/browser/file_system_access/file_system_access_features.cc",
|
||||||
"//chrome/browser/file_system_access/file_system_access_features.h",
|
"//chrome/browser/file_system_access/file_system_access_features.h",
|
||||||
"//chrome/browser/icon_loader.cc",
|
"//chrome/browser/icon_loader.cc",
|
||||||
@@ -68,23 +68,23 @@ static_library("chrome") {
|
|||||||
"//chrome/browser/picture_in_picture/picture_in_picture_occlusion_tracker.h",
|
"//chrome/browser/picture_in_picture/picture_in_picture_occlusion_tracker.h",
|
||||||
"//chrome/browser/picture_in_picture/picture_in_picture_occlusion_tracker_observer.cc",
|
"//chrome/browser/picture_in_picture/picture_in_picture_occlusion_tracker_observer.cc",
|
||||||
"//chrome/browser/picture_in_picture/picture_in_picture_occlusion_tracker_observer.h",
|
"//chrome/browser/picture_in_picture/picture_in_picture_occlusion_tracker_observer.h",
|
||||||
"//chrome/browser/picture_in_picture/picture_in_picture_widget_fade_animator.cc",
|
|
||||||
"//chrome/browser/picture_in_picture/picture_in_picture_widget_fade_animator.h",
|
|
||||||
"//chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc",
|
"//chrome/browser/picture_in_picture/picture_in_picture_window_manager.cc",
|
||||||
"//chrome/browser/picture_in_picture/picture_in_picture_window_manager.h",
|
"//chrome/browser/picture_in_picture/picture_in_picture_window_manager.h",
|
||||||
"//chrome/browser/picture_in_picture/picture_in_picture_window_manager_uma_helper.cc",
|
|
||||||
"//chrome/browser/picture_in_picture/picture_in_picture_window_manager_uma_helper.h",
|
|
||||||
"//chrome/browser/picture_in_picture/scoped_picture_in_picture_occlusion_observation.cc",
|
"//chrome/browser/picture_in_picture/scoped_picture_in_picture_occlusion_observation.cc",
|
||||||
"//chrome/browser/picture_in_picture/scoped_picture_in_picture_occlusion_observation.h",
|
"//chrome/browser/picture_in_picture/scoped_picture_in_picture_occlusion_observation.h",
|
||||||
"//chrome/browser/platform_util.cc",
|
"//chrome/browser/platform_util.cc",
|
||||||
"//chrome/browser/platform_util.h",
|
"//chrome/browser/platform_util.h",
|
||||||
|
"//chrome/browser/predictors/preconnect_manager.cc",
|
||||||
|
"//chrome/browser/predictors/preconnect_manager.h",
|
||||||
"//chrome/browser/predictors/predictors_features.cc",
|
"//chrome/browser/predictors/predictors_features.cc",
|
||||||
"//chrome/browser/predictors/predictors_features.h",
|
"//chrome/browser/predictors/predictors_features.h",
|
||||||
|
"//chrome/browser/predictors/proxy_lookup_client_impl.cc",
|
||||||
|
"//chrome/browser/predictors/proxy_lookup_client_impl.h",
|
||||||
|
"//chrome/browser/predictors/resolve_host_client_impl.cc",
|
||||||
|
"//chrome/browser/predictors/resolve_host_client_impl.h",
|
||||||
"//chrome/browser/process_singleton.h",
|
"//chrome/browser/process_singleton.h",
|
||||||
"//chrome/browser/process_singleton_internal.cc",
|
"//chrome/browser/process_singleton_internal.cc",
|
||||||
"//chrome/browser/process_singleton_internal.h",
|
"//chrome/browser/process_singleton_internal.h",
|
||||||
"//chrome/browser/serial/serial_blocklist.cc",
|
|
||||||
"//chrome/browser/serial/serial_blocklist.h",
|
|
||||||
"//chrome/browser/themes/browser_theme_pack.cc",
|
"//chrome/browser/themes/browser_theme_pack.cc",
|
||||||
"//chrome/browser/themes/browser_theme_pack.h",
|
"//chrome/browser/themes/browser_theme_pack.h",
|
||||||
"//chrome/browser/themes/custom_theme_supplier.cc",
|
"//chrome/browser/themes/custom_theme_supplier.cc",
|
||||||
@@ -126,12 +126,8 @@ static_library("chrome") {
|
|||||||
"//chrome/browser/ui/views/overlay/hang_up_button.h",
|
"//chrome/browser/ui/views/overlay/hang_up_button.h",
|
||||||
"//chrome/browser/ui/views/overlay/minimize_button.cc",
|
"//chrome/browser/ui/views/overlay/minimize_button.cc",
|
||||||
"//chrome/browser/ui/views/overlay/minimize_button.h",
|
"//chrome/browser/ui/views/overlay/minimize_button.h",
|
||||||
"//chrome/browser/ui/views/overlay/overlay_controls_fade_animation.cc",
|
|
||||||
"//chrome/browser/ui/views/overlay/overlay_controls_fade_animation.h",
|
|
||||||
"//chrome/browser/ui/views/overlay/overlay_window_image_button.cc",
|
"//chrome/browser/ui/views/overlay/overlay_window_image_button.cc",
|
||||||
"//chrome/browser/ui/views/overlay/overlay_window_image_button.h",
|
"//chrome/browser/ui/views/overlay/overlay_window_image_button.h",
|
||||||
"//chrome/browser/ui/views/overlay/overlay_window_live_caption_button.cc",
|
|
||||||
"//chrome/browser/ui/views/overlay/overlay_window_live_caption_button.h",
|
|
||||||
"//chrome/browser/ui/views/overlay/playback_image_button.cc",
|
"//chrome/browser/ui/views/overlay/playback_image_button.cc",
|
||||||
"//chrome/browser/ui/views/overlay/playback_image_button.h",
|
"//chrome/browser/ui/views/overlay/playback_image_button.h",
|
||||||
"//chrome/browser/ui/views/overlay/resize_handle_button.cc",
|
"//chrome/browser/ui/views/overlay/resize_handle_button.cc",
|
||||||
@@ -146,18 +142,10 @@ static_library("chrome") {
|
|||||||
"//chrome/browser/ui/views/overlay/toggle_microphone_button.h",
|
"//chrome/browser/ui/views/overlay/toggle_microphone_button.h",
|
||||||
"//chrome/browser/ui/views/overlay/video_overlay_window_views.cc",
|
"//chrome/browser/ui/views/overlay/video_overlay_window_views.cc",
|
||||||
"//chrome/browser/ui/views/overlay/video_overlay_window_views.h",
|
"//chrome/browser/ui/views/overlay/video_overlay_window_views.h",
|
||||||
"//chrome/browser/ui/views/picture_in_picture/picture_in_picture_bounds_change_animation.cc",
|
|
||||||
"//chrome/browser/ui/views/picture_in_picture/picture_in_picture_bounds_change_animation.h",
|
|
||||||
"//chrome/browser/ui/views/picture_in_picture/picture_in_picture_tucker.cc",
|
|
||||||
"//chrome/browser/ui/views/picture_in_picture/picture_in_picture_tucker.h",
|
|
||||||
"//chrome/browser/ui/webui/accessibility/accessibility_ui.cc",
|
"//chrome/browser/ui/webui/accessibility/accessibility_ui.cc",
|
||||||
"//chrome/browser/ui/webui/accessibility/accessibility_ui.h",
|
"//chrome/browser/ui/webui/accessibility/accessibility_ui.h",
|
||||||
"//chrome/browser/usb/usb_blocklist.cc",
|
|
||||||
"//chrome/browser/usb/usb_blocklist.h",
|
|
||||||
"//extensions/browser/app_window/size_constraints.cc",
|
"//extensions/browser/app_window/size_constraints.cc",
|
||||||
"//extensions/browser/app_window/size_constraints.h",
|
"//extensions/browser/app_window/size_constraints.h",
|
||||||
"//ui/base/accelerators/global_accelerator_listener/global_accelerator_listener.cc",
|
|
||||||
"//ui/base/accelerators/global_accelerator_listener/global_accelerator_listener.h",
|
|
||||||
"//ui/views/native_window_tracker.h",
|
"//ui/views/native_window_tracker.h",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -167,6 +155,8 @@ static_library("chrome") {
|
|||||||
|
|
||||||
if (is_win) {
|
if (is_win) {
|
||||||
sources += [
|
sources += [
|
||||||
|
"//chrome/browser/extensions/global_shortcut_listener_win.cc",
|
||||||
|
"//chrome/browser/extensions/global_shortcut_listener_win.h",
|
||||||
"//chrome/browser/icon_loader_win.cc",
|
"//chrome/browser/icon_loader_win.cc",
|
||||||
"//chrome/browser/media/webrtc/window_icon_util_win.cc",
|
"//chrome/browser/media/webrtc/window_icon_util_win.cc",
|
||||||
"//chrome/browser/process_singleton_win.cc",
|
"//chrome/browser/process_singleton_win.cc",
|
||||||
@@ -188,6 +178,7 @@ static_library("chrome") {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public_deps = [
|
public_deps = [
|
||||||
|
"//chrome/browser:dev_ui_browser_resources",
|
||||||
"//chrome/browser/resources/accessibility:resources",
|
"//chrome/browser/resources/accessibility:resources",
|
||||||
"//chrome/browser/ui/color:color_headers",
|
"//chrome/browser/ui/color:color_headers",
|
||||||
"//chrome/browser/ui/color:mixers",
|
"//chrome/browser/ui/color:mixers",
|
||||||
@@ -209,12 +200,10 @@ static_library("chrome") {
|
|||||||
"//chrome/browser/ui/webui/tab_search:mojo_bindings",
|
"//chrome/browser/ui/webui/tab_search:mojo_bindings",
|
||||||
"//chrome/browser/web_applications/mojom:mojom_web_apps_enum",
|
"//chrome/browser/web_applications/mojom:mojom_web_apps_enum",
|
||||||
"//components/enterprise/buildflags",
|
"//components/enterprise/buildflags",
|
||||||
"//components/enterprise/common/proto:browser_events_proto",
|
|
||||||
"//components/enterprise/common/proto:connectors_proto",
|
"//components/enterprise/common/proto:connectors_proto",
|
||||||
"//components/enterprise/obfuscation/core:enterprise_obfuscation",
|
"//components/enterprise/obfuscation/core:enterprise_obfuscation",
|
||||||
"//components/safe_browsing/core/browser/db:safebrowsing_proto",
|
"//components/safe_browsing/core/browser/db:safebrowsing_proto",
|
||||||
"//components/vector_icons",
|
"//components/vector_icons:vector_icons",
|
||||||
"//ui/base/accelerators/global_accelerator_listener",
|
|
||||||
"//ui/snapshot",
|
"//ui/snapshot",
|
||||||
"//ui/views/controls/webview",
|
"//ui/views/controls/webview",
|
||||||
]
|
]
|
||||||
@@ -223,18 +212,25 @@ static_library("chrome") {
|
|||||||
sources += [
|
sources += [
|
||||||
"//chrome/browser/platform_util_aura.cc",
|
"//chrome/browser/platform_util_aura.cc",
|
||||||
"//chrome/browser/ui/views/eye_dropper/eye_dropper_aura.cc",
|
"//chrome/browser/ui/views/eye_dropper/eye_dropper_aura.cc",
|
||||||
"//ui/native_window_tracker/native_window_tracker_aura.cc",
|
"//ui/views/native_window_tracker_aura.cc",
|
||||||
"//ui/native_window_tracker/native_window_tracker_aura.h",
|
"//ui/views/native_window_tracker_aura.h",
|
||||||
]
|
]
|
||||||
deps += [ "//components/eye_dropper" ]
|
deps += [ "//components/eye_dropper" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_linux) {
|
if (is_linux) {
|
||||||
sources += [
|
sources += [
|
||||||
|
"//chrome/browser/extensions/global_shortcut_listener_linux.cc",
|
||||||
|
"//chrome/browser/extensions/global_shortcut_listener_linux.h",
|
||||||
"//chrome/browser/icon_loader_auralinux.cc",
|
"//chrome/browser/icon_loader_auralinux.cc",
|
||||||
"//ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_linux.cc",
|
|
||||||
"//ui/base/accelerators/global_accelerator_listener/global_accelerator_listener_linux.h",
|
|
||||||
]
|
]
|
||||||
|
if (use_ozone) {
|
||||||
|
deps += [ "//ui/ozone" ]
|
||||||
|
sources += [
|
||||||
|
"//chrome/browser/extensions/global_shortcut_listener_ozone.cc",
|
||||||
|
"//chrome/browser/extensions/global_shortcut_listener_ozone.h",
|
||||||
|
]
|
||||||
|
}
|
||||||
sources += [
|
sources += [
|
||||||
"//chrome/browser/ui/views/status_icons/concat_menu_model.cc",
|
"//chrome/browser/ui/views/status_icons/concat_menu_model.cc",
|
||||||
"//chrome/browser/ui/views/status_icons/concat_menu_model.h",
|
"//chrome/browser/ui/views/status_icons/concat_menu_model.h",
|
||||||
@@ -267,6 +263,8 @@ static_library("chrome") {
|
|||||||
|
|
||||||
if (is_mac) {
|
if (is_mac) {
|
||||||
sources += [
|
sources += [
|
||||||
|
"//chrome/browser/extensions/global_shortcut_listener_mac.h",
|
||||||
|
"//chrome/browser/extensions/global_shortcut_listener_mac.mm",
|
||||||
"//chrome/browser/icon_loader_mac.mm",
|
"//chrome/browser/icon_loader_mac.mm",
|
||||||
"//chrome/browser/media/webrtc/system_media_capture_permissions_mac.h",
|
"//chrome/browser/media/webrtc/system_media_capture_permissions_mac.h",
|
||||||
"//chrome/browser/media/webrtc/system_media_capture_permissions_mac.mm",
|
"//chrome/browser/media/webrtc/system_media_capture_permissions_mac.mm",
|
||||||
@@ -280,8 +278,6 @@ static_library("chrome") {
|
|||||||
"//chrome/browser/process_singleton_mac.mm",
|
"//chrome/browser/process_singleton_mac.mm",
|
||||||
"//chrome/browser/ui/views/eye_dropper/eye_dropper_view_mac.h",
|
"//chrome/browser/ui/views/eye_dropper/eye_dropper_view_mac.h",
|
||||||
"//chrome/browser/ui/views/eye_dropper/eye_dropper_view_mac.mm",
|
"//chrome/browser/ui/views/eye_dropper/eye_dropper_view_mac.mm",
|
||||||
"//chrome/browser/ui/views/overlay/video_overlay_window_native_widget_mac.h",
|
|
||||||
"//chrome/browser/ui/views/overlay/video_overlay_window_native_widget_mac.mm",
|
|
||||||
]
|
]
|
||||||
deps += [ ":system_media_capture_permissions_mac_conflict" ]
|
deps += [ ":system_media_capture_permissions_mac_conflict" ]
|
||||||
}
|
}
|
||||||
@@ -383,8 +379,6 @@ static_library("chrome") {
|
|||||||
"//chrome/browser/pdf/chrome_pdf_stream_delegate.h",
|
"//chrome/browser/pdf/chrome_pdf_stream_delegate.h",
|
||||||
"//chrome/browser/pdf/pdf_extension_util.cc",
|
"//chrome/browser/pdf/pdf_extension_util.cc",
|
||||||
"//chrome/browser/pdf/pdf_extension_util.h",
|
"//chrome/browser/pdf/pdf_extension_util.h",
|
||||||
"//chrome/browser/pdf/pdf_help_bubble_handler_factory.cc",
|
|
||||||
"//chrome/browser/pdf/pdf_help_bubble_handler_factory.h",
|
|
||||||
"//chrome/browser/pdf/pdf_viewer_stream_manager.cc",
|
"//chrome/browser/pdf/pdf_viewer_stream_manager.cc",
|
||||||
"//chrome/browser/pdf/pdf_viewer_stream_manager.h",
|
"//chrome/browser/pdf/pdf_viewer_stream_manager.h",
|
||||||
"//chrome/browser/plugins/pdf_iframe_navigation_throttle.cc",
|
"//chrome/browser/plugins/pdf_iframe_navigation_throttle.cc",
|
||||||
@@ -393,8 +387,6 @@ static_library("chrome") {
|
|||||||
deps += [
|
deps += [
|
||||||
"//components/pdf/browser",
|
"//components/pdf/browser",
|
||||||
"//components/pdf/renderer",
|
"//components/pdf/renderer",
|
||||||
"//ui/base/interaction",
|
|
||||||
"//ui/webui/resources/cr_components/help_bubble:mojo_bindings",
|
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@@ -508,17 +500,15 @@ source_set("chrome_spellchecker") {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_mac) {
|
# These sources create an object file conflict with one in |:chrome|, so they
|
||||||
# These sources create an object file conflict with one in |:chrome|, so they
|
# must live in a separate target.
|
||||||
# must live in a separate target.
|
# Conflicting sources:
|
||||||
# Conflicting sources:
|
# //chrome/browser/media/webrtc/system_media_capture_permissions_stats_mac.mm
|
||||||
# //chrome/browser/media/webrtc/system_media_capture_permissions_stats_mac.mm
|
# //chrome/browser/permissions/system/system_media_capture_permissions_mac.mm
|
||||||
# //chrome/browser/permissions/system/system_media_capture_permissions_mac.mm
|
source_set("system_media_capture_permissions_mac_conflict") {
|
||||||
source_set("system_media_capture_permissions_mac_conflict") {
|
sources = [
|
||||||
sources = [
|
"//chrome/browser/permissions/system/system_media_capture_permissions_mac.h",
|
||||||
"//chrome/browser/permissions/system/system_media_capture_permissions_mac.h",
|
"//chrome/browser/permissions/system/system_media_capture_permissions_mac.mm",
|
||||||
"//chrome/browser/permissions/system/system_media_capture_permissions_mac.mm",
|
]
|
||||||
]
|
deps = [ "//chrome/common" ]
|
||||||
deps = [ "//chrome/common" ]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
{
|
{
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"import"
|
"unicorn"
|
||||||
],
|
],
|
||||||
"rules": {
|
"rules": {
|
||||||
"import/enforce-node-protocol-usage": ["error", "always"]
|
"unicorn/prefer-node-protocol": "error"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -34,25 +34,18 @@ async function loadSVG (element: HTMLSpanElement) {
|
|||||||
|
|
||||||
async function initialize () {
|
async function initialize () {
|
||||||
const electronPath = await ipcRenderer.invoke('bootstrap');
|
const electronPath = await ipcRenderer.invoke('bootstrap');
|
||||||
function replaceText (selector: string, text: string, link?: string) {
|
|
||||||
|
function replaceText (selector: string, text: string) {
|
||||||
const element = document.querySelector<HTMLElement>(selector);
|
const element = document.querySelector<HTMLElement>(selector);
|
||||||
if (element) {
|
if (element) {
|
||||||
if (link) {
|
element.innerText = text;
|
||||||
const anchor = document.createElement('a');
|
|
||||||
anchor.textContent = text;
|
|
||||||
anchor.href = link;
|
|
||||||
anchor.target = '_blank';
|
|
||||||
element.appendChild(anchor);
|
|
||||||
} else {
|
|
||||||
element.innerText = text;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
replaceText('.electron-version', `Electron v${process.versions.electron}`, 'https://electronjs.org/docs');
|
replaceText('.electron-version', `Electron v${process.versions.electron}`);
|
||||||
replaceText('.chrome-version', `Chromium v${process.versions.chrome}`, 'https://developer.chrome.com/docs/chromium');
|
replaceText('.chrome-version', `Chromium v${process.versions.chrome}`);
|
||||||
replaceText('.node-version', `Node v${process.versions.node}`, `https://nodejs.org/docs/v${process.versions.node}/api`);
|
replaceText('.node-version', `Node v${process.versions.node}`);
|
||||||
replaceText('.v8-version', `v8 v${process.versions.v8}`, 'https://v8.dev/docs');
|
replaceText('.v8-version', `v8 v${process.versions.v8}`);
|
||||||
replaceText('.command-example', `${electronPath} path-to-app`);
|
replaceText('.command-example', `${electronPath} path-to-app`);
|
||||||
|
|
||||||
for (const element of document.querySelectorAll<HTMLSpanElement>('.octicon')) {
|
for (const element of document.querySelectorAll<HTMLSpanElement>('.octicon')) {
|
||||||
|
|||||||
@@ -1,35 +0,0 @@
|
|||||||
{
|
|
||||||
"extends": "standard",
|
|
||||||
"plugins": [
|
|
||||||
"import",
|
|
||||||
"markdown"
|
|
||||||
],
|
|
||||||
"overrides": [
|
|
||||||
{
|
|
||||||
"files": ["*.md", "**/*.md"],
|
|
||||||
"processor": "markdown/markdown"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"rules": {
|
|
||||||
"@typescript-eslint/no-unused-vars": "off",
|
|
||||||
"import/order": ["error", {
|
|
||||||
"alphabetize": {
|
|
||||||
"order": "asc"
|
|
||||||
},
|
|
||||||
"newlines-between": "always",
|
|
||||||
"pathGroups": [
|
|
||||||
{
|
|
||||||
"pattern": "{electron,electron/**}",
|
|
||||||
"group": "builtin",
|
|
||||||
"position": "before"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"pathGroupsExcludedImportTypes": []
|
|
||||||
}],
|
|
||||||
"n/no-callback-literal": "off",
|
|
||||||
"no-undef": "off",
|
|
||||||
"no-unused-expressions": "off",
|
|
||||||
"no-unused-vars": "off",
|
|
||||||
"import/enforce-node-protocol-usage": ["error", "always"]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -21,6 +21,7 @@ an issue:
|
|||||||
### Getting started
|
### Getting started
|
||||||
|
|
||||||
* [Introduction](tutorial/introduction.md)
|
* [Introduction](tutorial/introduction.md)
|
||||||
|
* [Quick Start](tutorial/quick-start.md)
|
||||||
* [Process Model](tutorial/process-model.md)
|
* [Process Model](tutorial/process-model.md)
|
||||||
|
|
||||||
### Learning the basics
|
### Learning the basics
|
||||||
@@ -96,9 +97,8 @@ These individual tutorials expand on topics discussed in the guide above.
|
|||||||
* [Chrome Extensions Support](api/extensions.md)
|
* [Chrome Extensions Support](api/extensions.md)
|
||||||
* [Breaking API Changes](breaking-changes.md)
|
* [Breaking API Changes](breaking-changes.md)
|
||||||
|
|
||||||
### Custom Web Features:
|
### Custom DOM Elements:
|
||||||
|
|
||||||
* [`-electron-corner-smoothing` CSS Rule](api/corner-smoothing-css.md)
|
|
||||||
* [`<webview>` Tag](api/webview-tag.md)
|
* [`<webview>` Tag](api/webview-tag.md)
|
||||||
* [`window.open` Function](api/window-open.md)
|
* [`window.open` Function](api/window-open.md)
|
||||||
|
|
||||||
@@ -113,7 +113,6 @@ These individual tutorials expand on topics discussed in the guide above.
|
|||||||
* [dialog](api/dialog.md)
|
* [dialog](api/dialog.md)
|
||||||
* [globalShortcut](api/global-shortcut.md)
|
* [globalShortcut](api/global-shortcut.md)
|
||||||
* [inAppPurchase](api/in-app-purchase.md)
|
* [inAppPurchase](api/in-app-purchase.md)
|
||||||
* [ImageView](api/image-view.md)
|
|
||||||
* [ipcMain](api/ipc-main.md)
|
* [ipcMain](api/ipc-main.md)
|
||||||
* [Menu](api/menu.md)
|
* [Menu](api/menu.md)
|
||||||
* [MenuItem](api/menu-item.md)
|
* [MenuItem](api/menu-item.md)
|
||||||
|
|||||||
82
docs/api/accelerator.md
Normal file
82
docs/api/accelerator.md
Normal file
@@ -0,0 +1,82 @@
|
|||||||
|
# Accelerator
|
||||||
|
|
||||||
|
> Define keyboard shortcuts.
|
||||||
|
|
||||||
|
Accelerators are strings that can contain multiple modifiers and a single key code,
|
||||||
|
combined by the `+` character, and are used to define keyboard shortcuts
|
||||||
|
throughout your application. Accelerators are case insensitive.
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
|
||||||
|
* `CommandOrControl+A`
|
||||||
|
* `CommandOrControl+Shift+Z`
|
||||||
|
|
||||||
|
Shortcuts are registered with the [`globalShortcut`](global-shortcut.md) module
|
||||||
|
using the [`register`](global-shortcut.md#globalshortcutregisteraccelerator-callback)
|
||||||
|
method, i.e.
|
||||||
|
|
||||||
|
```js
|
||||||
|
const { app, globalShortcut } = require('electron')
|
||||||
|
|
||||||
|
app.whenReady().then(() => {
|
||||||
|
// Register a 'CommandOrControl+Y' shortcut listener.
|
||||||
|
globalShortcut.register('CommandOrControl+Y', () => {
|
||||||
|
// Do stuff when Y and either Command/Control is pressed.
|
||||||
|
})
|
||||||
|
})
|
||||||
|
```
|
||||||
|
|
||||||
|
## Platform notice
|
||||||
|
|
||||||
|
On Linux and Windows, the `Command` key does not have any effect so
|
||||||
|
use `CommandOrControl` which represents `Command` on macOS and `Control` on
|
||||||
|
Linux and Windows to define some accelerators.
|
||||||
|
|
||||||
|
Use `Alt` instead of `Option`. The `Option` key only exists on macOS, whereas
|
||||||
|
the `Alt` key is available on all platforms.
|
||||||
|
|
||||||
|
The `Super` (or `Meta`) key is mapped to the `Windows` key on Windows and Linux and
|
||||||
|
`Cmd` on macOS.
|
||||||
|
|
||||||
|
## Available modifiers
|
||||||
|
|
||||||
|
* `Command` (or `Cmd` for short)
|
||||||
|
* `Control` (or `Ctrl` for short)
|
||||||
|
* `CommandOrControl` (or `CmdOrCtrl` for short)
|
||||||
|
* `Alt`
|
||||||
|
* `Option`
|
||||||
|
* `AltGr`
|
||||||
|
* `Shift`
|
||||||
|
* `Super`
|
||||||
|
* `Meta`
|
||||||
|
|
||||||
|
## Available key codes
|
||||||
|
|
||||||
|
* `0` to `9`
|
||||||
|
* `A` to `Z`
|
||||||
|
* `F1` to `F24`
|
||||||
|
* Various Punctuation: `)`, `!`, `@`, `#`, `$`, `%`, `^`, `&`, `*`, `(`, `:`, `;`, `:`, `+`, `=`, `<`, `,`, `_`, `-`, `>`, `.`, `?`, `/`, `~`, `` ` ``, `{`, `]`, `[`, `|`, `\`, `}`, `"`
|
||||||
|
* `Plus`
|
||||||
|
* `Space`
|
||||||
|
* `Tab`
|
||||||
|
* `Capslock`
|
||||||
|
* `Numlock`
|
||||||
|
* `Scrolllock`
|
||||||
|
* `Backspace`
|
||||||
|
* `Delete`
|
||||||
|
* `Insert`
|
||||||
|
* `Return` (or `Enter` as alias)
|
||||||
|
* `Up`, `Down`, `Left` and `Right`
|
||||||
|
* `Home` and `End`
|
||||||
|
* `PageUp` and `PageDown`
|
||||||
|
* `Escape` (or `Esc` for short)
|
||||||
|
* `VolumeUp`, `VolumeDown` and `VolumeMute`
|
||||||
|
* `MediaNextTrack`, `MediaPreviousTrack`, `MediaStop` and `MediaPlayPause`
|
||||||
|
* `PrintScreen`
|
||||||
|
* NumPad Keys
|
||||||
|
* `num0` - `num9`
|
||||||
|
* `numdec` - decimal key
|
||||||
|
* `numadd` - numpad `+` key
|
||||||
|
* `numsub` - numpad `-` key
|
||||||
|
* `nummult` - numpad `*` key
|
||||||
|
* `numdiv` - numpad `÷` key
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user