ci: run linux arm tests on CircleCI (#29714)
This commit is contained in:
parent
8ccab4ce91
commit
6b4c59b8d8
4 changed files with 138 additions and 30 deletions
|
@ -64,6 +64,14 @@ executors:
|
||||||
resource_class: electronjs/macos-arm64
|
resource_class: electronjs/macos-arm64
|
||||||
machine: true
|
machine: true
|
||||||
|
|
||||||
|
linux-arm:
|
||||||
|
resource_class: electronjs/linux-arm
|
||||||
|
machine: true
|
||||||
|
|
||||||
|
linux-arm64:
|
||||||
|
resource_class: electronjs/linux-arm64
|
||||||
|
machine: true
|
||||||
|
|
||||||
# The config expects the following environment variables to be set:
|
# The config expects the following environment variables to be set:
|
||||||
# - "SLACK_WEBHOOK" Slack hook URL to send notifications.
|
# - "SLACK_WEBHOOK" Slack hook URL to send notifications.
|
||||||
#
|
#
|
||||||
|
@ -211,7 +219,11 @@ step-maybe-cleanup-arm64-mac: &step-maybe-cleanup-arm64-mac
|
||||||
killall Safari || echo "No Safari processes left running"
|
killall Safari || echo "No Safari processes left running"
|
||||||
rm -rf ~/Library/Application\ Support/Electron*
|
rm -rf ~/Library/Application\ Support/Electron*
|
||||||
rm -rf ~/Library/Application\ Support/electron*
|
rm -rf ~/Library/Application\ Support/electron*
|
||||||
|
elif [ "$TARGET_ARCH" == "arm" ] || [ "$TARGET_ARCH" == "arm64" ]; then
|
||||||
|
pkill Xvfb || echo "Xvfb not running"
|
||||||
|
pkill electron || echo "electron not running"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
when: always
|
when: always
|
||||||
|
|
||||||
step-checkout-electron: &step-checkout-electron
|
step-checkout-electron: &step-checkout-electron
|
||||||
|
@ -704,7 +716,7 @@ step-verify-mksnapshot: &step-verify-mksnapshot
|
||||||
command: |
|
command: |
|
||||||
if [ "$IS_ASAN" != "1" ]; then
|
if [ "$IS_ASAN" != "1" ]; then
|
||||||
cd src
|
cd src
|
||||||
if [ "$TARGET_ARCH" == "arm64" ] &&[ "`uname`" == "Darwin" ]; then
|
if [ "$TARGET_ARCH" == "arm" ] || [ "$TARGET_ARCH" == "arm64" ]; then
|
||||||
python electron/script/verify-mksnapshot.py --source-root "$PWD" --build-dir out/Default --snapshot-files-dir $PWD/cross-arch-snapshots
|
python electron/script/verify-mksnapshot.py --source-root "$PWD" --build-dir out/Default --snapshot-files-dir $PWD/cross-arch-snapshots
|
||||||
else
|
else
|
||||||
python electron/script/verify-mksnapshot.py --source-root "$PWD" --build-dir out/Default
|
python electron/script/verify-mksnapshot.py --source-root "$PWD" --build-dir out/Default
|
||||||
|
@ -829,28 +841,6 @@ step-maybe-cross-arch-snapshot: &step-maybe-cross-arch-snapshot
|
||||||
cp out/Default-mksnapshot-test/*.bin cross-arch-snapshots
|
cp out/Default-mksnapshot-test/*.bin cross-arch-snapshots
|
||||||
fi
|
fi
|
||||||
|
|
||||||
step-maybe-trigger-arm-test: &step-maybe-trigger-arm-test
|
|
||||||
run:
|
|
||||||
name: Trigger an arm test on VSTS if applicable
|
|
||||||
command: |
|
|
||||||
cd src
|
|
||||||
# Only run for non-fork prs
|
|
||||||
if [ "$TRIGGER_ARM_TEST" == "true" ] && [ -z "$CIRCLE_PR_NUMBER" ]; then
|
|
||||||
#Trigger VSTS job, passing along CircleCI job number and branch to build
|
|
||||||
if [ "`uname`" == "Darwin" ]; then
|
|
||||||
if [ x"$MAS_BUILD" == x"true" ]; then
|
|
||||||
export DEVOPS_BUILD="electron-mas-arm64-testing"
|
|
||||||
else
|
|
||||||
export DEVOPS_BUILD="electron-osx-arm64-testing"
|
|
||||||
fi
|
|
||||||
echo "Triggering $DEVOPS_BUILD build on Azure DevOps"
|
|
||||||
node electron/script/release/ci-release-build.js --job=$DEVOPS_BUILD --ci=DevOps --armTest --circleBuildNum=$CIRCLE_BUILD_NUM $CIRCLE_BRANCH
|
|
||||||
else
|
|
||||||
echo "Triggering electron-$TARGET_ARCH-testing build on VSTS"
|
|
||||||
node electron/script/release/ci-release-build.js --job=electron-$TARGET_ARCH-testing --ci=VSTS --armTest --circleBuildNum=$CIRCLE_BUILD_NUM $CIRCLE_BRANCH
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
step-maybe-generate-typescript-defs: &step-maybe-generate-typescript-defs
|
step-maybe-generate-typescript-defs: &step-maybe-generate-typescript-defs
|
||||||
run:
|
run:
|
||||||
name: Generate type declarations
|
name: Generate type declarations
|
||||||
|
@ -1209,7 +1199,7 @@ steps-tests: &steps-tests
|
||||||
(cd electron && node script/yarn test --runners=main --trace-uncaught --enable-logging --files $(circleci tests glob spec-main/*-spec.ts | circleci tests split --split-by=timings)) 2>&1 | $ASAN_SYMBOLIZE
|
(cd electron && node script/yarn test --runners=main --trace-uncaught --enable-logging --files $(circleci tests glob spec-main/*-spec.ts | circleci tests split --split-by=timings)) 2>&1 | $ASAN_SYMBOLIZE
|
||||||
(cd electron && node script/yarn test --runners=remote --trace-uncaught --enable-logging --files $(circleci tests glob spec/*-spec.js | circleci tests split --split-by=timings)) 2>&1 | $ASAN_SYMBOLIZE
|
(cd electron && node script/yarn test --runners=remote --trace-uncaught --enable-logging --files $(circleci tests glob spec/*-spec.js | circleci tests split --split-by=timings)) 2>&1 | $ASAN_SYMBOLIZE
|
||||||
else
|
else
|
||||||
if [ "$TARGET_ARCH" == "arm64" ] &&[ "`uname`" == "Darwin" ]; then
|
if [ "$TARGET_ARCH" == "arm" ] || [ "$TARGET_ARCH" == "arm64" ]; then
|
||||||
export ELECTRON_SKIP_NATIVE_MODULE_TESTS=true
|
export ELECTRON_SKIP_NATIVE_MODULE_TESTS=true
|
||||||
(cd electron && node script/yarn test --runners=main --trace-uncaught --enable-logging)
|
(cd electron && node script/yarn test --runners=main --trace-uncaught --enable-logging)
|
||||||
(cd electron && node script/yarn test --runners=remote --trace-uncaught --enable-logging)
|
(cd electron && node script/yarn test --runners=remote --trace-uncaught --enable-logging)
|
||||||
|
@ -1546,9 +1536,6 @@ commands:
|
||||||
steps:
|
steps:
|
||||||
- *step-save-out-cache
|
- *step-save-out-cache
|
||||||
|
|
||||||
# Trigger tests on arm hardware if needed
|
|
||||||
- *step-maybe-trigger-arm-test
|
|
||||||
|
|
||||||
- *step-maybe-notify-slack-failure
|
- *step-maybe-notify-slack-failure
|
||||||
|
|
||||||
electron-publish:
|
electron-publish:
|
||||||
|
@ -1881,7 +1868,7 @@ jobs:
|
||||||
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:
|
||||||
- electron-build:
|
- electron-build:
|
||||||
persist: false
|
persist: true
|
||||||
checkout: true
|
checkout: true
|
||||||
use-out-cache: false
|
use-out-cache: false
|
||||||
|
|
||||||
|
@ -1933,7 +1920,7 @@ jobs:
|
||||||
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:
|
||||||
- electron-build:
|
- electron-build:
|
||||||
persist: false
|
persist: true
|
||||||
checkout: true
|
checkout: true
|
||||||
use-out-cache: false
|
use-out-cache: false
|
||||||
|
|
||||||
|
@ -2296,6 +2283,24 @@ jobs:
|
||||||
<<: *env-send-slack-notifications
|
<<: *env-send-slack-notifications
|
||||||
<<: *steps-verify-ffmpeg
|
<<: *steps-verify-ffmpeg
|
||||||
|
|
||||||
|
linux-arm-testing-tests:
|
||||||
|
executor: linux-arm
|
||||||
|
environment:
|
||||||
|
<<: *env-arm
|
||||||
|
<<: *env-global
|
||||||
|
<<: *env-headless-testing
|
||||||
|
<<: *env-stack-dumping
|
||||||
|
<<: *steps-tests
|
||||||
|
|
||||||
|
linux-arm64-testing-tests:
|
||||||
|
executor: linux-arm64
|
||||||
|
environment:
|
||||||
|
<<: *env-arm64
|
||||||
|
<<: *env-global
|
||||||
|
<<: *env-headless-testing
|
||||||
|
<<: *env-stack-dumping
|
||||||
|
<<: *steps-tests
|
||||||
|
|
||||||
osx-testing-x64-tests:
|
osx-testing-x64-tests:
|
||||||
executor:
|
executor:
|
||||||
name: macos
|
name: macos
|
||||||
|
@ -2421,8 +2426,23 @@ workflows:
|
||||||
- linux-ia32-testing
|
- linux-ia32-testing
|
||||||
|
|
||||||
- linux-arm-testing
|
- linux-arm-testing
|
||||||
|
- linux-arm-testing-tests:
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
# Do not run this on forked pull requests
|
||||||
|
ignore: /pull\/[0-9]+/
|
||||||
|
requires:
|
||||||
|
- linux-arm-testing
|
||||||
|
|
||||||
- linux-arm64-testing
|
- linux-arm64-testing
|
||||||
|
- linux-arm64-testing-tests:
|
||||||
|
filters:
|
||||||
|
branches:
|
||||||
|
# Do not run this on forked pull requests
|
||||||
|
ignore: /pull\/[0-9]+/
|
||||||
|
requires:
|
||||||
|
- linux-arm64-testing
|
||||||
|
|
||||||
- linux-arm64-testing-gn-check:
|
- linux-arm64-testing-gn-check:
|
||||||
requires:
|
requires:
|
||||||
- linux-checkout-for-workspace
|
- linux-checkout-for-workspace
|
||||||
|
|
|
@ -101,3 +101,4 @@ build_do_not_depend_on_packed_resource_integrity.patch
|
||||||
build_read_idl_files_as_utf8_to_fix_python3_character_encodding.patch
|
build_read_idl_files_as_utf8_to_fix_python3_character_encodding.patch
|
||||||
refactor_restore_base_adaptcallbackforrepeating.patch
|
refactor_restore_base_adaptcallbackforrepeating.patch
|
||||||
hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch
|
hack_to_allow_gclient_sync_with_host_os_mac_on_linux_in_ci.patch
|
||||||
|
don_t_run_pcscan_notifythreadcreated_if_pcscan_is_disabled.patch
|
||||||
|
|
|
@ -0,0 +1,87 @@
|
||||||
|
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
||||||
|
From: John Kleinschmidt <jkleinsc@electronjs.org>
|
||||||
|
Date: Wed, 16 Jun 2021 11:30:28 -0400
|
||||||
|
Subject: Don't run PCScan functions if PCScan is disabled
|
||||||
|
|
||||||
|
PCScan should not be invoked if PCScan is disabled. Upstreamed at https://chromium-review.googlesource.com/c/chromium/src/+/2916657.
|
||||||
|
|
||||||
|
diff --git a/base/allocator/partition_allocator/memory_reclaimer.cc b/base/allocator/partition_allocator/memory_reclaimer.cc
|
||||||
|
index fd846ca91cb17638bf07ca35bf695099174f8f00..5b2ab293ade39b2ecd68d0438034da77417b1e94 100644
|
||||||
|
--- a/base/allocator/partition_allocator/memory_reclaimer.cc
|
||||||
|
+++ b/base/allocator/partition_allocator/memory_reclaimer.cc
|
||||||
|
@@ -121,6 +121,7 @@ void PartitionAllocMemoryReclaimer::Reclaim(int flags) {
|
||||||
|
AutoLock lock(lock_); // Has to protect from concurrent (Un)Register calls.
|
||||||
|
TRACE_EVENT0("base", "PartitionAllocMemoryReclaimer::Reclaim()");
|
||||||
|
|
||||||
|
+#if defined(PA_ALLOW_PCSCAN)
|
||||||
|
// PCScan quarantines freed slots. Trigger the scan first to let it call
|
||||||
|
// FreeNoHooksImmediate on slots that pass the quarantine.
|
||||||
|
//
|
||||||
|
@@ -137,6 +138,7 @@ void PartitionAllocMemoryReclaimer::Reclaim(int flags) {
|
||||||
|
: PCScan::InvocationMode::kBlocking;
|
||||||
|
PCScan::PerformScanIfNeeded(invocation_mode);
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
#if defined(PA_THREAD_CACHE_SUPPORTED)
|
||||||
|
// Don't completely empty the thread cache outside of low memory situations,
|
||||||
|
diff --git a/base/threading/platform_thread_posix.cc b/base/threading/platform_thread_posix.cc
|
||||||
|
index dbf96f68f9d8ca74616af10c236ebe24984b2b5e..5d27063a6b8b88a40a2b12ec5a4e1583fef4af1c 100644
|
||||||
|
--- a/base/threading/platform_thread_posix.cc
|
||||||
|
+++ b/base/threading/platform_thread_posix.cc
|
||||||
|
@@ -40,6 +40,7 @@
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
|
||||||
|
+#include "base/allocator/partition_allocator/partition_alloc_config.h"
|
||||||
|
#include "base/allocator/partition_allocator/starscan/pcscan.h"
|
||||||
|
#include "base/allocator/partition_allocator/starscan/stack/stack.h"
|
||||||
|
#endif
|
||||||
|
@@ -73,7 +74,7 @@ void* ThreadFunc(void* params) {
|
||||||
|
base::ThreadRestrictions::SetSingletonAllowed(false);
|
||||||
|
|
||||||
|
#if !defined(OS_NACL)
|
||||||
|
-#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
|
||||||
|
+#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && defined(PA_ALLOW_PCSCAN)
|
||||||
|
internal::PCScan::NotifyThreadCreated(internal::GetStackPointer());
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@@ -99,7 +100,7 @@ void* ThreadFunc(void* params) {
|
||||||
|
PlatformThread::CurrentHandle().platform_handle(),
|
||||||
|
PlatformThread::CurrentId());
|
||||||
|
|
||||||
|
-#if !defined(OS_NACL) && BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
|
||||||
|
+#if !defined(OS_NACL) && BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && defined(PA_ALLOW_PCSCAN)
|
||||||
|
internal::PCScan::NotifyThreadDestroyed();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
diff --git a/base/threading/platform_thread_win.cc b/base/threading/platform_thread_win.cc
|
||||||
|
index 86e240b231d3236aea1b0343e0e6763282ff70c9..0d85d2acb6652a580f79a2c4ca2277562dd5156b 100644
|
||||||
|
--- a/base/threading/platform_thread_win.cc
|
||||||
|
+++ b/base/threading/platform_thread_win.cc
|
||||||
|
@@ -28,6 +28,7 @@
|
||||||
|
#include <windows.h>
|
||||||
|
|
||||||
|
#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
|
||||||
|
+#include "base/allocator/partition_allocator/partition_alloc_config.h"
|
||||||
|
#include "base/allocator/partition_allocator/starscan/pcscan.h"
|
||||||
|
#include "base/allocator/partition_allocator/starscan/stack/stack.h"
|
||||||
|
#endif
|
||||||
|
@@ -104,7 +105,7 @@ DWORD __stdcall ThreadFunc(void* params) {
|
||||||
|
FALSE,
|
||||||
|
DUPLICATE_SAME_ACCESS);
|
||||||
|
|
||||||
|
-#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
|
||||||
|
+#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && defined(PA_ALLOW_PCSCAN)
|
||||||
|
internal::PCScan::NotifyThreadCreated(internal::GetStackPointer());
|
||||||
|
#endif
|
||||||
|
|
||||||
|
@@ -126,7 +127,7 @@ DWORD __stdcall ThreadFunc(void* params) {
|
||||||
|
PlatformThread::CurrentId());
|
||||||
|
}
|
||||||
|
|
||||||
|
-#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC)
|
||||||
|
+#if BUILDFLAG(USE_PARTITION_ALLOC_AS_MALLOC) && defined(PA_ALLOW_PCSCAN)
|
||||||
|
internal::PCScan::NotifyThreadDestroyed();
|
||||||
|
#endif
|
||||||
|
|
|
@ -137,7 +137,7 @@ describe('version-bumper', () => {
|
||||||
|
|
||||||
// On macOS Circle CI we don't have a real git environment due to running
|
// On macOS Circle CI we don't have a real git environment due to running
|
||||||
// gclient sync on a linux machine. These tests therefore don't run as expected.
|
// gclient sync on a linux machine. These tests therefore don't run as expected.
|
||||||
ifdescribe(!(process.platform === 'linux' && process.arch === 'arm') && process.platform !== 'darwin')('nextVersion', () => {
|
ifdescribe(!(process.platform === 'linux' && process.arch.indexOf('arm') === 0) && process.platform !== 'darwin')('nextVersion', () => {
|
||||||
const nightlyPattern = /[0-9.]*(-nightly.(\d{4})(\d{2})(\d{2}))$/g;
|
const nightlyPattern = /[0-9.]*(-nightly.(\d{4})(\d{2})(\d{2}))$/g;
|
||||||
const betaPattern = /[0-9.]*(-beta[0-9.]*)/g;
|
const betaPattern = /[0-9.]*(-beta[0-9.]*)/g;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue