Compare commits

...

42 Commits

Author SHA1 Message Date
Samuel Attard
796be5100a restore testing 2024-06-15 20:33:05 -07:00
Samuel Attard
f0923d8ca8 test a release build for fun 2024-06-15 18:51:36 -07:00
Samuel Attard
755a667b7c normalize test path 2024-06-15 16:42:59 -07:00
Samuel Attard
3e5e61ae96 maybe fix gn check? 2024-06-15 16:17:36 -07:00
Samuel Attard
00472c7e15 copy node.lib 2024-06-15 16:08:54 -07:00
Samuel Attard
60e769a12f msvs 2022 2024-06-15 13:14:50 -07:00
Samuel Attard
e2f9230952 Update move-artifacts.sh 2024-06-15 12:48:46 -07:00
Samuel Attard
2015489829 ez 2024-06-15 12:28:11 -07:00
Samuel Attard
3dab62a5b0 no symlinks for win restore 2024-06-15 12:04:54 -07:00
Samuel Attard
973ed113ec restore src cache win gn check 2024-06-15 11:49:34 -07:00
Samuel Attard
0b709a9fd4 fix src tar 2024-06-15 11:39:21 -07:00
Samuel Attard
8172dee9d1 fix windows gn check 2024-06-15 00:20:43 -07:00
Samuel Attard
69412cb5f1 cry sigh move on 2024-06-15 00:12:50 -07:00
Samuel Attard
684a029d92 maybe fix gn check 2024-06-14 23:56:30 -07:00
Samuel Attard
f32e8766a7 build: fix artifact src thingy 2024-06-14 23:47:09 -07:00
Samuel Attard
41447af5bb Merge remote-tracking branch 'origin/main' into win-cross 2024-06-14 23:37:09 -07:00
Samuel Attard
4a92ec0e90 build: add skip-windows flag 2024-06-14 23:36:14 -07:00
Samuel Attard
af4eaada02 build: run tests on windows normally 2024-06-14 23:22:05 -07:00
Samuel Attard
7ab051c083 build: fix dirs arr 2024-06-14 22:05:58 -05:00
Samuel Attard
062580c4a5 fix deref 2024-06-14 17:44:50 -05:00
Samuel Attard
6af09fc7b8 deref symlink 2024-06-14 16:23:58 -05:00
Samuel Attard
258da5e0d5 chore: set build-type 2024-06-14 15:57:32 -05:00
Samuel Attard
218b836e28 test no need split 2024-06-14 15:34:23 -05:00
Samuel Attard
534e4c1236 halp 2024-06-14 15:10:43 -05:00
Samuel Attard
c958cccd22 build: windows tests on windows hosts 2024-06-14 14:53:41 -05:00
Samuel Attard
7f9f9f34b5 Merge remote-tracking branch 'origin/main' into win-cross 2024-06-14 14:50:54 -05:00
Samuel Attard
e9b8188e9f build: fix artifact platform 2024-06-14 14:49:44 -05:00
Samuel Attard
89d77e39f4 foo 2024-06-14 12:15:47 -05:00
Samuel Attard
1a0bac3328 Merge remote-tracking branch 'origin/main' into win-cross 2024-06-14 12:13:09 -05:00
Samuel Attard
f6fc8b204b target-platform not uname 2024-06-14 11:46:22 -05:00
Samuel Attard
6d6f7d0ee6 force snapshot 2024-06-14 11:22:06 -05:00
Samuel Attard
2649a5bbec check right manifest 2024-06-14 11:01:14 -05:00
Samuel Attard
72b5e59dce build: checkout should invalidate src cache 2024-06-14 09:01:50 -05:00
Samuel Attard
4cd51a13b0 nuke vs toolchain 2024-06-14 08:49:46 -05:00
Samuel Attard
5677aab327 restore win x 2024-06-14 02:40:36 -05:00
Samuel Attard
d6ad4ca931 crying 2024-06-14 02:35:30 -05:00
Samuel Attard
2d756bfa0b make fuse fs 2024-06-14 02:28:28 -05:00
Samuel Attard
821feffdd3 fix: add e d for toolchain vars 2024-06-14 01:39:02 -05:00
Samuel Attard
6c47012326 fix: add e d for toolchain vars 2024-06-14 01:26:21 -05:00
Samuel Attard
61dfa7ebc3 build: force enable win toolchain 2024-06-14 01:04:52 -05:00
Samuel Attard
86dfd98746 build: add fuse cap to docker windows cross checkout 2024-06-14 00:44:43 -05:00
Samuel Attard
8f7c6d7a81 build: try win/cross on gha 2024-06-14 00:31:49 -05:00
11 changed files with 168 additions and 47 deletions

