mirror of
https://github.com/electron/electron.git
synced 2026-02-26 03:01:17 -05:00
Compare commits
47 Commits
roller/nod
...
windows-ru
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
129bcbfdb2 | ||
|
|
1262b2a126 | ||
|
|
55c150c39b | ||
|
|
e082304e3c | ||
|
|
349d25b04d | ||
|
|
dc1dc699de | ||
|
|
9d4e5ee4e7 | ||
|
|
a843c9f951 | ||
|
|
c37acb7562 | ||
|
|
5e43a7e53a | ||
|
|
fcb6dc81d8 | ||
|
|
a5ee213d8e | ||
|
|
29d1dadf8e | ||
|
|
7ab4a36ccb | ||
|
|
2a7e9b45a6 | ||
|
|
a7103a4042 | ||
|
|
c415741405 | ||
|
|
cda341b080 | ||
|
|
da411de1c8 | ||
|
|
38bdb32040 | ||
|
|
f40456a426 | ||
|
|
868b800fe9 | ||
|
|
247182e952 | ||
|
|
2e090ceb6a | ||
|
|
a42d0a6fb2 | ||
|
|
2abbc4b28c | ||
|
|
9075e2b20d | ||
|
|
d2fca2bbf7 | ||
|
|
960541743b | ||
|
|
ca071c17e6 | ||
|
|
3c85204883 | ||
|
|
6db7a0f0af | ||
|
|
f7ac1bf039 | ||
|
|
51497a9452 | ||
|
|
e5b62f4c97 | ||
|
|
395526f45a | ||
|
|
872d80cfc2 | ||
|
|
6859b2d5ea | ||
|
|
288441ec9e | ||
|
|
3addfb1943 | ||
|
|
5c40f3595f | ||
|
|
cd5eb75260 | ||
|
|
a1799f33cb | ||
|
|
ed0cc27f81 | ||
|
|
96c7e69c73 | ||
|
|
5f0b657f86 | ||
|
|
f86111130b |
2
.gitattributes
vendored
2
.gitattributes
vendored
@@ -1,6 +1,8 @@
|
|||||||
# `git apply` and friends don't understand CRLF, even on windows. Force those
|
# `git apply` and friends don't understand CRLF, even on windows. Force those
|
||||||
# files to be checked out with LF endings even if core.autocrlf is true.
|
# files to be checked out with LF endings even if core.autocrlf is true.
|
||||||
*.patch text eol=lf
|
*.patch text eol=lf
|
||||||
|
DEPS text eol=lf
|
||||||
|
yarn.lock text eol=lf
|
||||||
patches/**/.patches merge=union
|
patches/**/.patches merge=union
|
||||||
|
|
||||||
# Source code and markdown files should always use LF as line ending.
|
# Source code and markdown files should always use LF as line ending.
|
||||||
|
|||||||
22
.github/actions/build-electron/action.yml
vendored
22
.github/actions/build-electron/action.yml
vendored
@@ -8,7 +8,7 @@ inputs:
|
|||||||
description: 'Target platform'
|
description: 'Target platform'
|
||||||
required: true
|
required: true
|
||||||
artifact-platform:
|
artifact-platform:
|
||||||
description: 'Artifact platform, should be linux, darwin or mas'
|
description: 'Artifact platform, should be linux, windows, darwin or mas'
|
||||||
required: true
|
required: true
|
||||||
step-suffix:
|
step-suffix:
|
||||||
description: 'Suffix for build steps'
|
description: 'Suffix for build steps'
|
||||||
@@ -71,18 +71,22 @@ runs:
|
|||||||
cd src
|
cd src
|
||||||
e build --target electron:electron_dist_zip -j $NUMBER_OF_NINJA_PROCESSES
|
e build --target electron:electron_dist_zip -j $NUMBER_OF_NINJA_PROCESSES
|
||||||
if [ "${{ inputs.is-asan }}" != "true" ]; then
|
if [ "${{ inputs.is-asan }}" != "true" ]; then
|
||||||
target_os=${{ inputs.target-platform == 'linux' && 'linux' || 'mac'}}
|
target_os=${{ inputs.target-platform == 'linux' && 'linux' || (inputs.target-platform == 'windows' && 'win' || 'mac') }}
|
||||||
if [ "${{ inputs.artifact-platform }}" = "mas" ]; then
|
if [ "${{ inputs.artifact-platform }}" = "mas" ]; then
|
||||||
target_os="${target_os}_mas"
|
target_os="${target_os}_mas"
|
||||||
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
|
target_arch=${{ inputs.target-arch }}
|
||||||
|
if [ "${{ inputs.target-arch }}" = "x86" ]; then
|
||||||
|
target_arch="ia32"
|
||||||
|
fi
|
||||||
|
electron/script/zip_manifests/check-zip-manifest.py out/Default/dist.zip electron/script/zip_manifests/dist_zip.$target_os.$target_arch.manifest
|
||||||
fi
|
fi
|
||||||
- name: Build 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
|
e build --target electron:electron_mksnapshot -j $NUMBER_OF_NINJA_PROCESSES
|
||||||
gn desc out/Default v8:run_mksnapshot_default args > out/Default/mksnapshot_args
|
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"
|
||||||
if [ "`uname`" = "Darwin" ]; then
|
if [ "`uname`" = "Darwin" ]; then
|
||||||
@@ -91,7 +95,7 @@ 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 [ "`uname`" = "Linux" ]; then
|
if [ "${{ inputs.target-platform }}" = "linux" ]; then
|
||||||
if [ "${{ inputs.target-arch }}" = "arm" ]; 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/mksnapshot
|
||||||
electron/script/strip-binaries.py --file $PWD/out/Default/clang_x86_v8_arm/v8_context_snapshot_generator
|
electron/script/strip-binaries.py --file $PWD/out/Default/clang_x86_v8_arm/v8_context_snapshot_generator
|
||||||
@@ -105,7 +109,13 @@ runs:
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
e build --target electron:electron_mksnapshot_zip -j $NUMBER_OF_NINJA_PROCESSES
|
e build --target electron:electron_mksnapshot_zip -j $NUMBER_OF_NINJA_PROCESSES
|
||||||
(cd out/Default; zip mksnapshot.zip mksnapshot_args gen/v8/embedded.S)
|
if [ "${{ inputs.target-platform }}" = "windows" ]; then
|
||||||
|
cd out/Default
|
||||||
|
powershell Compress-Archive -update mksnapshot_args mksnapshot.zip
|
||||||
|
powershell Compress-Archive -update gen/v8/embedded.S mksnapshot.zip
|
||||||
|
else
|
||||||
|
(cd out/Default; zip mksnapshot.zip mksnapshot_args gen/v8/embedded.S)
|
||||||
|
fi
|
||||||
- name: Generate Cross-Arch Snapshot (arm/arm64) ${{ inputs.step-suffix }}
|
- name: Generate Cross-Arch Snapshot (arm/arm64) ${{ inputs.step-suffix }}
|
||||||
shell: bash
|
shell: bash
|
||||||
if: ${{ (inputs.target-arch == 'arm' || inputs.target-arch == 'arm64') && inputs.target-platform == 'linux' }}
|
if: ${{ (inputs.target-arch == 'arm' || inputs.target-arch == 'arm64') && inputs.target-platform == 'linux' }}
|
||||||
|
|||||||
66
.github/actions/checkout/action.yml
vendored
66
.github/actions/checkout/action.yml
vendored
@@ -5,6 +5,10 @@ inputs:
|
|||||||
description: 'Whether to generate and persist a SAS token for the item in the cache'
|
description: 'Whether to generate and persist a SAS token for the item in the cache'
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
default: 'false'
|
||||||
|
use-cache:
|
||||||
|
description: 'Whether to persist the cache to the shared drive'
|
||||||
|
required: false
|
||||||
|
default: 'true'
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
steps:
|
steps:
|
||||||
@@ -17,27 +21,31 @@ runs:
|
|||||||
run: |
|
run: |
|
||||||
cd src/electron
|
cd src/electron
|
||||||
node script/yarn install --frozen-lockfile
|
node script/yarn install --frozen-lockfile
|
||||||
|
- name: Install Build Tools
|
||||||
|
uses: ./src/electron/.github/actions/install-build-tools
|
||||||
- name: Get Depot Tools
|
- name: Get Depot Tools
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
if [[ ! -d depot_tools ]]; then
|
||||||
|
git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
|
||||||
|
|
||||||
sed -i '/ninjalog_uploader_wrapper.py/d' ./depot_tools/autoninja
|
sed -i '/ninjalog_uploader_wrapper.py/d' ./depot_tools/autoninja
|
||||||
# Remove swift-format dep from cipd on macOS until we send a patch upstream.
|
# Remove swift-format dep from cipd on macOS until we send a patch upstream.
|
||||||
cd depot_tools
|
cd depot_tools
|
||||||
git apply --3way ../src/electron/.github/workflows/config/gclient.diff
|
git apply --3way ../src/electron/.github/workflows/config/gclient.diff
|
||||||
|
|
||||||
# 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
|
||||||
touch .disable_auto_update
|
touch .disable_auto_update
|
||||||
|
fi
|
||||||
- name: Add Depot Tools to PATH
|
- name: Add Depot Tools to PATH
|
||||||
shell: bash
|
shell: bash
|
||||||
run: echo "$(pwd)/depot_tools" >> $GITHUB_PATH
|
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 && cat src/electron/.depshash-target
|
node src/electron/script/generate-deps-hash.js && cat src/electron/.depshash && cat src/electron/.depshash-target
|
||||||
echo "DEPSHASH=v1-src-cache-$(shasum src/electron/.depshash | cut -f1 -d' ')" >> $GITHUB_ENV
|
echo "DEPSHASH=v1-src-cache-$(sha1sum src/electron/.depshash | cut -f1 -d' ')" >> $GITHUB_ENV
|
||||||
- name: Generate SAS Key
|
- name: Generate SAS Key
|
||||||
if: ${{ inputs.generate-sas-token == 'true' }}
|
if: ${{ inputs.generate-sas-token == 'true' }}
|
||||||
shell: bash
|
shell: bash
|
||||||
@@ -54,27 +62,36 @@ runs:
|
|||||||
id: check-cache
|
id: check-cache
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cache_path=/mnt/cross-instance-cache/$DEPSHASH.tar
|
if [[ "${{ inputs.use-cache }}" == "false" ]]; then
|
||||||
echo "Using cache key: $DEPSHASH"
|
echo "Not using cache this time..."
|
||||||
echo "Checking for cache in: $cache_path"
|
|
||||||
if [ ! -f "$cache_path" ]; then
|
|
||||||
echo "cache_exists=false" >> $GITHUB_OUTPUT
|
echo "cache_exists=false" >> $GITHUB_OUTPUT
|
||||||
echo "Cache Does Not Exist for $DEPSHASH"
|
|
||||||
else
|
else
|
||||||
echo "cache_exists=true" >> $GITHUB_OUTPUT
|
cache_path=/mnt/cross-instance-cache/$DEPSHASH.tar
|
||||||
echo "Cache Already Exists for $DEPSHASH, Skipping.."
|
echo "Using cache key: $DEPSHASH"
|
||||||
|
echo "Checking for cache in: $cache_path"
|
||||||
|
if [ ! -f "$cache_path" ]; then
|
||||||
|
echo "cache_exists=false" >> $GITHUB_OUTPUT
|
||||||
|
echo "Cache Does Not Exist for $DEPSHASH"
|
||||||
|
else
|
||||||
|
echo "cache_exists=true" >> $GITHUB_OUTPUT
|
||||||
|
echo "Cache Already Exists for $DEPSHASH, Skipping.."
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
- 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
|
||||||
run: |
|
run: |
|
||||||
gclient config \
|
e d gclient config \
|
||||||
--name "src/electron" \
|
--name "src/electron" \
|
||||||
--unmanaged \
|
--unmanaged \
|
||||||
${GCLIENT_EXTRA_ARGS} \
|
${GCLIENT_EXTRA_ARGS} \
|
||||||
"$GITHUB_SERVER_URL/$GITHUB_REPOSITORY"
|
"$GITHUB_SERVER_URL/$GITHUB_REPOSITORY"
|
||||||
|
|
||||||
ELECTRON_USE_THREE_WAY_MERGE_FOR_PATCHES=1 gclient sync --with_branch_heads --with_tags -vvvvv
|
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 -vv
|
||||||
if [ "${{ inputs.is-release }}" != "true" && -n "${{ env.PATCH_UP_APP_CREDS }}" ]; 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
|
||||||
@@ -115,13 +132,13 @@ runs:
|
|||||||
# https://dawn-review.googlesource.com/c/dawn/+/83901
|
# https://dawn-review.googlesource.com/c/dawn/+/83901
|
||||||
# TODO: maybe better to always leave out */.git/HEAD file for all targets ?
|
# TODO: maybe better to always leave out */.git/HEAD file for all targets ?
|
||||||
- name: Delete .git directories under src to free space
|
- name: Delete .git directories under src to free space
|
||||||
if: steps.check-cache.outputs.cache_exists == 'false'
|
if: ${{ steps.check-cache.outputs.cache_exists == 'false' && inputs.use-cache == 'true' }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
cd src
|
cd src
|
||||||
( find . -type d -name ".git" -not -path "./third_party/angle/*" -not -path "./third_party/dawn/*" -not -path "./electron/*" ) | xargs rm -rf
|
( find . -type d -name ".git" -not -path "./third_party/angle/*" -not -path "./third_party/dawn/*" -not -path "./electron/*" ) | xargs rm -rf
|
||||||
- name: Minimize Cache Size for Upload
|
- name: Minimize Cache Size for Upload
|
||||||
if: steps.check-cache.outputs.cache_exists == 'false'
|
if: ${{ steps.check-cache.outputs.cache_exists == 'false' && inputs.use-cache == 'true' }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
rm -rf src/android_webview
|
rm -rf src/android_webview
|
||||||
@@ -132,9 +149,12 @@ runs:
|
|||||||
rm -rf src/third_party/angle/third_party/VK-GL-CTS/src
|
rm -rf src/third_party/angle/third_party/VK-GL-CTS/src
|
||||||
rm -rf src/third_party/swift-toolchain
|
rm -rf src/third_party/swift-toolchain
|
||||||
rm -rf src/third_party/swiftshader/tests/regres/testlists
|
rm -rf src/third_party/swiftshader/tests/regres/testlists
|
||||||
|
cp src/electron/.github/actions/checkout/action.yml ./
|
||||||
rm -rf src/electron
|
rm -rf src/electron
|
||||||
|
mkdir -p src/electron/.github/actions/checkout
|
||||||
|
mv action.yml src/electron/.github/actions/checkout
|
||||||
- name: Compress Src Directory
|
- name: Compress Src Directory
|
||||||
if: steps.check-cache.outputs.cache_exists == 'false'
|
if: ${{ steps.check-cache.outputs.cache_exists == 'false' && inputs.use-cache == 'true' }}
|
||||||
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' ')"
|
||||||
@@ -142,7 +162,7 @@ runs:
|
|||||||
echo "Compressed src to $(du -sh $DEPSHASH.tar | cut -f1 -d' ')"
|
echo "Compressed src to $(du -sh $DEPSHASH.tar | cut -f1 -d' ')"
|
||||||
cp ./$DEPSHASH.tar /mnt/cross-instance-cache/
|
cp ./$DEPSHASH.tar /mnt/cross-instance-cache/
|
||||||
- name: Persist Src Cache
|
- name: Persist Src Cache
|
||||||
if: steps.check-cache.outputs.cache_exists == 'false'
|
if: ${{ steps.check-cache.outputs.cache_exists == 'false' && inputs.use-cache == 'true' }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
final_cache_path=/mnt/cross-instance-cache/$DEPSHASH.tar
|
final_cache_path=/mnt/cross-instance-cache/$DEPSHASH.tar
|
||||||
|
|||||||
@@ -6,6 +6,15 @@ runs:
|
|||||||
- name: Install Build Tools
|
- name: Install Build Tools
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
if [ "$(expr substr $(uname -s) 1 10)" == "MSYS_NT-10" ]; then
|
||||||
|
git config --global core.filemode false
|
||||||
|
git config --global core.autocrlf false
|
||||||
|
git config --global branch.autosetuprebase always
|
||||||
|
fi
|
||||||
export BUILD_TOOLS_SHA=33dc5186556bfbf7b0121a00cdd89ed3802e47da
|
export BUILD_TOOLS_SHA=33dc5186556bfbf7b0121a00cdd89ed3802e47da
|
||||||
npm i -g @electron/build-tools
|
npm i -g @electron/build-tools
|
||||||
e auto-update disable
|
e auto-update disable
|
||||||
|
if [ "$(expr substr $(uname -s) 1 10)" == "MSYS_NT-10" ]; then
|
||||||
|
e d cipd.bat --version
|
||||||
|
cp "C:\Python37\python.exe" "C:\Python37\python3.exe"
|
||||||
|
fi
|
||||||
|
|||||||
120
.github/workflows/build.yml
vendored
120
.github/workflows/build.yml
vendored
@@ -11,24 +11,33 @@ on:
|
|||||||
skip-macos:
|
skip-macos:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: 'Skip macOS builds'
|
description: 'Skip macOS builds'
|
||||||
default: false
|
default: true
|
||||||
required: false
|
required: false
|
||||||
skip-linux:
|
skip-linux:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: 'Skip Linux builds'
|
description: 'Skip Linux builds'
|
||||||
|
default: true
|
||||||
|
required: false
|
||||||
|
skip-windows:
|
||||||
|
type: boolean
|
||||||
|
description: 'Skip Windows builds'
|
||||||
default: false
|
default: false
|
||||||
required: false
|
required: false
|
||||||
skip-lint:
|
skip-lint:
|
||||||
type: boolean
|
type: boolean
|
||||||
description: 'Skip lint check'
|
description: 'Skip lint check'
|
||||||
default: false
|
default: true
|
||||||
required: false
|
required: false
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
- '[1-9][0-9]-x-y'
|
- '[1-9][0-9]-x-y'
|
||||||
pull_request:
|
pull_request:
|
||||||
|
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
setup:
|
setup:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -127,13 +136,106 @@ jobs:
|
|||||||
- name: Checkout & Sync & Save
|
- name: Checkout & Sync & Save
|
||||||
uses: ./src/electron/.github/actions/checkout
|
uses: ./src/electron/.github/actions/checkout
|
||||||
|
|
||||||
|
checkout-windows:
|
||||||
|
needs: setup
|
||||||
|
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-windows }}
|
||||||
|
runs-on: electron-arc-linux-amd64-32core
|
||||||
|
container:
|
||||||
|
image: ghcr.io/electron/build:${{ needs.setup.outputs.build-image-sha }}
|
||||||
|
options: --user root --device /dev/fuse --cap-add SYS_ADMIN
|
||||||
|
volumes:
|
||||||
|
- /mnt/cross-instance-cache:/mnt/cross-instance-cache
|
||||||
|
env:
|
||||||
|
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_win=True'
|
||||||
|
TARGET_OS: 'win'
|
||||||
|
ELECTRON_DEPOT_TOOLS_WIN_TOOLCHAIN: '1'
|
||||||
|
steps:
|
||||||
|
- name: Checkout Electron
|
||||||
|
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
|
||||||
|
with:
|
||||||
|
path: src/electron
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Checkout & Sync & Save
|
||||||
|
uses: ./src/electron/.github/actions/checkout
|
||||||
|
|
||||||
|
windows-x64:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
issues: read
|
||||||
|
pull-requests: read
|
||||||
|
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
||||||
|
needs: setup
|
||||||
|
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-windows }}
|
||||||
|
with:
|
||||||
|
build-runs-on: electron-arc-windows-amd64-32core
|
||||||
|
test-runs-on: windows-latest
|
||||||
|
target-platform: windows
|
||||||
|
target-arch: x64
|
||||||
|
is-release: false
|
||||||
|
gn-build-type: testing
|
||||||
|
generate-symbols: false
|
||||||
|
upload-to-storage: '0'
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
windows-x86:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
issues: read
|
||||||
|
pull-requests: read
|
||||||
|
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
||||||
|
needs: setup
|
||||||
|
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-windows }}
|
||||||
|
with:
|
||||||
|
build-runs-on: electron-arc-windows-amd64-32core
|
||||||
|
test-runs-on: windows-latest
|
||||||
|
target-platform: windows
|
||||||
|
target-arch: x86
|
||||||
|
is-release: false
|
||||||
|
gn-build-type: testing
|
||||||
|
generate-symbols: false
|
||||||
|
upload-to-storage: '0'
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
windows-arm64:
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
issues: read
|
||||||
|
pull-requests: read
|
||||||
|
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
|
||||||
|
needs: setup
|
||||||
|
if: ${{ needs.setup.outputs.src == 'true' && !inputs.skip-windows }}
|
||||||
|
with:
|
||||||
|
build-runs-on: electron-arc-windows-amd64-32core
|
||||||
|
test-runs-on: electron-hosted-windows-arm64-4core
|
||||||
|
target-platform: windows
|
||||||
|
target-arch: arm64
|
||||||
|
is-release: false
|
||||||
|
gn-build-type: testing
|
||||||
|
generate-symbols: false
|
||||||
|
upload-to-storage: '0'
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
|
windows-gn-check:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
arch: [x64, x86, arm64]
|
||||||
|
uses: ./.github/workflows/pipeline-segment-electron-gn-check.yml
|
||||||
|
needs: checkout-windows
|
||||||
|
with:
|
||||||
|
target-platform: windows
|
||||||
|
target-arch: ${{ matrix.arch }}
|
||||||
|
check-runs-on: electron-arc-linux-amd64-8core
|
||||||
|
check-container: '{"image":"ghcr.io/electron/build:${{ inputs.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
|
||||||
|
secrets: inherit
|
||||||
|
|
||||||
# Build Jobs - These cascade into testing jobs
|
# Build Jobs - These cascade into testing jobs
|
||||||
macos-x64:
|
macos-x64:
|
||||||
permissions:
|
permissions:
|
||||||
contents: read
|
contents: read
|
||||||
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-and-check.yml
|
||||||
needs: checkout-macos
|
needs: checkout-macos
|
||||||
with:
|
with:
|
||||||
build-runs-on: macos-14-xlarge
|
build-runs-on: macos-14-xlarge
|
||||||
@@ -152,7 +254,7 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
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-and-check.yml
|
||||||
needs: checkout-macos
|
needs: checkout-macos
|
||||||
with:
|
with:
|
||||||
build-runs-on: macos-14-xlarge
|
build-runs-on: macos-14-xlarge
|
||||||
@@ -171,7 +273,7 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
issues: read
|
issues: read
|
||||||
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-check-and-nan.yml
|
||||||
needs: checkout-linux
|
needs: checkout-linux
|
||||||
with:
|
with:
|
||||||
build-runs-on: electron-arc-linux-amd64-32core
|
build-runs-on: electron-arc-linux-amd64-32core
|
||||||
@@ -192,7 +294,7 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
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-and-check.yml
|
||||||
needs: checkout-linux
|
needs: checkout-linux
|
||||||
with:
|
with:
|
||||||
build-runs-on: electron-arc-linux-amd64-32core
|
build-runs-on: electron-arc-linux-amd64-32core
|
||||||
@@ -214,7 +316,7 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
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-and-check.yml
|
||||||
needs: checkout-linux
|
needs: checkout-linux
|
||||||
with:
|
with:
|
||||||
build-runs-on: electron-arc-linux-amd64-32core
|
build-runs-on: electron-arc-linux-amd64-32core
|
||||||
@@ -235,7 +337,7 @@ jobs:
|
|||||||
contents: read
|
contents: read
|
||||||
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-and-check.yml
|
||||||
needs: checkout-linux
|
needs: checkout-linux
|
||||||
with:
|
with:
|
||||||
build-runs-on: electron-arc-linux-amd64-32core
|
build-runs-on: electron-arc-linux-amd64-32core
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ on:
|
|||||||
inputs:
|
inputs:
|
||||||
target-platform:
|
target-platform:
|
||||||
type: string
|
type: string
|
||||||
description: 'Platform to run on, can be macos or linux'
|
description: 'Platform to run on, can be macos, windows or linux.'
|
||||||
required: true
|
required: true
|
||||||
target-arch:
|
target-arch:
|
||||||
type: string
|
type: string
|
||||||
104
.github/workflows/pipeline-electron-build-and-test-and-check.yml
vendored
Normal file
104
.github/workflows/pipeline-electron-build-and-test-and-check.yml
vendored
Normal file
@@ -0,0 +1,104 @@
|
|||||||
|
name: Electron Build & Test Pipeline
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
target-platform:
|
||||||
|
type: string
|
||||||
|
description: 'Platform to run on, can be macos, windows or linux'
|
||||||
|
required: true
|
||||||
|
target-arch:
|
||||||
|
type: string
|
||||||
|
description: 'Arch to build for, can be x64, arm64 or arm'
|
||||||
|
required: true
|
||||||
|
build-runs-on:
|
||||||
|
type: string
|
||||||
|
description: 'What host to run the build'
|
||||||
|
required: true
|
||||||
|
check-runs-on:
|
||||||
|
type: string
|
||||||
|
description: 'What host to run the gn-check'
|
||||||
|
required: true
|
||||||
|
test-runs-on:
|
||||||
|
type: string
|
||||||
|
description: 'What host to run the tests on'
|
||||||
|
required: true
|
||||||
|
build-container:
|
||||||
|
type: string
|
||||||
|
description: 'JSON container information for aks runs-on'
|
||||||
|
required: false
|
||||||
|
default: '{"image":null}'
|
||||||
|
test-container:
|
||||||
|
type: string
|
||||||
|
description: 'JSON container information for testing'
|
||||||
|
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
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: electron-build-and-test-${{ inputs.target-platform }}-${{ inputs.target-arch }}-${{ github.ref }}
|
||||||
|
cancel-in-progress: ${{ github.ref != 'refs/heads/main' && !endsWith(github.ref, '-x-y') }}
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
issues: read
|
||||||
|
pull-requests: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
uses: ./.github/workflows/pipeline-segment-electron-build.yml
|
||||||
|
with:
|
||||||
|
build-runs-on: ${{ inputs.build-runs-on }}
|
||||||
|
build-container: ${{ inputs.build-container }}
|
||||||
|
target-platform: ${{ inputs.target-platform }}
|
||||||
|
target-arch: ${{ inputs.target-arch }}
|
||||||
|
is-release: ${{ inputs.is-release }}
|
||||||
|
gn-build-type: ${{ inputs.gn-build-type }}
|
||||||
|
generate-symbols: ${{ inputs.generate-symbols }}
|
||||||
|
upload-to-storage: ${{ inputs.upload-to-storage }}
|
||||||
|
is-asan: ${{ inputs.is-asan}}
|
||||||
|
secrets: inherit
|
||||||
|
gn-check:
|
||||||
|
uses: ./.github/workflows/pipeline-segment-electron-gn-check.yml
|
||||||
|
with:
|
||||||
|
target-platform: ${{ inputs.target-platform }}
|
||||||
|
target-arch: ${{ inputs.target-arch }}
|
||||||
|
check-runs-on: ${{ inputs.check-runs-on }}
|
||||||
|
check-container: ${{ inputs.build-container }}
|
||||||
|
gn-build-type: ${{ inputs.gn-build-type }}
|
||||||
|
is-asan: ${{ inputs.is-asan }}
|
||||||
|
secrets: inherit
|
||||||
|
test:
|
||||||
|
uses: ./.github/workflows/pipeline-segment-electron-test.yml
|
||||||
|
needs: build
|
||||||
|
with:
|
||||||
|
target-arch: ${{ inputs.target-arch }}
|
||||||
|
target-platform: ${{ inputs.target-platform }}
|
||||||
|
test-runs-on: ${{ inputs.test-runs-on }}
|
||||||
|
test-container: ${{ inputs.test-container }}
|
||||||
|
is-asan: ${{ inputs.is-asan}}
|
||||||
|
secrets: inherit
|
||||||
@@ -5,7 +5,7 @@ on:
|
|||||||
inputs:
|
inputs:
|
||||||
target-platform:
|
target-platform:
|
||||||
type: string
|
type: string
|
||||||
description: 'Platform to run on, can be macos or linux'
|
description: 'Platform to run on, can be macos, windows or linux'
|
||||||
required: true
|
required: true
|
||||||
target-arch:
|
target-arch:
|
||||||
type: string
|
type: string
|
||||||
@@ -15,10 +15,6 @@ on:
|
|||||||
type: string
|
type: string
|
||||||
description: 'What host to run the build'
|
description: 'What host to run the build'
|
||||||
required: true
|
required: true
|
||||||
check-runs-on:
|
|
||||||
type: string
|
|
||||||
description: 'What host to run the gn-check'
|
|
||||||
required: true
|
|
||||||
test-runs-on:
|
test-runs-on:
|
||||||
type: string
|
type: string
|
||||||
description: 'What host to run the tests on'
|
description: 'What host to run the tests on'
|
||||||
@@ -82,16 +78,6 @@ jobs:
|
|||||||
upload-to-storage: ${{ inputs.upload-to-storage }}
|
upload-to-storage: ${{ inputs.upload-to-storage }}
|
||||||
is-asan: ${{ inputs.is-asan}}
|
is-asan: ${{ inputs.is-asan}}
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
gn-check:
|
|
||||||
uses: ./.github/workflows/pipeline-segment-electron-gn-check.yml
|
|
||||||
with:
|
|
||||||
target-platform: ${{ inputs.target-platform }}
|
|
||||||
target-arch: ${{ inputs.target-arch }}
|
|
||||||
check-runs-on: ${{ inputs.check-runs-on }}
|
|
||||||
check-container: ${{ inputs.build-container }}
|
|
||||||
gn-build-type: ${{ inputs.gn-build-type }}
|
|
||||||
is-asan: ${{ inputs.is-asan }}
|
|
||||||
secrets: inherit
|
|
||||||
test:
|
test:
|
||||||
uses: ./.github/workflows/pipeline-segment-electron-test.yml
|
uses: ./.github/workflows/pipeline-segment-electron-test.yml
|
||||||
needs: build
|
needs: build
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ on:
|
|||||||
type: string
|
type: string
|
||||||
target-platform:
|
target-platform:
|
||||||
type: string
|
type: string
|
||||||
description: 'Platform to run on, can be macos or linux'
|
description: 'Platform to run on, can be macos, windows or linux'
|
||||||
required: true
|
required: true
|
||||||
target-arch:
|
target-arch:
|
||||||
type: string
|
type: string
|
||||||
@@ -69,11 +69,14 @@ env:
|
|||||||
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' || '--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 == 'windows' && '--custom-var=checkout_win=True' || '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' }}
|
||||||
ELECTRON_OUT_DIR: Default
|
ELECTRON_OUT_DIR: Default
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
runs-on: ${{ inputs.build-runs-on }}
|
runs-on: ${{ inputs.build-runs-on }}
|
||||||
container: ${{ fromJSON(inputs.build-container) }}
|
container: ${{ fromJSON(inputs.build-container) }}
|
||||||
environment: ${{ inputs.environment }}
|
environment: ${{ inputs.environment }}
|
||||||
@@ -81,7 +84,8 @@ jobs:
|
|||||||
TARGET_ARCH: ${{ inputs.target-arch }}
|
TARGET_ARCH: ${{ inputs.target-arch }}
|
||||||
steps:
|
steps:
|
||||||
- name: Create src dir
|
- name: Create src dir
|
||||||
run: mkdir src
|
run: |
|
||||||
|
mkdir src
|
||||||
- name: Checkout Electron
|
- name: Checkout Electron
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
|
||||||
with:
|
with:
|
||||||
@@ -145,8 +149,8 @@ jobs:
|
|||||||
run: echo "$(pwd)/depot_tools" >> $GITHUB_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 && cat src/electron/.depshash-target
|
node src/electron/script/generate-deps-hash.js && cat src/electron/.depshash && cat src/electron/.depshash-target
|
||||||
DEPSHASH=v1-src-cache-$(shasum src/electron/.depshash | cut -f1 -d' ')
|
DEPSHASH=v1-src-cache-$(sha1sum src/electron/.depshash | cut -f1 -d' ')
|
||||||
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
|
||||||
@@ -155,6 +159,11 @@ jobs:
|
|||||||
- 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 the whole damm thing
|
||||||
|
if: ${{ inputs.target-platform == 'windows' }}
|
||||||
|
uses: ./src/electron/.github/actions/checkout
|
||||||
|
with:
|
||||||
|
use-cache: 'false'
|
||||||
- name: Checkout Electron
|
- name: Checkout Electron
|
||||||
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332
|
||||||
with:
|
with:
|
||||||
@@ -167,11 +176,11 @@ jobs:
|
|||||||
e init -f --root=$(pwd) --out=Default ${{ inputs.gn-build-type }} --import ${{ inputs.gn-build-type }} --target-cpu ${{ inputs.target-arch }} --only-sdk
|
e init -f --root=$(pwd) --out=Default ${{ inputs.gn-build-type }} --import ${{ inputs.gn-build-type }} --target-cpu ${{ inputs.target-arch }} --only-sdk
|
||||||
- name: Run Electron Only Hooks
|
- name: Run Electron Only Hooks
|
||||||
run: |
|
run: |
|
||||||
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}]"
|
||||||
- name: Regenerate DEPS Hash
|
- name: Regenerate DEPS Hash
|
||||||
run: |
|
run: |
|
||||||
(cd src/electron && git checkout .) && node src/electron/script/generate-deps-hash.js && cat src/electron/.depshash-target
|
(cd src/electron && git checkout .) && node src/electron/script/generate-deps-hash.js && cat src/electron/.depshash && cat src/electron/.depshash-target
|
||||||
echo "DEPSHASH=$(shasum src/electron/.depshash | cut -f1 -d' ')" >> $GITHUB_ENV
|
echo "DEPSHASH=$(sha1sum src/electron/.depshash | cut -f1 -d' ')" >> $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)
|
- name: Fix Sync (macOS)
|
||||||
@@ -179,8 +188,8 @@ jobs:
|
|||||||
uses: ./src/electron/.github/actions/fix-sync-macos
|
uses: ./src/electron/.github/actions/fix-sync-macos
|
||||||
- name: Install build-tools & Setup RBE
|
- name: Install build-tools & Setup RBE
|
||||||
run: |
|
run: |
|
||||||
echo "NUMBER_OF_NINJA_PROCESSES=${{ inputs.target-platform == 'linux' && '300' || '200' }}" >> $GITHUB_ENV
|
echo "NUMBER_OF_NINJA_PROCESSES=${{ inputs.target-platform != 'macos' && '300' || '200' }}" >> $GITHUB_ENV
|
||||||
cd ~/.electron_build_tools
|
cd $(cygpath -u "$(e show depotdir)")/../..
|
||||||
npx yarn --ignore-engines
|
npx yarn --ignore-engines
|
||||||
# Pull down credential helper and print status
|
# Pull down credential helper and print status
|
||||||
node -e "require('./src/utils/reclient.js').downloadAndPrepare({})"
|
node -e "require('./src/utils/reclient.js').downloadAndPrepare({})"
|
||||||
@@ -198,7 +207,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
target-arch: ${{ inputs.target-arch }}
|
target-arch: ${{ inputs.target-arch }}
|
||||||
target-platform: ${{ inputs.target-platform }}
|
target-platform: ${{ inputs.target-platform }}
|
||||||
artifact-platform: ${{ inputs.target-platform == 'linux' && 'linux' || 'darwin' }}
|
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 }}'
|
strip-binaries: '${{ inputs.strip-binaries }}'
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ on:
|
|||||||
inputs:
|
inputs:
|
||||||
target-platform:
|
target-platform:
|
||||||
type: string
|
type: string
|
||||||
description: 'Platform to run on, can be macos or linux'
|
description: 'Platform to run on, can be macos, windows or linux'
|
||||||
required: true
|
required: true
|
||||||
target-arch:
|
target-arch:
|
||||||
type: string
|
type: string
|
||||||
@@ -37,12 +37,15 @@ concurrency:
|
|||||||
|
|
||||||
env:
|
env:
|
||||||
ELECTRON_RBE_JWT: ${{ secrets.ELECTRON_RBE_JWT }}
|
ELECTRON_RBE_JWT: ${{ secrets.ELECTRON_RBE_JWT }}
|
||||||
GCLIENT_EXTRA_ARGS: ${{ inputs.target-platform == 'macos' && '--custom-var=checkout_mac=True --custom-var=host_os=mac' || '--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 == 'linux' && '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' || '--custom-var=checkout_win=True') }}
|
||||||
ELECTRON_OUT_DIR: Default
|
ELECTRON_OUT_DIR: Default
|
||||||
TARGET_ARCH: ${{ inputs.target-arch }}
|
TARGET_ARCH: ${{ inputs.target-arch }}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
gn-check:
|
gn-check:
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
# TODO(codebytere): Change this to medium VM
|
# TODO(codebytere): Change this to medium VM
|
||||||
runs-on: ${{ inputs.check-runs-on }}
|
runs-on: ${{ inputs.check-runs-on }}
|
||||||
container: ${{ fromJSON(inputs.check-container) }}
|
container: ${{ fromJSON(inputs.check-container) }}
|
||||||
@@ -106,25 +109,45 @@ jobs:
|
|||||||
GN_EXTRA_ARGS='fatal_linker_warnings=false enable_linux_installer=false'
|
GN_EXTRA_ARGS='fatal_linker_warnings=false enable_linux_installer=false'
|
||||||
fi
|
fi
|
||||||
echo "GN_EXTRA_ARGS=$GN_EXTRA_ARGS" >> $GITHUB_ENV
|
echo "GN_EXTRA_ARGS=$GN_EXTRA_ARGS" >> $GITHUB_ENV
|
||||||
|
- name: Set GN_EXTRA_ARGS for Win/cross
|
||||||
|
if: ${{ inputs.target-platform == 'windows' }}
|
||||||
|
run: |
|
||||||
|
GN_APPENDED_ARGS="$GN_EXTRA_ARGS use_v8_context_snapshot=true target_os=\"win\""
|
||||||
|
echo "GN_EXTRA_ARGS=$GN_APPENDED_ARGS" >> $GITHUB_ENV
|
||||||
|
- name: Enable windows toolchain
|
||||||
|
if: ${{ inputs.target-platform == 'windows' }}
|
||||||
|
run: |
|
||||||
|
echo "ELECTRON_DEPOT_TOOLS_WIN_TOOLCHAIN=1" >> $GITHUB_ENV
|
||||||
- name: Generate DEPS Hash
|
- name: Generate DEPS Hash
|
||||||
run: |
|
run: |
|
||||||
node src/electron/script/generate-deps-hash.js && cat src/electron/.depshash-target
|
node src/electron/script/generate-deps-hash.js && cat src/electron/.depshash && cat src/electron/.depshash-target
|
||||||
DEPSHASH=v1-src-cache-$(shasum src/electron/.depshash | cut -f1 -d' ')
|
DEPSHASH=v1-src-cache-$(sha1sum src/electron/.depshash | cut -f1 -d' ')
|
||||||
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 == 'macos' }}
|
if: ${{ inputs.target-platform == 'macos' }}
|
||||||
uses: ./src/electron/.github/actions/restore-cache-azcopy
|
uses: ./src/electron/.github/actions/restore-cache-azcopy
|
||||||
- name: Restore src cache via AKS
|
- name: Restore src cache via AKS
|
||||||
if: ${{ inputs.target-platform == 'linux' }}
|
if: ${{ inputs.target-platform == 'linux' || inputs.target-platform == 'windows' }}
|
||||||
uses: ./src/electron/.github/actions/restore-cache-aks
|
uses: ./src/electron/.github/actions/restore-cache-aks
|
||||||
- name: Run Electron Only Hooks
|
- name: Run Electron Only Hooks
|
||||||
run: |
|
run: |
|
||||||
gclient runhooks --spec="solutions=[{'name':'src/electron','url':None,'deps_file':'DEPS','custom_vars':{'process_deps':False},'managed':False}]"
|
echo "solutions=[{'name':'src/electron','url':None,'deps_file':'DEPS','custom_vars':{'process_deps':False},'managed':False}]" > tmpgclient
|
||||||
|
if [ "${{ inputs.target-platform }}" = "windows" ]; then
|
||||||
|
echo "solutions=[{'name':'src/electron','url':None,'deps_file':'DEPS','custom_vars':{'process_deps':False,'install_sysroot':False,'checkout_win':True},'managed':False}]" > tmpgclient
|
||||||
|
echo "target_os=['win']" >> tmpgclient
|
||||||
|
fi
|
||||||
|
e d gclient runhooks --gclientfile=tmpgclient
|
||||||
|
|
||||||
|
# Fix VS Toolchain
|
||||||
|
if [ "${{ inputs.target-platform }}" = "windows" ]; then
|
||||||
|
rm -rf src/third_party/depot_tools/win_toolchain/vs_files
|
||||||
|
e d python3 src/build/vs_toolchain.py update --force
|
||||||
|
fi
|
||||||
- name: Regenerate DEPS Hash
|
- name: Regenerate DEPS Hash
|
||||||
run: |
|
run: |
|
||||||
(cd src/electron && git checkout .) && node src/electron/script/generate-deps-hash.js && cat src/electron/.depshash-target
|
(cd src/electron && git checkout .) && node src/electron/script/generate-deps-hash.js && cat src/electron/.depshash-target
|
||||||
echo "DEPSHASH=$(shasum src/electron/.depshash | cut -f1 -d' ')" >> $GITHUB_ENV
|
echo "DEPSHASH=$(sha1sum src/electron/.depshash | cut -f1 -d' ')" >> $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: Checkout Electron
|
- name: Checkout Electron
|
||||||
@@ -142,16 +165,17 @@ jobs:
|
|||||||
- name: Run GN Check
|
- name: Run GN Check
|
||||||
run: |
|
run: |
|
||||||
cd src
|
cd src
|
||||||
gn check out/Default //electron:electron_lib
|
e d gn check out/Default //electron:electron_lib
|
||||||
gn check out/Default //electron:electron_app
|
e d gn check out/Default //electron:electron_app
|
||||||
gn check out/Default //electron/shell/common:mojo
|
e d gn check out/Default //electron/shell/common:mojo
|
||||||
gn check out/Default //electron/shell/common:plugin
|
e d gn check out/Default //electron/shell/common:plugin
|
||||||
|
|
||||||
# Check the hunspell filenames
|
# Check the hunspell filenames
|
||||||
node electron/script/gen-hunspell-filenames.js --check
|
node electron/script/gen-hunspell-filenames.js --check
|
||||||
node electron/script/gen-libc++-filenames.js --check
|
node electron/script/gen-libc++-filenames.js --check
|
||||||
- name: Wait for active SSH sessions
|
- name: Wait for active SSH sessions
|
||||||
if: always() && !cancelled()
|
if: always() && !cancelled()
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
while [ -f /var/.ssh-lock ]
|
while [ -f /var/.ssh-lock ]
|
||||||
do
|
do
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ on:
|
|||||||
inputs:
|
inputs:
|
||||||
target-platform:
|
target-platform:
|
||||||
type: string
|
type: string
|
||||||
description: 'Platform to run on, can be macos or linux'
|
description: 'Platform to run on, can be macos, windows or linux'
|
||||||
required: true
|
required: true
|
||||||
target-arch:
|
target-arch:
|
||||||
type: string
|
type: string
|
||||||
@@ -41,22 +41,37 @@ env:
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
test:
|
test:
|
||||||
|
defaults:
|
||||||
|
run:
|
||||||
|
shell: bash
|
||||||
runs-on: ${{ inputs.test-runs-on }}
|
runs-on: ${{ inputs.test-runs-on }}
|
||||||
container: ${{ fromJSON(inputs.test-container) }}
|
container: ${{ fromJSON(inputs.test-container) }}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
build-type: ${{ inputs.target-platform == 'macos' && fromJSON('["darwin","mas"]') || fromJSON('["linux"]') }}
|
build-type: ${{ inputs.target-platform == 'macos' && fromJSON('["darwin","mas"]') || (inputs.target-platform == 'windows' && fromJSON('["windows"]') || fromJSON('["linux"]')) }}
|
||||||
shard: ${{ inputs.target-platform == 'macos' && fromJSON('[1, 2]') || fromJSON('[1, 2, 3]') }}
|
shard: ${{ inputs.target-platform == 'linux' && fromJSON('[1, 2, 3]') || fromJSON('[1, 2]') }}
|
||||||
env:
|
env:
|
||||||
BUILD_TYPE: ${{ matrix.build-type }}
|
BUILD_TYPE: ${{ matrix.build-type }}
|
||||||
TARGET_ARCH: ${{ inputs.target-arch }}
|
TARGET_ARCH: ${{ inputs.target-arch }}
|
||||||
ARTIFACT_KEY: ${{ matrix.build-type }}_${{ inputs.target-arch }}
|
ARTIFACT_KEY: ${{ matrix.build-type }}_${{ inputs.target-arch }}
|
||||||
steps:
|
steps:
|
||||||
- name: Fix node20 on arm32 runners
|
- name: Fix node20 on arm32 runners
|
||||||
if: ${{ inputs.target-arch == 'arm' }}
|
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/
|
||||||
|
- name: Install Git on Windows arm64 runners
|
||||||
|
if: ${{ inputs.target-arch == 'arm64' && inputs.target-platform == 'windows' }}
|
||||||
|
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 git.install --params "'/GitAndUnixToolsOnPath'" -y
|
||||||
|
choco install -y --no-progress git
|
||||||
|
choco install -y --force nodejs --version=20.11.0
|
||||||
|
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
|
||||||
- name: Add TCC permissions on macOS
|
- name: Add TCC permissions on macOS
|
||||||
if: ${{ inputs.target-platform == 'macos' }}
|
if: ${{ inputs.target-platform == 'macos' }}
|
||||||
run: |
|
run: |
|
||||||
@@ -102,17 +117,12 @@ jobs:
|
|||||||
- 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.autocrlf false
|
||||||
|
git config --global branch.autosetuprebase always
|
||||||
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
|
||||||
if [ "`uname`" = "Darwin" ]; then
|
|
||||||
# remove ninjalog_uploader_wrapper.py from autoninja since we don't use it and it causes problems
|
|
||||||
sed -i '' '/ninjalog_uploader_wrapper.py/d' ./autoninja
|
|
||||||
else
|
|
||||||
sed -i '/ninjalog_uploader_wrapper.py/d' ./autoninja
|
|
||||||
# Remove swift-format dep from cipd on macOS until we send a patch upstream.
|
|
||||||
git apply --3way ../src/electron/.github/workflows/config/gclient.diff
|
|
||||||
fi
|
|
||||||
touch .disable_auto_update
|
touch .disable_auto_update
|
||||||
- name: Add Depot Tools to PATH
|
- name: Add Depot Tools to PATH
|
||||||
run: echo "$(pwd)/depot_tools" >> $GITHUB_PATH
|
run: echo "$(pwd)/depot_tools" >> $GITHUB_PATH
|
||||||
@@ -155,14 +165,18 @@ jobs:
|
|||||||
ELECTRON_DISABLE_SECURITY_WARNINGS: 1
|
ELECTRON_DISABLE_SECURITY_WARNINGS: 1
|
||||||
ELECTRON_SKIP_NATIVE_MODULE_TESTS: true
|
ELECTRON_SKIP_NATIVE_MODULE_TESTS: true
|
||||||
DISPLAY: ':99.0'
|
DISPLAY: ':99.0'
|
||||||
|
NPM_CONFIG_MSVS_VERSION: '2022'
|
||||||
run: |
|
run: |
|
||||||
cd src/electron
|
cd src/electron
|
||||||
# Get which tests are on this shard
|
# Get which tests are on this shard
|
||||||
tests_files=$(node script/split-tests ${{ matrix.shard }} ${{ inputs.target-platform == 'macos' && 2 || 3 }})
|
tests_files=$(node script/split-tests ${{ matrix.shard }} ${{ inputs.target-platform == 'macos' && 2 || 3 }})
|
||||||
|
|
||||||
# Run tests
|
# Run tests
|
||||||
if [ "`uname`" = "Darwin" ]; then
|
if [ "${{ inputs.target-platform }}" != "linux" ]; then
|
||||||
echo "About to start tests"
|
echo "About to start tests"
|
||||||
|
if [ "${{ inputs.target-platform }}" = "windows" ] && [ "${{ inputs.target-arch }}" = "x86" ]; then
|
||||||
|
export npm_config_arch="ia32"
|
||||||
|
fi
|
||||||
node script/yarn test --runners=main --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 ..
|
||||||
@@ -194,6 +208,7 @@ jobs:
|
|||||||
if-no-files-found: ignore
|
if-no-files-found: ignore
|
||||||
- name: Wait for active SSH sessions
|
- name: Wait for active SSH sessions
|
||||||
if: always() && !cancelled()
|
if: always() && !cancelled()
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
while [ -f /var/.ssh-lock ]
|
while [ -f /var/.ssh-lock ]
|
||||||
do
|
do
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ on:
|
|||||||
inputs:
|
inputs:
|
||||||
target-platform:
|
target-platform:
|
||||||
type: string
|
type: string
|
||||||
description: 'Platform to run on, can be macos or linux'
|
description: 'Platform to run on, can be macos, windows or linux'
|
||||||
required: true
|
required: true
|
||||||
target-arch:
|
target-arch:
|
||||||
type: string
|
type: string
|
||||||
@@ -93,6 +93,7 @@ jobs:
|
|||||||
node electron/script/node-spec-runner.js --default --jUnitDir=junit
|
node electron/script/node-spec-runner.js --default --jUnitDir=junit
|
||||||
- name: Wait for active SSH sessions
|
- name: Wait for active SSH sessions
|
||||||
if: always() && !cancelled()
|
if: always() && !cancelled()
|
||||||
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
while [ -f /var/.ssh-lock ]
|
while [ -f /var/.ssh-lock ]
|
||||||
do
|
do
|
||||||
@@ -155,6 +156,7 @@ jobs:
|
|||||||
cd src
|
cd src
|
||||||
node electron/script/nan-spec-runner.js
|
node electron/script/nan-spec-runner.js
|
||||||
- name: Wait for active SSH sessions
|
- name: Wait for active SSH sessions
|
||||||
|
shell: bash
|
||||||
if: always() && !cancelled()
|
if: always() && !cancelled()
|
||||||
run: |
|
run: |
|
||||||
while [ -f /var/.ssh-lock ]
|
while [ -f /var/.ssh-lock ]
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ def skip_path(dep, dist_zip, target_cpu):
|
|||||||
and dep == "snapshot_blob.bin"
|
and dep == "snapshot_blob.bin"
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if should_skip:
|
if should_skip and os.environ.get('ELECTRON_DEBUG_ZIP_SKIP') == '1':
|
||||||
print("Skipping {}".format(dep))
|
print("Skipping {}".format(dep))
|
||||||
return should_skip
|
return should_skip
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
if [ "`uname`" == "Darwin" ]; then
|
if [ "$(expr substr $(uname -s) 1 10)" == "MSYS_NT-10" ]; then
|
||||||
|
BUILD_TYPE="windows"
|
||||||
|
elif [ "`uname`" == "Darwin" ]; then
|
||||||
if [ -z "$MAS_BUILD" ]; then
|
if [ -z "$MAS_BUILD" ]; then
|
||||||
BUILD_TYPE="darwin"
|
BUILD_TYPE="darwin"
|
||||||
else
|
else
|
||||||
@@ -46,23 +48,47 @@ cp_if_exist() {
|
|||||||
move_src_dirs_if_exist() {
|
move_src_dirs_if_exist() {
|
||||||
mkdir src_artifacts
|
mkdir src_artifacts
|
||||||
|
|
||||||
for dir in \
|
dirs=("src/out/Default/gen/node_headers" \
|
||||||
src/out/Default/gen/node_headers \
|
"src/out/Default/overlapped-checker" \
|
||||||
src/out/Default/overlapped-checker \
|
"src/out/Default/ffmpeg" \
|
||||||
src/out/Default/ffmpeg \
|
"src/out/Default/hunspell_dictionaries" \
|
||||||
src/out/Default/hunspell_dictionaries \
|
"src/third_party/electron_node" \
|
||||||
src/third_party/electron_node \
|
"src/third_party/nan" \
|
||||||
src/third_party/nan \
|
"src/cross-arch-snapshots" \
|
||||||
src/cross-arch-snapshots \
|
"src/buildtools/mac" \
|
||||||
src/third_party/llvm-build \
|
"src/buildtools/third_party/libc++" \
|
||||||
src/build/linux \
|
"src/buildtools/third_party/libc++abi" \
|
||||||
src/buildtools/mac \
|
"src/third_party/libc++" \
|
||||||
src/buildtools/third_party/libc++ \
|
"src/third_party/libc++abi" \
|
||||||
src/buildtools/third_party/libc++abi \
|
"src/out/Default/obj/buildtools/third_party" \
|
||||||
src/third_party/libc++ \
|
"src/v8/tools/builtins-pgo")
|
||||||
src/third_party/libc++abi \
|
|
||||||
src/out/Default/obj/buildtools/third_party \
|
# Only do this for linux build type, this folder
|
||||||
src/v8/tools/builtins-pgo
|
# exists for windows builds on linux hosts but we do
|
||||||
|
# not need it
|
||||||
|
if [ "$BUILD_TYPE" == "linux" ]; then
|
||||||
|
dirs+=('src/build/linux')
|
||||||
|
fi
|
||||||
|
|
||||||
|
# llvm-build is the host toolchain, for windows we need
|
||||||
|
# a different toolchain so no point copying this one
|
||||||
|
if [ "$BUILD_TYPE" != "windows" ]; then
|
||||||
|
dirs+=('src/third_party/llvm-build')
|
||||||
|
fi
|
||||||
|
|
||||||
|
# On windows we should clean up two symlinks that aren't
|
||||||
|
# compatible with the windows test runner
|
||||||
|
if [ "$BUILD_TYPE" == "windows" ]; then
|
||||||
|
rm -f src/third_party/electron_node/tools/node_modules/eslint/node_modules/eslint
|
||||||
|
rm -f src/third_party/electron_node/tools/node_modules/eslint/node_modules/.bin/eslint
|
||||||
|
rm -f src/third_party/electron_node/out/tools/bin/python
|
||||||
|
|
||||||
|
# Also need to copy electron.lib to node.lib for native module testing purposes
|
||||||
|
mkdir -p src/out/Default/gen/node_headers/Release
|
||||||
|
cp src/out/Default/electron.lib src/out/Default/gen/node_headers/Release/node.lib
|
||||||
|
fi
|
||||||
|
|
||||||
|
for dir in "${dirs[@]}"
|
||||||
do
|
do
|
||||||
if [ -d "$dir" ]; then
|
if [ -d "$dir" ]; then
|
||||||
mkdir -p src_artifacts/$(dirname $dir)
|
mkdir -p src_artifacts/$(dirname $dir)
|
||||||
@@ -70,7 +96,7 @@ move_src_dirs_if_exist() {
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
tar -C src_artifacts -cf src_artifacts.tar ./
|
tar -C src_artifacts -cf src_artifacts.tar .
|
||||||
|
|
||||||
echo Storing src_artifacts.tar
|
echo Storing src_artifacts.tar
|
||||||
mv src_artifacts.tar $SRC_ARTIFACTS
|
mv src_artifacts.tar $SRC_ARTIFACTS
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ const FALLBACK_HASH_VERSION = 3;
|
|||||||
// Per platform hash versions to bust the cache on different platforms
|
// Per platform hash versions to bust the cache on different platforms
|
||||||
const HASH_VERSIONS = {
|
const HASH_VERSIONS = {
|
||||||
darwin: 3,
|
darwin: 3,
|
||||||
win32: 4,
|
win32: 3,
|
||||||
linux: 3
|
linux: 3
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -16,7 +16,8 @@ const HASH_VERSIONS = {
|
|||||||
const filesToHash = [
|
const filesToHash = [
|
||||||
path.resolve(__dirname, '../DEPS'),
|
path.resolve(__dirname, '../DEPS'),
|
||||||
path.resolve(__dirname, '../yarn.lock'),
|
path.resolve(__dirname, '../yarn.lock'),
|
||||||
path.resolve(__dirname, '../script/sysroots.json')
|
path.resolve(__dirname, '../script/sysroots.json'),
|
||||||
|
path.resolve(__dirname, '../.github/actions/checkout/action.yml')
|
||||||
];
|
];
|
||||||
|
|
||||||
const addAllFiles = (dir) => {
|
const addAllFiles = (dir) => {
|
||||||
@@ -47,7 +48,7 @@ for (const file of filesToHash) {
|
|||||||
const extraArgs = process.env.GCLIENT_EXTRA_ARGS || 'no_extra_args';
|
const extraArgs = process.env.GCLIENT_EXTRA_ARGS || 'no_extra_args';
|
||||||
addToHashAndLog(extraArgs);
|
addToHashAndLog(extraArgs);
|
||||||
|
|
||||||
const effectivePlatform = extraArgs.includes('host_os=mac') ? 'darwin' : process.platform;
|
const effectivePlatform = extraArgs.includes('host_os=mac') ? 'darwin' : (process.env.TARGET_OS === 'win' ? 'win32' : process.platform);
|
||||||
|
|
||||||
// Write the hash to disk
|
// Write the hash to disk
|
||||||
fs.writeFileSync(path.resolve(__dirname, '../.depshash'), hasher.digest('hex'));
|
fs.writeFileSync(path.resolve(__dirname, '../.depshash'), hasher.digest('hex'));
|
||||||
|
|||||||
@@ -31,9 +31,9 @@ async function main () {
|
|||||||
const outDir = utils.getOutDir({ shouldLog: true });
|
const outDir = utils.getOutDir({ shouldLog: true });
|
||||||
const nodeDir = path.resolve(BASE, 'out', outDir, 'gen', 'node_headers');
|
const nodeDir = path.resolve(BASE, 'out', outDir, 'gen', 'node_headers');
|
||||||
const env = {
|
const env = {
|
||||||
|
npm_config_msvs_version: '2022',
|
||||||
...process.env,
|
...process.env,
|
||||||
npm_config_nodedir: nodeDir,
|
npm_config_nodedir: nodeDir,
|
||||||
npm_config_msvs_version: '2022',
|
|
||||||
npm_config_arch: process.env.NPM_CONFIG_ARCH,
|
npm_config_arch: process.env.NPM_CONFIG_ARCH,
|
||||||
npm_config_yes: 'true'
|
npm_config_yes: 'true'
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -191,9 +191,9 @@ async function runMainProcessElectronTests () {
|
|||||||
|
|
||||||
async function installSpecModules (dir) {
|
async function installSpecModules (dir) {
|
||||||
const env = {
|
const env = {
|
||||||
|
npm_config_msvs_version: '2022',
|
||||||
...process.env,
|
...process.env,
|
||||||
CXXFLAGS: process.env.CXXFLAGS,
|
CXXFLAGS: process.env.CXXFLAGS,
|
||||||
npm_config_msvs_version: '2022',
|
|
||||||
npm_config_yes: 'true'
|
npm_config_yes: 'true'
|
||||||
};
|
};
|
||||||
if (args.electronVersion) {
|
if (args.electronVersion) {
|
||||||
|
|||||||
@@ -125,7 +125,7 @@ app.whenReady().then(async () => {
|
|||||||
const validTestPaths = argv.files && argv.files.map(file =>
|
const validTestPaths = argv.files && argv.files.map(file =>
|
||||||
path.isAbsolute(file)
|
path.isAbsolute(file)
|
||||||
? path.relative(baseElectronDir, file)
|
? path.relative(baseElectronDir, file)
|
||||||
: file);
|
: path.normalize(file));
|
||||||
const filter = (file) => {
|
const filter = (file) => {
|
||||||
if (!/-spec\.[tj]s$/.test(file)) {
|
if (!/-spec\.[tj]s$/.test(file)) {
|
||||||
return false;
|
return false;
|
||||||
|
|||||||
Reference in New Issue
Block a user