View File

@@ -32,6 +32,12 @@ runs:
run: |
GN_APPENDED_ARGS="$GN_EXTRA_ARGS v8_snapshot_toolchain=\"//build/toolchain/mac:clang_x64\""
echo "GN_EXTRA_ARGS=$GN_APPENDED_ARGS" >> $GITHUB_ENV
- name: Set GN_EXTRA_ARGS for Win/cross
shell: bash
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: Build Electron ${{ inputs.step-suffix }}
shell: bash
run: |
@@ -57,7 +63,7 @@ runs:
cd src
e build electron:electron_dist_zip -j $NUMBER_OF_NINJA_PROCESSES
if [ "${{ env.CHECK_DIST_MANIFEST }}" = "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
target_os="${target_os}_mas"
fi
@@ -78,7 +84,7 @@ runs:
sed $SEDOPTION '/--turbo-profiling-input/d' out/Default/mksnapshot_args
sed $SEDOPTION '/The gn arg use_goma=true .*/d' out/Default/mksnapshot_args
if [ "`uname`" = "Linux" ]; then
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

View File

@@ -17,6 +17,12 @@ runs:
run: |
cd src/electron
node script/yarn install
- name: Load Build Tools
shell: bash
run: |
export BUILD_TOOLS_SHA=2f67e10b9b6b5700b1c7940df412b0345257d9ae
npm i -g @electron/build-tools
e auto-update disable
- name: Get Depot Tools
shell: bash
run: |
@@ -68,13 +74,17 @@ runs:
if: steps.check-cache.outputs.cache_exists == 'false'
shell: bash
run: |
gclient config \
e d gclient config \
--name "src/electron" \
--unmanaged \
${GCLIENT_EXTRA_ARGS} \
"$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 -vvvvv
if [ "${{ inputs.is-release }}" != "true" ]; then
# Re-export all the patches to check if there were changes.
python3 src/electron/script/export_all_patches.py src/electron/patches/config.json

View File

@@ -18,6 +18,11 @@ on:
description: 'Skip Linux builds'
default: false
required: false
skip-windows:
type: boolean
description: 'Skip Windows builds'
default: false
required: false
skip-lint:
type: boolean
description: 'Skip lint check'
@@ -63,9 +68,31 @@ jobs:
secrets: inherit
# Checkout Jobs
checkout-windows:
needs: changes
if: ${{ needs.changes.outputs.src == 'true' && !inputs.skip-windows }}
runs-on: aks-linux-large
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
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
checkout-macos:
needs: changes
if: ${{ needs.changes.outputs.src == 'true' && !inputs.skip-macos}}
if: false
# if: ${{ needs.changes.outputs.src == 'true' && !inputs.skip-macos}}
runs-on: aks-linux-large
container:
image: ghcr.io/electron/build:${{ inputs.build-image-sha }}
@@ -88,7 +115,8 @@ jobs:
checkout-linux:
needs: changes
if: ${{ needs.changes.outputs.src == 'true' && !inputs.skip-linux}}
if: false
# if: ${{ needs.changes.outputs.src == 'true' && !inputs.skip-linux}}
runs-on: aks-linux-large
container:
image: ghcr.io/electron/build:${{ inputs.build-image-sha }}
@@ -151,6 +179,21 @@ jobs:
generate-symbols: false
upload-to-storage: '0'
secrets: inherit
windows-x64:
uses: ./.github/workflows/pipeline-electron-build-and-test.yml
needs: checkout-windows
with:
build-runs-on: aks-linux-large
test-runs-on: windows-2022
build-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"]}'
target-platform: windows
target-arch: x64
is-release: false
gn-build-type: testing
generate-symbols: false
upload-to-storage: '0'
secrets: inherit
linux-arm:
uses: ./.github/workflows/pipeline-electron-build-and-test.yml

View File

@@ -9,7 +9,7 @@ on:
type: string
target-platform:
type: string
description: 'Platform to run on, can be macos or linux'
description: 'Platform to run on, can be macos, linux or windows'
required: true
target-arch:
type: string
@@ -58,7 +58,7 @@ env:
ELECTRON_GITHUB_TOKEN: ${{ secrets.ELECTRON_GITHUB_TOKEN }}
# Disable pre-compiled headers to reduce out size - only useful for rebuilds
GN_BUILDFLAG_ARGS: 'enable_precompiled_headers=false'
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') }}
# Only disable this in the Asan build
CHECK_DIST_MANIFEST: true
IS_GHA_RELEASE: true
@@ -93,6 +93,10 @@ jobs:
- name: Install AZCopy
if: ${{ inputs.target-platform == 'macos' }}
run: brew install azcopy
- name: Enable windows toolchain
if: ${{ inputs.target-platform == 'windows' }}
run: |
echo "ELECTRON_DEPOT_TOOLS_WIN_TOOLCHAIN=1" >> $GITHUB_ENV
- name: Set GN_EXTRA_ARGS for Linux
if: ${{ inputs.target-platform == 'linux' }}
run: |
@@ -133,7 +137,7 @@ jobs:
if: ${{ inputs.target-platform == 'macos' }}
uses: ./src/electron/.github/actions/restore-cache-azcopy
- 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
- name: Checkout Electron
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29
@@ -148,7 +152,18 @@ jobs:
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
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
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
run: |
(cd src/electron && git checkout .) && node src/electron/script/generate-deps-hash.js && cat src/electron/.depshash-target
@@ -178,7 +193,7 @@ jobs:
with:
target-arch: ${{ inputs.target-arch }}
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 }}'
generate-symbols: '${{ inputs.generate-symbols }}'
upload-to-storage: '${{ inputs.upload-to-storage }}'

View File

@@ -33,7 +33,7 @@ concurrency:
env:
ELECTRON_RBE_JWT: ${{ secrets.ELECTRON_RBE_JWT }}
GN_BUILDFLAG_ARGS: 'enable_precompiled_headers=false'
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
TARGET_ARCH: ${{ inputs.target-arch }}
@@ -45,7 +45,7 @@ jobs:
strategy:
fail-fast: false
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"]')) }}
env:
BUILD_TYPE: ${{ matrix.build-type }}
TARGET_ARCH: ${{ inputs.target-arch }}
@@ -91,6 +91,15 @@ jobs:
GN_EXTRA_ARGS='fatal_linker_warnings=false enable_linux_installer=false'
fi
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
run: |
node src/electron/script/generate-deps-hash.js && cat src/electron/.depshash-target
@@ -101,11 +110,16 @@ jobs:
if: ${{ inputs.target-platform == 'macos' }}
uses: ./src/electron/.github/actions/restore-cache-azcopy
- 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
- name: Run Electron Only Hooks
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
gclient runhooks --gclientfile=tmpgclient
- name: Regenerate DEPS Hash
run: |
(cd src/electron && git checkout .) && node src/electron/script/generate-deps-hash.js && cat src/electron/.depshash-target
@@ -127,9 +141,9 @@ jobs:
- name: Run GN Check
run: |
cd src
gn check out/Default //electron:electron_lib
gn check out/Default //electron:electron_app
gn check out/Default //electron/shell/common/api:mojo
e d gn check out/Default //electron:electron_lib
e d gn check out/Default //electron:electron_app
e d gn check out/Default //electron/shell/common/api:mojo
# Check the hunspell filenames
node electron/script/gen-hunspell-filenames.js --check

View File

@@ -35,7 +35,7 @@ jobs:
strategy:
fail-fast: false
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]') || fromJSON('[1, 2, 3]') }}
env:
BUILD_TYPE: ${{ matrix.build-type }}
@@ -47,11 +47,13 @@ jobs:
path: src/electron
fetch-depth: 0
- name: Install Dependencies
shell: bash
run: |
cd src/electron
node script/yarn install
- name: Get Depot Tools
timeout-minutes: 5
shell: bash
run: |
git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
if [ "`uname`" = "Darwin" ]; then
@@ -59,14 +61,12 @@ jobs:
sed -i '' '/ninjalog_uploader_wrapper.py/d' ./depot_tools/autoninja
else
sed -i '/ninjalog_uploader_wrapper.py/d' ./depot_tools/autoninja
# Remove swift-format dep from cipd on macOS until we send a patch upstream.
cd depot_tools
git apply --3way ../src/electron/.github/workflows/config/gclient.diff
fi
# Ensure depot_tools does not update.
test -d depot_tools && cd depot_tools
touch .disable_auto_update
- name: Add Depot Tools to PATH
shell: bash
run: echo "$(pwd)/depot_tools" >> $GITHUB_PATH
- name: Download Generated Artifacts
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e
@@ -79,8 +79,10 @@ jobs:
name: src_artifacts_${{ matrix.build-type }}_${{ env.TARGET_ARCH }}
path: ./src_artifacts_${{ matrix.build-type }}_${{ env.TARGET_ARCH }}
- name: Restore Generated Artifacts
shell: bash
run: ./src/electron/script/actions/restore-artifacts.sh
- name: Unzip Dist, Mksnapshot & Chromedriver
shell: bash
run: |
cd src/out/Default
unzip -:o dist.zip
@@ -93,6 +95,7 @@ jobs:
# cd src/electron
# ./script/codesign/generate-identity.sh
- name: Run Electron Tests
shell: bash
env:
MOCHA_REPORTER: mocha-multi-reporters
ELECTRON_TEST_RESULTS_DIR: junit
@@ -100,14 +103,15 @@ jobs:
ELECTRON_DISABLE_SECURITY_WARNINGS: 1
ELECTRON_SKIP_NATIVE_MODULE_TESTS: true
DISPLAY: ':99.0'
NPM_CONFIG_MSVS_VERSION: '2022'
run: |
cd src/electron
# Get which tests are on this shard
tests_files=$(node script/split-tests ${{ matrix.shard }} ${{ inputs.target-platform == 'macos' && 1 || 3 }})
# Run tests
if [ "`uname`" = "Darwin" ]; then
node script/yarn test --runners=main --trace-uncaught --enable-logging
if [ "${{ inputs.target-platform }}" != "linux" ]; then
node script/yarn test --runners=main --trace-uncaught --enable-logging --files $tests_files
else
chown :builduser .. && chmod g+w ..
chown -R :builduser . && chmod -R g+w .
@@ -117,6 +121,7 @@ jobs:
fi
- name: Wait for active SSH sessions
if: always() && !cancelled()
shell: bash
run: |
while [ -f /var/.ssh-lock ]
do

View File

@@ -7,7 +7,11 @@ if [ "`uname`" == "Darwin" ]; then
BUILD_TYPE="mas"
fi
elif [ "`uname`" == "Linux" ]; then
BUILD_TYPE="linux"
if [ "$ELECTRON_DEPOT_TOOLS_WIN_TOOLCHAIN" == "1" ]; then
BUILD_TYPE="windows"
else
BUILD_TYPE="linux"
fi
else
echo "Unsupported platform"
exit 1
@@ -46,24 +50,47 @@ cp_if_exist() {
move_src_dirs_if_exist() {
mkdir src_artifacts
for dir in \
src/out/Default/gen/node_headers \
src/out/Default/overlapped-checker \
src/out/Default/ffmpeg \
src/out/Default/hunspell_dictionaries \
src/electron \
src/third_party/electron_node \
src/third_party/nan \
src/cross-arch-snapshots \
src/third_party/llvm-build \
src/build/linux \
src/buildtools/mac \
src/buildtools/third_party/libc++ \
src/buildtools/third_party/libc++abi \
src/third_party/libc++ \
src/third_party/libc++abi \
src/out/Default/obj/buildtools/third_party \
src/v8/tools/builtins-pgo
dirs=("src/out/Default/gen/node_headers" \
"src/out/Default/overlapped-checker" \
"src/out/Default/ffmpeg" \
"src/out/Default/hunspell_dictionaries" \
"src/third_party/electron_node" \
"src/third_party/nan" \
"src/cross-arch-snapshots" \
"src/buildtools/mac" \
"src/buildtools/third_party/libc++" \
"src/buildtools/third_party/libc++abi" \
"src/third_party/libc++" \
"src/third_party/libc++abi" \
"src/out/Default/obj/buildtools/third_party" \
"src/v8/tools/builtins-pgo")
# Only do this for linux build type, this folder
# 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
if [ -d "$dir" ]; then
mkdir -p src_artifacts/$(dirname $dir)

View File

@@ -16,7 +16,8 @@ const HASH_VERSIONS = {
const filesToHash = [
path.resolve(__dirname, '../DEPS'),
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) => {

View File

@@ -21,9 +21,9 @@ async function main () {
const outDir = utils.getOutDir({ shouldLog: true });
const nodeDir = path.resolve(BASE, 'out', outDir, 'gen', 'node_headers');
const env = {
npm_config_msvs_version: '2019',
...process.env,
npm_config_nodedir: nodeDir,
npm_config_msvs_version: '2019',
npm_config_arch: process.env.NPM_CONFIG_ARCH,
npm_config_yes: 'true'
};

View File

@@ -191,9 +191,9 @@ async function installSpecModules (dir) {
const CXXFLAGS = ['-std=c++17', process.env.CXXFLAGS].filter(x => !!x).join(' ');
const env = {
npm_config_msvs_version: '2019',
...process.env,
CXXFLAGS,
npm_config_msvs_version: '2019',
npm_config_yes: 'true'
};
if (args.electronVersion) {

View File

@@ -125,7 +125,7 @@ app.whenReady().then(async () => {
const validTestPaths = argv.files && argv.files.map(file =>
path.isAbsolute(file)
? path.relative(baseElectronDir, file)
: file);
: path.normalize(file));
const filter = (file) => {
if (!/-spec\.[tj]s$/.test(file)) {
return false;