diff --git a/.circleci/.gitignore b/.circleci/.gitignore deleted file mode 100644 index 2b7d56379cac..000000000000 --- a/.circleci/.gitignore +++ /dev/null @@ -1 +0,0 @@ -config-staging diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 2696006fbd5d..000000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,56 +0,0 @@ -version: 2.1 - -# Required for dynamic configuration -setup: true - -# Orbs -orbs: - path-filtering: circleci/path-filtering@0.1.0 - continuation: circleci/continuation@0.2.0 - -# All input parameters to pass to build config -parameters: - run-docs-only: - type: boolean - default: false - - upload-to-storage: - type: string - default: '1' - - run-build-linux: - type: boolean - default: false - -jobs: - generate-config: - docker: - - image: cimg/node:16.14 - steps: - - checkout - - path-filtering/set-parameters: - base-revision: main - mapping: | - ^((?!docs/).)*$ run-build-linux true - docs/.* run-docs-only true - ^((?!docs/).)*$ run-docs-only false - - run: - command: | - cd .circleci/config - yarn - export CIRCLECI_BINARY="$HOME/circleci" - curl -fLSs https://raw.githubusercontent.com/CircleCI-Public/circleci-cli/main/install.sh | DESTDIR=$CIRCLECI_BINARY bash - node build.js - name: Pack config.yml - - run: - name: Set params - command: node .circleci/config/params.js - - continuation/continue: - configuration_path: .circleci/config-staging/built.yml - parameters: /tmp/pipeline-parameters.json - -# Initial setup workflow -workflows: - setup: - jobs: - - generate-config diff --git a/.circleci/config/base.yml b/.circleci/config/base.yml deleted file mode 100644 index d8412126c88b..000000000000 --- a/.circleci/config/base.yml +++ /dev/null @@ -1,1642 +0,0 @@ -version: 2.1 - -parameters: - run-docs-only: - type: boolean - default: false - - upload-to-storage: - type: string - default: '1' - - run-build-linux: - type: boolean - default: false - - medium-linux-executor: - type: enum - default: electronjs/aks-linux-medium - enum: ["electronjs/aks-linux-medium", "medium"] - - large-linux-executor: - type: enum - default: electronjs/aks-linux-large - enum: ["electronjs/aks-linux-large", "2xlarge"] - -# Executors -executors: - linux-docker: - parameters: - size: - description: "Docker executor size" - type: enum - # aks-linux-large === 32 core - # 2xlarge should not be used directly, use the pipeline param instead - enum: ["medium", "electronjs/aks-linux-medium", "xlarge", "electronjs/aks-linux-large", "2xlarge"] - docker: - - image: ghcr.io/electron/build:9a43c14f5c19be0359843299f79e736521373adc - resource_class: << parameters.size >> - - # Electron Runners - linux-arm: - resource_class: electronjs/aks-linux-arm-test - docker: - - image: ghcr.io/electron/test:arm32v7-8e0f85b708fa58e28e4824954d6fd55adfda5e9e - - linux-arm64: - resource_class: electronjs/aks-linux-arm-test - docker: - - image: ghcr.io/electron/test:arm64v8-76d5d29e247972da3855a01c2d8cf72c5998233a - -# The config expects the following environment variables to be set: -# - "SLACK_WEBHOOK" Slack hook URL to send notifications. -# -# CircleCI docs on variables: -# https://circleci.com/docs/2.0/env-vars/ - -# Build configurations options. -env-testing-build: &env-testing-build - GN_CONFIG: //electron/build/args/testing.gn - CHECK_DIST_MANIFEST: '1' - -env-release-build: &env-release-build - GN_CONFIG: //electron/build/args/release.gn - STRIP_BINARIES: true - GENERATE_SYMBOLS: true - CHECK_DIST_MANIFEST: '1' - IS_RELEASE: true - -env-headless-testing: &env-headless-testing - DISPLAY: ':99.0' - -env-stack-dumping: &env-stack-dumping - ELECTRON_ENABLE_STACK_DUMPING: '1' - -env-browsertests: &env-browsertests - GN_CONFIG: //electron/build/args/native_tests.gn - BUILD_TARGET: electron/spec:chromium_browsertests - TESTS_CONFIG: src/electron/spec/configs/browsertests.yml - -env-unittests: &env-unittests - GN_CONFIG: //electron/build/args/native_tests.gn - BUILD_TARGET: electron/spec:chromium_unittests - TESTS_CONFIG: src/electron/spec/configs/unittests.yml - -env-arm: &env-arm - GN_EXTRA_ARGS: 'target_cpu = "arm"' - MKSNAPSHOT_TOOLCHAIN: //build/toolchain/linux:clang_arm - BUILD_NATIVE_MKSNAPSHOT: 1 - TARGET_ARCH: arm - -env-apple-silicon: &env-apple-silicon - GN_EXTRA_ARGS: 'target_cpu = "arm64"' - TARGET_ARCH: arm64 - npm_config_arch: arm64 - -env-runner: &env-runner - IS_ELECTRON_RUNNER: 1 - -env-arm64: &env-arm64 - GN_EXTRA_ARGS: 'target_cpu = "arm64" fatal_linker_warnings = false enable_linux_installer = false' - MKSNAPSHOT_TOOLCHAIN: //build/toolchain/linux:clang_arm64 - BUILD_NATIVE_MKSNAPSHOT: 1 - TARGET_ARCH: arm64 - -env-mas: &env-mas - GN_EXTRA_ARGS: 'is_mas_build = true' - MAS_BUILD: 'true' - -env-mas-apple-silicon: &env-mas-apple-silicon - GN_EXTRA_ARGS: 'target_cpu = "arm64" is_mas_build = true' - MAS_BUILD: 'true' - TARGET_ARCH: arm64 - npm_config_arch: arm64 - -env-send-slack-notifications: &env-send-slack-notifications - NOTIFY_SLACK: true - -env-global: &env-global - ELECTRON_OUT_DIR: Default - -env-linux-medium: &env-linux-medium - <<: *env-global - NUMBER_OF_NINJA_PROCESSES: 3 - -env-linux-2xlarge: &env-linux-2xlarge - <<: *env-global - NUMBER_OF_NINJA_PROCESSES: 34 - -env-linux-2xlarge-release: &env-linux-2xlarge-release - <<: *env-global - NUMBER_OF_NINJA_PROCESSES: 16 - -env-ninja-status: &env-ninja-status - NINJA_STATUS: "[%r processes, %f/%t @ %o/s : %es] " - -env-32bit-release: &env-32bit-release - # Set symbol level to 1 for 32 bit releases because of https://crbug.com/648948 - GN_BUILDFLAG_ARGS: 'symbol_level = 1' - -# Individual (shared) steps. -step-maybe-notify-slack-failure: &step-maybe-notify-slack-failure - run: - name: Send a Slack notification on failure - command: | - if [ "$NOTIFY_SLACK" == "true" ]; then - export MESSAGE="Build failed for *<$CIRCLE_BUILD_URL|$CIRCLE_JOB>* nightly build from *$CIRCLE_BRANCH*." - curl -g -H "Content-Type: application/json" -X POST \ - -d "{\"text\": \"$MESSAGE\", \"attachments\": [{\"color\": \"#FC5C3C\",\"title\": \"$CIRCLE_JOB nightly build results\",\"title_link\": \"$CIRCLE_BUILD_URL\"}]}" $SLACK_WEBHOOK - fi - when: on_fail - -step-maybe-notify-slack-success: &step-maybe-notify-slack-success - run: - name: Send a Slack notification on success - command: | - if [ "$NOTIFY_SLACK" == "true" ]; then - export MESSAGE="Build succeeded for *<$CIRCLE_BUILD_URL|$CIRCLE_JOB>* nightly build from *$CIRCLE_BRANCH*." - curl -g -H "Content-Type: application/json" -X POST \ - -d "{\"text\": \"$MESSAGE\", \"attachments\": [{\"color\": \"good\",\"title\": \"$CIRCLE_JOB nightly build results\",\"title_link\": \"$CIRCLE_BUILD_URL\"}]}" $SLACK_WEBHOOK - fi - when: on_success - -step-checkout-electron: &step-checkout-electron - checkout: - path: src/electron - -step-depot-tools-get: &step-depot-tools-get - run: - name: Get depot tools - command: | - git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git - 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 - cat > gclient.diff \<< 'EOF' - diff --git a/gclient.py b/gclient.py - index c305c248..e6e0fbdc 100755 - --- a/gclient.py - +++ b/gclient.py - @@ -783,7 +783,8 @@ class Dependency(gclient_utils.WorkItem, DependencySettings): - not condition or "non_git_source" not in condition): - continue - cipd_root = self.GetCipdRoot() - - for package in dep_value.get('packages', []): - + packages = dep_value.get('packages', []) - + for package in (x for x in packages if "infra/3pp/tools/swift-format" not in x.get('package')): - deps_to_add.append( - CipdDependency(parent=self, - name=name, - EOF - git apply --3way gclient.diff - # Ensure depot_tools does not update. - test -d depot_tools && cd depot_tools - touch .disable_auto_update - -step-depot-tools-add-to-path: &step-depot-tools-add-to-path - run: - name: Add depot tools to PATH - command: echo 'export PATH="$PATH:'"$PWD"'/depot_tools"' >> $BASH_ENV - -step-gclient-sync: &step-gclient-sync - run: - name: Gclient sync - command: | - # If we did not restore a complete sync then we need to sync for realz - if [ ! -s "src/electron/.circle-sync-done" ]; then - gclient config \ - --name "src/electron" \ - --unmanaged \ - $GCLIENT_EXTRA_ARGS \ - "$CIRCLE_REPOSITORY_URL" - - ELECTRON_USE_THREE_WAY_MERGE_FOR_PATCHES=1 gclient sync --with_branch_heads --with_tags - if [ "$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 - cd src/electron - git update-index --refresh || true - if ! git diff-index --quiet HEAD --; then - # There are changes to the patches. Make a git commit with the updated patches - git add patches - GIT_COMMITTER_NAME="PatchUp" GIT_COMMITTER_EMAIL="73610968+patchup[bot]@users.noreply.github.com" git commit -m "chore: update patches" --author="PatchUp <73610968+patchup[bot]@users.noreply.github.com>" - # Export it - mkdir -p ../../patches - git format-patch -1 --stdout --keep-subject --no-stat --full-index > ../../patches/update-patches.patch - if (node ./script/push-patch.js 2> /dev/null > /dev/null); then - echo - echo "======================================================================" - echo "Changes to the patches when applying, we have auto-pushed the diff to the current branch" - echo "A new CI job will kick off shortly" - echo "======================================================================" - exit 1 - else - echo - echo "======================================================================" - echo "There were changes to the patches when applying." - echo "Check the CI artifacts for a patch you can apply to fix it." - echo "======================================================================" - exit 1 - fi - fi - fi - fi - -step-setup-env-for-build: &step-setup-env-for-build - run: - name: Setup Environment Variables - command: | - # To find `gn` executable. - echo 'export CHROMIUM_BUILDTOOLS_PATH="'"$PWD"'/src/buildtools"' >> $BASH_ENV - -step-setup-rbe-for-build: &step-setup-rbe-for-build - run: - name: Setup RBE - command: | - echo 'export NUMBER_OF_NINJA_PROCESSES=300' >> $BASH_ENV - if [ "`uname`" == "Darwin" ]; then - echo 'export NUMBER_OF_NINJA_PROCESSES=200' >> $BASH_ENV - echo 'ulimit -n 10000' >> $BASH_ENV - echo 'sudo launchctl limit maxfiles 65536 200000' >> $BASH_ENV - fi - git clone https://github.com/electron/build-tools.git - cd build-tools - npx yarn --ignore-engines - mkdir third_party - # Pull down credential helper and print status - node -e "require('./src/utils/reclient.js').downloadAndPrepare({})" - HELPER=$(node -p "require('./src/utils/reclient.js').helperPath({})") - $HELPER login - echo 'export RBE_service='`node -e "console.log(require('./src/utils/reclient.js').serviceAddress)"` >> $BASH_ENV - echo 'export RBE_experimental_credentials_helper='`node -e "console.log(require('./src/utils/reclient.js').helperPath({}))"` >> $BASH_ENV - echo 'export RBE_experimental_credentials_helper_args="print"' >> $BASH_ENV - -step-restore-brew-cache: &step-restore-brew-cache - restore_cache: - paths: - - /usr/local/Cellar/gnu-tar - - /usr/local/bin/gtar - keys: - - v6-brew-cache-{{ arch }} - -step-save-brew-cache: &step-save-brew-cache - save_cache: - paths: - - /usr/local/Cellar/gnu-tar - - /usr/local/bin/gtar - key: v6-brew-cache-{{ arch }} - name: Persisting brew cache - -step-install-npm-deps: &step-install-npm-deps - run: - name: Install node_modules - command: | - cd src/electron - node script/yarn install --frozen-lockfile - -step-gn-gen-default: &step-gn-gen-default - run: - name: Default GN gen - command: | - cd src - gn gen out/Default --args="import(\"$GN_CONFIG\") use_remoteexec=true $GN_EXTRA_ARGS $GN_BUILDFLAG_ARGS" - -step-gn-check: &step-gn-check - run: - name: GN check - command: | - 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 - # Check the hunspell filenames - node electron/script/gen-hunspell-filenames.js --check - node electron/script/gen-libc++-filenames.js --check - -step-maybe-electron-dist-strip: &step-maybe-electron-dist-strip - run: - name: Strip electron binaries - command: | - if [ "$STRIP_BINARIES" == "true" ] && [ "`uname`" == "Linux" ]; then - if [ x"$TARGET_ARCH" == x ]; then - target_cpu=x64 - else - target_cpu="$TARGET_ARCH" - fi - cd src - electron/script/copy-debug-symbols.py --target-cpu="$target_cpu" --out-dir=out/Default/debug --compress - electron/script/strip-binaries.py --target-cpu="$target_cpu" - electron/script/add-debug-link.py --target-cpu="$target_cpu" --debug-dir=out/Default/debug - fi - -step-electron-chromedriver-build: &step-electron-chromedriver-build - run: - name: Build chromedriver.zip - command: | - cd src - if [ "`uname`" != "Darwin" ] && ([ "$TARGET_ARCH" == "arm" ] || [ "$TARGET_ARCH" == "arm64" ]); then - gn gen out/chromedriver --args="import(\"$GN_CONFIG\") use_remoteexec=true is_component_ffmpeg=false proprietary_codecs=false $GN_EXTRA_ARGS $GN_BUILDFLAG_ARGS" - export CHROMEDRIVER_DIR="out/chromedriver" - else - export CHROMEDRIVER_DIR="out/Default" - fi - autoninja -C $CHROMEDRIVER_DIR electron:electron_chromedriver -j $NUMBER_OF_NINJA_PROCESSES - if [ "`uname`" == "Linux" ]; then - electron/script/strip-binaries.py --target-cpu="$TARGET_ARCH" --file $PWD/$CHROMEDRIVER_DIR/chromedriver - fi - autoninja -C $CHROMEDRIVER_DIR electron:electron_chromedriver_zip - if [ "`uname`" != "Darwin" ] && ([ "$TARGET_ARCH" == "arm" ] || [ "$TARGET_ARCH" == "arm64" ]); then - cp out/chromedriver/chromedriver.zip out/Default - fi - -step-nodejs-headers-build: &step-nodejs-headers-build - run: - name: Build Node.js headers - command: | - cd src - autoninja -C out/Default electron:node_headers - -step-electron-dist-unzip: &step-electron-dist-unzip - run: - name: Unzip dist.zip - command: | - cd src/out/Default - # -o overwrite files WITHOUT prompting - # TODO(alexeykuzmin): Remove '-o' when it's no longer needed. - # -: allows to extract archive members into locations outside - # of the current ``extraction root folder''. - # ASan builds have the llvm-symbolizer binaries listed as - # runtime_deps, with their paths as `../../third_party/...` - # unzip exits with non-zero code on such zip files unless -: is - # passed. - unzip -:o dist.zip - -step-mksnapshot-unzip: &step-mksnapshot-unzip - run: - name: Unzip mksnapshot.zip - command: | - cd src/out/Default - unzip -:o mksnapshot.zip - -step-chromedriver-unzip: &step-chromedriver-unzip - run: - name: Unzip chromedriver.zip - command: | - cd src/out/Default - unzip -:o chromedriver.zip - -step-ffmpeg-gn-gen: &step-ffmpeg-gn-gen - run: - name: ffmpeg GN gen - command: | - cd src - gn gen out/ffmpeg --args="import(\"//electron/build/args/ffmpeg.gn\") use_remoteexec=true $GN_EXTRA_ARGS" - -step-ffmpeg-build: &step-ffmpeg-build - run: - name: Non proprietary ffmpeg build - command: | - cd src - autoninja -C out/ffmpeg electron:electron_ffmpeg_zip -j $NUMBER_OF_NINJA_PROCESSES - -step-verify-mksnapshot: &step-verify-mksnapshot - run: - name: Verify mksnapshot - command: | - if [ "$IS_ASAN" != "1" ]; then - cd src - if [ "`uname`" != "Darwin" ] && ([ "$TARGET_ARCH" == "arm" ] || [ "$TARGET_ARCH" == "arm64" ]); then - python3 electron/script/verify-mksnapshot.py --source-root "$PWD" --build-dir out/Default --snapshot-files-dir $PWD/cross-arch-snapshots - else - python3 electron/script/verify-mksnapshot.py --source-root "$PWD" --build-dir out/Default - fi - fi - -step-verify-chromedriver: &step-verify-chromedriver - run: - name: Verify ChromeDriver - command: | - if [ "$IS_ASAN" != "1" ]; then - cd src - python3 electron/script/verify-chromedriver.py --source-root "$PWD" --build-dir out/Default - fi - -step-setup-linux-for-headless-testing: &step-setup-linux-for-headless-testing - run: - name: Setup for headless testing - command: | - if [ "`uname`" != "Darwin" ]; then - sh -e /etc/init.d/xvfb start - fi - -step-mksnapshot-build: &step-mksnapshot-build - run: - name: mksnapshot build - no_output_timeout: 30m - command: | - cd src - autoninja -C out/Default electron:electron_mksnapshot -j $NUMBER_OF_NINJA_PROCESSES - gn desc out/Default v8:run_mksnapshot_default args > out/Default/mksnapshot_args - # Remove unused args from mksnapshot_args - SEDOPTION="-i" - if [ "`uname`" == "Darwin" ]; then - SEDOPTION="-i ''" - fi - sed $SEDOPTION '/.*builtins-pgo/d' out/Default/mksnapshot_args - 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`" != "Darwin" ]; then - if [ "$TARGET_ARCH" == "arm" ]; then - electron/script/strip-binaries.py --file $PWD/out/Default/clang_x86_v8_arm/mksnapshot - electron/script/strip-binaries.py --file $PWD/out/Default/clang_x86_v8_arm/v8_context_snapshot_generator - elif [ "$TARGET_ARCH" == "arm64" ]; then - electron/script/strip-binaries.py --file $PWD/out/Default/clang_x64_v8_arm64/mksnapshot - electron/script/strip-binaries.py --file $PWD/out/Default/clang_x64_v8_arm64/v8_context_snapshot_generator - else - electron/script/strip-binaries.py --file $PWD/out/Default/mksnapshot - electron/script/strip-binaries.py --file $PWD/out/Default/v8_context_snapshot_generator - fi - fi - if [ "$SKIP_DIST_ZIP" != "1" ]; then - autoninja -C out/Default electron:electron_mksnapshot_zip -j $NUMBER_OF_NINJA_PROCESSES - (cd out/Default; zip mksnapshot.zip mksnapshot_args gen/v8/embedded.S) - fi - -step-hunspell-build: &step-hunspell-build - run: - name: hunspell build - command: | - cd src - if [ "$SKIP_DIST_ZIP" != "1" ]; then - autoninja -C out/Default electron:hunspell_dictionaries_zip -j $NUMBER_OF_NINJA_PROCESSES - fi - -step-maybe-generate-libcxx: &step-maybe-generate-libcxx - run: - name: maybe generate libcxx - command: | - cd src - if [ "`uname`" == "Linux" ]; then - autoninja -C out/Default electron:libcxx_headers_zip -j $NUMBER_OF_NINJA_PROCESSES - autoninja -C out/Default electron:libcxxabi_headers_zip -j $NUMBER_OF_NINJA_PROCESSES - autoninja -C out/Default electron:libcxx_objects_zip -j $NUMBER_OF_NINJA_PROCESSES - fi - -step-maybe-generate-breakpad-symbols: &step-maybe-generate-breakpad-symbols - run: - name: Generate breakpad symbols - no_output_timeout: 30m - command: | - if [ "$GENERATE_SYMBOLS" == "true" ]; then - cd src - autoninja -C out/Default electron:electron_symbols - fi - -step-maybe-zip-symbols: &step-maybe-zip-symbols - run: - name: Zip symbols - command: | - cd src - export BUILD_PATH="$PWD/out/Default" - autoninja -C out/Default electron:licenses - autoninja -C out/Default electron:electron_version_file - electron/script/zip-symbols.py -b $BUILD_PATH - -step-maybe-zip-symbols-and-clean: &step-maybe-zip-symbols-and-clean - run: - name: Zip symbols - command: | - cd src - export BUILD_PATH="$PWD/out/Default" - autoninja -C out/Default electron:licenses - autoninja -C out/Default electron:electron_version_file - DELETE_DSYMS_AFTER_ZIP=1 electron/script/zip-symbols.py -b $BUILD_PATH - -step-maybe-cross-arch-snapshot: &step-maybe-cross-arch-snapshot - run: - name: Generate cross arch snapshot (arm/arm64) - command: | - if [ "$GENERATE_CROSS_ARCH_SNAPSHOT" == "true" ] && [ -z "$CIRCLE_PR_NUMBER" ]; then - cd src - if [ "$TARGET_ARCH" == "arm" ]; then - export MKSNAPSHOT_PATH="clang_x86_v8_arm" - elif [ "$TARGET_ARCH" == "arm64" ]; then - export MKSNAPSHOT_PATH="clang_x64_v8_arm64" - fi - cp "out/Default/$MKSNAPSHOT_PATH/mksnapshot" out/Default - cp "out/Default/$MKSNAPSHOT_PATH/v8_context_snapshot_generator" out/Default - if [ "`uname`" == "Linux" ]; then - cp "out/Default/$MKSNAPSHOT_PATH/libffmpeg.so" out/Default - elif [ "`uname`" == "Darwin" ]; then - cp "out/Default/$MKSNAPSHOT_PATH/libffmpeg.dylib" out/Default - fi - python3 electron/script/verify-mksnapshot.py --source-root "$PWD" --build-dir out/Default --create-snapshot-only - mkdir cross-arch-snapshots - cp out/Default-mksnapshot-test/*.bin cross-arch-snapshots - # Clean up so that ninja does not get confused - if [ "`uname`" == "Linux" ]; then - rm -f out/Default/libffmpeg.so - elif [ "`uname`" == "Darwin" ]; then - rm -f out/Default/libffmpeg.dylib - fi - fi - -step-maybe-generate-typescript-defs: &step-maybe-generate-typescript-defs - run: - name: Generate type declarations - command: | - if [ "`uname`" == "Darwin" ]; then - cd src/electron - node script/yarn create-typescript-definitions - fi - -step-fix-known-hosts-linux: &step-fix-known-hosts-linux - run: - name: Fix Known Hosts on Linux - command: | - if [ "`uname`" == "Linux" ]; then - ./src/electron/.circleci/fix-known-hosts.sh - fi - -# Checkout Steps -step-generate-deps-hash: &step-generate-deps-hash - run: - name: Generate DEPS Hash - command: node src/electron/script/generate-deps-hash.js && cat src/electron/.depshash-target - -step-touch-sync-done: &step-touch-sync-done - run: - name: Touch Sync Done - command: touch src/electron/.circle-sync-done - -# Restore exact src cache based on the hash of DEPS and patches/* -# If no cache is matched EXACTLY then the .circle-sync-done file is empty -# If a cache is matched EXACTLY then the .circle-sync-done file contains "done" -step-maybe-restore-src-cache: &step-maybe-restore-src-cache - restore_cache: - keys: - - v17-src-cache-{{ checksum "src/electron/.depshash" }} - name: Restoring src cache -step-maybe-restore-src-cache-marker: &step-maybe-restore-src-cache-marker - restore_cache: - keys: - - v17-src-cache-marker-{{ checksum "src/electron/.depshash" }} - name: Restoring src cache marker - -step-maybe-restore-src-cache-aks: &step-maybe-restore-src-cache-aks - restore_cache_aks: - step-name: Restoring src cache - cache_key: v17-src-cache-$(shasum src/electron/.depshash | cut -f1 -d' ') - cache_path: /var/portal - -step-maybe-restore-src-cache-marker-aks: &step-maybe-restore-src-cache-marker-aks - restore_cache_aks: - step-name: Restoring src cache marker - cache_key: v17-src-cache-marker-$(shasum src/electron/.depshash | cut -f1 -d' ') - cache_path: "." - -# Restore exact or closest git cache based on the hash of DEPS and .circle-sync-done -# If the src cache was restored above then this will match an empty cache -# If the src cache was not restored above then this will match a close git cache -step-maybe-restore-git-cache: &step-maybe-restore-git-cache - restore_cache: - paths: - - git-cache - keys: - - v1-git-cache-{{ checksum "src/electron/.circle-sync-done" }}-{{ checksum "src/electron/DEPS" }} - - v1-git-cache-{{ checksum "src/electron/.circle-sync-done" }} - name: Conditionally restoring git cache - -step-maybe-restore-git-cache-aks: &step-maybe-restore-git-cache-aks - restore_cache_aks: - step-name: Conditionally restoring git cache (aks) - cache_key: v1-git-cache-$(shasum src/electron/.circle-sync-done | cut -f1 -d' ')-$(shasum src/electron/DEPS | cut -f1 -d' ') v1-git-cache-$(shasum src/electron/.circle-sync-done | cut -f1 -d' ') - cache_path: git-cache - -step-set-git-cache-path: &step-set-git-cache-path - run: - name: Set GIT_CACHE_PATH to make gclient to use the cache - command: | - # CircleCI does not support interpolation when setting environment variables. - # https://circleci.com/docs/2.0/env-vars/#setting-an-environment-variable-in-a-shell-command - echo 'export GIT_CACHE_PATH="$PWD/git-cache"' >> $BASH_ENV - -# Persist the git cache based on the hash of DEPS and .circle-sync-done -# If the src cache was restored above then this will persist an empty cache -step-save-git-cache: &step-save-git-cache - save_cache: - paths: - - git-cache - key: v1-git-cache-{{ checksum "src/electron/.circle-sync-done" }}-{{ checksum "src/electron/DEPS" }} - name: Persisting git cache - -step-save-git-cache-aks: &step-save-git-cache-aks - save_cache_aks: - step-name: Persisting git cache (AKS) - cache_key: v1-git-cache-$(shasum src/electron/.circle-sync-done | cut -f1 -d' ')-$(shasum src/electron/DEPS | cut -f1 -d' ') - cache_path: git-cache - -step-run-electron-only-hooks: &step-run-electron-only-hooks - run: - name: Run Electron Only Hooks - command: gclient runhooks --spec="solutions=[{'name':'src/electron','url':None,'deps_file':'DEPS','custom_vars':{'process_deps':False},'managed':False}]" - -step-generate-deps-hash-cleanly: &step-generate-deps-hash-cleanly - run: - name: Generate DEPS Hash - command: (cd src/electron && git checkout .) && node src/electron/script/generate-deps-hash.js && cat src/electron/.depshash-target - -# Mark the sync as done for future cache saving -step-mark-sync-done: &step-mark-sync-done - run: - name: Mark Sync Done - command: echo DONE > src/electron/.circle-sync-done - -# Minimize the size of the cache -step-minimize-workspace-size-from-checkout: &step-minimize-workspace-size-from-checkout - run: - name: Remove some unused data to avoid storing it in the workspace/cache - command: | - rm -rf src/android_webview - rm -rf src/ios/chrome - rm -rf src/third_party/blink/web_tests - rm -rf src/third_party/blink/perf_tests - rm -rf third_party/electron_node/deps/openssl - rm -rf third_party/electron_node/deps/v8 - rm -rf chrome/test/data/xr/webvr_info - rm -rf src/third_party/angle/third_party/VK-GL-CTS/src - rm -rf src/third_party/swift-toolchain - rm -rf src/third_party/swiftshader/tests/regres/testlists - -# Save the src cache based on the deps hash -step-save-src-cache: &step-save-src-cache - save_cache: - paths: - - /var/portal - key: v17-src-cache-{{ checksum "/var/portal/src/electron/.depshash" }} - name: Persisting src cache -step-make-src-cache-marker: &step-make-src-cache-marker - run: - name: Making src cache marker - command: touch .src-cache-marker -step-save-src-cache-marker: &step-save-src-cache-marker - save_cache: - paths: - - .src-cache-marker - key: v17-src-cache-marker-{{ checksum "/var/portal/src/electron/.depshash" }} -step-save-src-cache-aks: &step-save-src-cache-aks - save_cache_aks: - step-name: Persisting src cache (aks) - cache_key: v17-src-cache-$(shasum /var/portal/src/electron/.depshash | cut -f1 -d' ') - cache_path: /var/portal -step-save-src-cache-marker-aks: &step-save-src-cache-marker-aks - save_cache_aks: - step-name: Persisting src cache marker (aks) - cache_key: v17-src-cache-marker-$(shasum /var/portal/src/electron/.depshash | cut -f1 -d' ') - cache_path: .src-cache-marker - -step-maybe-early-exit-no-doc-change: &step-maybe-early-exit-no-doc-change - run: - name: Shortcircuit job if change is not doc only - command: | - if [ ! -s src/electron/.skip-ci-build ]; then - circleci-agent step halt - fi - -step-ts-compile: &step-ts-compile - run: - name: Run TS/JS compile on doc only change - command: | - cd src/electron - node script/yarn create-typescript-definitions - node script/yarn tsc -p tsconfig.default_app.json --noEmit - for f in build/webpack/*.js - do - out="${f:29}" - if [ "$out" != "base.js" ]; then - node script/yarn webpack --config $f --output-filename=$out --output-path=./.tmp --env mode=development - fi - done - -# List of all steps. -steps-electron-ts-compile-for-doc-change: &steps-electron-ts-compile-for-doc-change - steps: - # Checkout - Copied from steps-checkout - - *step-checkout-electron - - *step-install-npm-deps - - #Compile ts/js to verify doc change didn't break anything - - *step-ts-compile - -# Command Aliases -commands: - aks-specific-step: - parameters: - circle: - type: steps - aks: - type: steps - could-be-aks: - type: boolean - description: Only set this to true on linux hosts - steps: - - when: - condition: - or: - - equal: [<< parameters.could-be-aks >>, false] - - equal: [<< pipeline.parameters.large-linux-executor >>, 2xlarge] - steps: << parameters.circle >> - - when: - condition: - and: - - equal: [<< parameters.could-be-aks >>, true] - - equal: [<< pipeline.parameters.large-linux-executor >>, electronjs/aks-linux-large] - steps: << parameters.aks >> - save_cache_aks: - parameters: - step-name: - type: string - cache_key: - type: string - cache_path: - type: string - steps: - - run: - name: << parameters.step-name >> - command: | - cache_key="<< parameters.cache_key >>" - final_cache_path=/mnt/cross-instance-cache/${cache_key}.tar - echo "Using cache key: $cache_key" - echo "Checking path: $final_cache_path" - if [ ! -f "$final_cache_path" ]; then - echo "Cache key not founding, storing tarball" - tmp_container=/mnt/cross-instance-cache/tmp/$CIRCLE_WORKFLOW_JOB_ID - tmp_cache_path=$tmp_container/${cache_key}.tar - mkdir -p $tmp_container - if [ -f "<< parameters.cache_path >>" ]; then - tar -cf $tmp_cache_path -C $(dirname << parameters.cache_path >>) ./$(basename << parameters.cache_path >>) - else - tar -cf $tmp_cache_path -C << parameters.cache_path >>/ ./ - fi - mv -vn $tmp_cache_path $final_cache_path - rm -rf $tmp_container - else - echo "Cache key already exists, skipping.." - fi - restore_cache_aks: - parameters: - step-name: - type: string - cache_key: - type: string - cache_path: - type: string - steps: - - run: - name: << parameters.step-name >> - command: | - df -h - for cache_key in << parameters.cache_key >>; do - cache_path=/mnt/cross-instance-cache/${cache_key}.tar - echo "Using cache key: $cache_key" - echo "Checking path: $cache_path" - if [ ! -f "$cache_path" ]; then - echo "Cache key not found, nothing to restore..." - else - echo "Cache key found, restoring to path..." - mkdir -p << parameters.cache_path >>/ - tar -xf /mnt/cross-instance-cache/${cache_key}.tar -C << parameters.cache_path >>/ - exit 0 - fi - done - maybe-restore-portaled-src-cache: - parameters: - halt-if-successful: - type: boolean - default: false - could-be-aks: - type: boolean - steps: - - run: - name: Prepare for cross-OS sync restore - command: | - sudo mkdir -p /var/portal - sudo chown -R $(id -u):$(id -g) /var/portal - - when: - condition: << parameters.halt-if-successful >> - steps: - - aks-specific-step: - circle: - - *step-maybe-restore-src-cache-marker - aks: - - *step-maybe-restore-src-cache-marker-aks - could-be-aks: << parameters.could-be-aks >> - - run: - name: Halt the job early if the src cache exists - command: | - if [ -f ".src-cache-marker" ]; then - circleci-agent step halt - fi - - aks-specific-step: - circle: - - *step-maybe-restore-src-cache - aks: - - *step-maybe-restore-src-cache-aks - could-be-aks: << parameters.could-be-aks >> - - run: - name: Fix the src cache restore point - command: | - if [ -d "/var/portal/src" ]; then - echo Relocating Cache - rm -rf src - mv /var/portal/src ./ - fi - run-gn-check: - parameters: - could-be-aks: - type: boolean - steps: - - *step-setup-rbe-for-build - - checkout-from-cache: - could-be-aks: << parameters.could-be-aks >> - - *step-setup-env-for-build - - *step-gn-gen-default - - *step-gn-check - build_and_save_artifacts: - parameters: - artifact-key: - type: string - build-type: - type: string - build-nonproprietary-ffmpeg: - type: boolean - default: true - steps: - - *step-gn-gen-default - - ninja_build_electron: - clean-prebuilt-snapshot: false - build-type: << parameters.build-type >> - - *step-maybe-electron-dist-strip - - step-electron-dist-build: - additional-targets: electron:node_headers third_party/electron_node:overlapped-checker electron:hunspell_dictionaries_zip - - # mksnapshot - - *step-mksnapshot-build - - *step-maybe-cross-arch-snapshot - - # chromedriver - - *step-electron-chromedriver-build - - - when: - condition: << parameters.build-nonproprietary-ffmpeg >> - steps: - # ffmpeg - - *step-ffmpeg-gn-gen - - *step-ffmpeg-build - - - *step-maybe-generate-breakpad-symbols - - *step-maybe-zip-symbols - - - move_and_store_all_artifacts: - artifact-key: << parameters.artifact-key >> - - move_and_store_all_artifacts: - parameters: - artifact-key: - type: string - steps: - - run: - name: Move all generated artifacts to upload folder - command: | - rm -rf generated_artifacts_<< parameters.artifact-key >> - mkdir generated_artifacts_<< parameters.artifact-key >> - mv_if_exist() { - if [ -f "$1" ] || [ -d "$1" ]; then - echo Storing $1 - mv $1 generated_artifacts_<< parameters.artifact-key >> - else - echo Skipping $1 - It is not present on disk - fi - } - cp_if_exist() { - if [ -f "$1" ] || [ -d "$1" ]; then - echo Storing $1 - cp $1 generated_artifacts_<< parameters.artifact-key >> - else - echo Skipping $1 - It is not present on disk - fi - } - mv_if_exist src/out/Default/dist.zip - mv_if_exist src/out/Default/gen/node_headers.tar.gz - mv_if_exist src/out/Default/symbols.zip - mv_if_exist src/out/Default/mksnapshot.zip - mv_if_exist src/out/Default/chromedriver.zip - mv_if_exist src/out/ffmpeg/ffmpeg.zip - mv_if_exist src/out/Default/hunspell_dictionaries.zip - mv_if_exist src/cross-arch-snapshots - cp_if_exist src/out/electron_ninja_log - cp_if_exist src/out/Default/.ninja_log - when: always - - store_artifacts: - path: generated_artifacts_<< parameters.artifact-key >> - destination: ./<< parameters.artifact-key >> - - store_artifacts: - path: generated_artifacts_<< parameters.artifact-key >>/cross-arch-snapshots - destination: << parameters.artifact-key >>/cross-arch-snapshots - - restore_build_artifacts: - parameters: - artifact-key: - type: string - steps: - - attach_workspace: - at: . - - run: - name: Restore key specific artifacts - command: | - mv_if_exist() { - if [ -f "generated_artifacts_<< parameters.artifact-key >>/$1" ] || [ -d "generated_artifacts_<< parameters.artifact-key >>/$1" ]; then - echo Restoring $1 to $2 - mkdir -p $2 - mv generated_artifacts_<< parameters.artifact-key >>/$1 $2 - else - echo Skipping $1 - It is not present on disk - fi - } - mv_if_exist dist.zip src/out/Default - mv_if_exist node_headers.tar.gz src/out/Default/gen - mv_if_exist symbols.zip src/out/Default - mv_if_exist mksnapshot.zip src/out/Default - mv_if_exist chromedriver.zip src/out/Default - mv_if_exist ffmpeg.zip src/out/ffmpeg - mv_if_exist hunspell_dictionaries.zip src/out/Default - mv_if_exist cross-arch-snapshots src - - checkout-from-cache: - parameters: - could-be-aks: - type: boolean - steps: - - *step-checkout-electron - - *step-depot-tools-get - - *step-depot-tools-add-to-path - - *step-generate-deps-hash - - maybe-restore-portaled-src-cache: - could-be-aks: << parameters.could-be-aks >> - - run: - name: Ensure src checkout worked - command: | - if [ ! -d "src/third_party/blink" ]; then - echo src cache was not restored for some reason, idk what happened here... - exit 1 - fi - - run: - name: Wipe Electron - command: rm -rf src/electron - - *step-checkout-electron - - *step-run-electron-only-hooks - - *step-generate-deps-hash-cleanly - - step-electron-dist-build: - parameters: - additional-targets: - type: string - default: '' - steps: - - run: - name: Build dist.zip - command: | - cd src - if [ "$SKIP_DIST_ZIP" != "1" ]; then - autoninja -C out/Default electron:electron_dist_zip << parameters.additional-targets >> -j $NUMBER_OF_NINJA_PROCESSES - if [ "$CHECK_DIST_MANIFEST" == "1" ]; then - if [ "`uname`" == "Linux" ]; then - target_os=linux - if [ x"$TARGET_ARCH" == x ]; then - target_cpu=x64 - else - target_cpu="$TARGET_ARCH" - fi - else - echo "Unknown system: `uname`" - exit 1 - fi - electron/script/zip_manifests/check-zip-manifest.py out/Default/dist.zip electron/script/zip_manifests/dist_zip.$target_os.$target_cpu.manifest - fi - fi - - ninja_build_electron: - parameters: - clean-prebuilt-snapshot: - type: boolean - default: true - build-type: - type: string - - steps: - - run: - name: Electron << parameters.build-type >> build - no_output_timeout: 60m - command: | - cd src - NINJA_SUMMARIZE_BUILD=1 autoninja -C out/Default electron -j $NUMBER_OF_NINJA_PROCESSES - cp out/Default/.ninja_log out/electron_ninja_log - node electron/script/check-symlinks.js - - electron-build: - parameters: - attach: - type: boolean - default: false - persist: - type: boolean - default: true - persist-checkout: - type: boolean - default: false - checkout: - type: boolean - default: true - checkout-and-assume-cache: - type: boolean - default: false - save-git-cache: - type: boolean - default: false - checkout-to-create-src-cache: - type: boolean - default: false - build: - type: boolean - default: true - restore-src-cache: - type: boolean - default: true - build-nonproprietary-ffmpeg: - type: boolean - default: true - artifact-key: - type: string - build-type: - type: string - after-build-and-save: - type: steps - default: [] - after-persist: - type: steps - default: [] - could-be-aks: - type: boolean - steps: - - when: - condition: << parameters.attach >> - steps: - - attach_workspace: - at: . - - run: rm -rf src/electron - - *step-restore-brew-cache - - *step-save-brew-cache - - when: - condition: << parameters.build >> - steps: - - *step-setup-rbe-for-build - - when: - condition: << parameters.checkout-and-assume-cache >> - steps: - - checkout-from-cache: - could-be-aks: << parameters.could-be-aks >> - - when: - condition: << parameters.checkout >> - steps: - # Checkout - Copied from steps-checkout - - *step-checkout-electron - - *step-depot-tools-get - - *step-depot-tools-add-to-path - - *step-generate-deps-hash - - *step-touch-sync-done - - when: - condition: << parameters.restore-src-cache >> - steps: - - maybe-restore-portaled-src-cache: - halt-if-successful: << parameters.checkout-to-create-src-cache >> - could-be-aks: << parameters.could-be-aks >> - - aks-specific-step: - circle: - - *step-maybe-restore-git-cache - aks: - - *step-maybe-restore-git-cache-aks - could-be-aks: << parameters.could-be-aks >> - - *step-set-git-cache-path - - *step-fix-known-hosts-linux - # This sync call only runs if .circle-sync-done is an EMPTY file - - *step-gclient-sync - - store_artifacts: - path: patches - # These next few steps reset Electron to the correct commit regardless of which cache was restored - - run: - name: Wipe Electron - command: rm -rf src/electron - - *step-checkout-electron - - *step-run-electron-only-hooks - - *step-generate-deps-hash-cleanly - - *step-touch-sync-done - - when: - condition: << parameters.save-git-cache >> - steps: - - aks-specific-step: - circle: - - *step-save-git-cache - aks: - - *step-save-git-cache-aks - could-be-aks: << parameters.could-be-aks >> - # Mark sync as done _after_ saving the git cache so that it is uploaded - # only when the src cache was not present - # Their are theoretically two cases for this cache key - # 1. `vX-git-cache-DONE-{deps_hash} - # 2. `vX-git-cache-EMPTY-{deps_hash} - # - # Case (1) occurs when the flag file has "DONE" in it - # which only occurs when "step-mark-sync-done" is run - # or when the src cache was restored successfully as that - # flag file contains "DONE" in the src cache. - # - # Case (2) occurs when the flag file is empty, this occurs - # when the src cache was not restored and "step-mark-sync-done" - # has not run yet. - # - # Notably both of these cases also have completely different - # gclient cache states. - # In (1) the git cache is completely empty as we didn't run - # "gclient sync" because the src cache was restored. - # In (2) the git cache is full as we had to run "gclient sync" - # - # This allows us to do make the follow transitive assumption: - # In cases where the src cache is restored, saving the git cache - # will save an empty cache. In cases where the src cache is built - # during this build the git cache will save a full cache. - # - # In order words if there is a src cache for a given DEPS hash - # the git cache restored will be empty. But if the src cache - # is missing we will restore a useful git cache. - - *step-mark-sync-done - - *step-minimize-workspace-size-from-checkout - - when: - condition: << parameters.persist-checkout >> - steps: - - persist_to_workspace: - root: . - paths: - - depot_tools - - src - - when: - condition: << parameters.checkout-to-create-src-cache >> - steps: - - run: - name: Move src folder to the cross-OS portal - command: | - sudo mkdir -p /var/portal - sudo chown -R $(id -u):$(id -g) /var/portal - mv ./src /var/portal - - aks-specific-step: - circle: - - *step-save-src-cache - aks: - - *step-save-src-cache-aks - could-be-aks: << parameters.could-be-aks >> - - *step-make-src-cache-marker - - aks-specific-step: - circle: - - *step-save-src-cache-marker - aks: - - *step-save-src-cache-marker-aks - could-be-aks: << parameters.could-be-aks >> - - - when: - condition: << parameters.build >> - steps: - - *step-depot-tools-add-to-path - - *step-setup-env-for-build - - - when: - condition: << parameters.build >> - steps: - - build_and_save_artifacts: - artifact-key: << parameters.artifact-key >> - build-type: << parameters.build-type >> - build-nonproprietary-ffmpeg: << parameters.build-nonproprietary-ffmpeg >> - - steps: << parameters.after-build-and-save >> - - # Save all data needed for a further tests run. - - when: - condition: << parameters.persist >> - steps: - - *step-minimize-workspace-size-from-checkout - - run: | - rm -rf src/third_party/electron_node/deps/openssl - rm -rf src/third_party/electron_node/deps/v8 - - persist_to_workspace: - root: . - paths: - # Build artifacts - - generated_artifacts_<< parameters.artifact-key >> - - src/out/Default/gen/node_headers - - src/out/Default/overlapped-checker - - 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/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 - - steps: << parameters.after-persist >> - - - when: - condition: << parameters.build >> - steps: - - *step-maybe-notify-slack-failure - - when: - condition: << parameters.could-be-aks >> - steps: - - run: - name: Wait for active debug sessions - command: | - while [ -f /var/.ssh-lock ] - do - sleep 60 - done - no_output_timeout: 2h - when: always - - electron-tests: - parameters: - artifact-key: - type: string - steps: - - restore_build_artifacts: - artifact-key: << parameters.artifact-key >> - - *step-depot-tools-add-to-path - - *step-electron-dist-unzip - - *step-mksnapshot-unzip - - *step-chromedriver-unzip - - *step-setup-linux-for-headless-testing - - *step-restore-brew-cache - - *step-fix-known-hosts-linux - - - run: - name: Run Electron tests - environment: - MOCHA_REPORTER: mocha-multi-reporters - ELECTRON_TEST_RESULTS_DIR: junit - MOCHA_MULTI_REPORTERS: mocha-junit-reporter, tap - ELECTRON_DISABLE_SECURITY_WARNINGS: 1 - command: | - cd src - if [ "$IS_ASAN" == "1" ]; then - ASAN_SYMBOLIZE="$PWD/tools/valgrind/asan/asan_symbolize.py --executable-path=$PWD/out/Default/electron" - export ASAN_OPTIONS="symbolize=0 handle_abort=1" - export G_SLICE=always-malloc - export NSS_DISABLE_ARENA_FREE_LIST=1 - export NSS_DISABLE_UNLOAD=1 - export LLVM_SYMBOLIZER_PATH=$PWD/third_party/llvm-build/Release+Asserts/bin/llvm-symbolizer - export MOCHA_TIMEOUT=180000 - echo "Piping output to ASAN_SYMBOLIZE ($ASAN_SYMBOLIZE)" - (cd electron && (circleci tests glob "spec/*-spec.ts" | xargs -I@ -P4 bash -c "echo $(pwd)/@" | circleci tests run --command="xargs node script/yarn test --runners=main --trace-uncaught --enable-logging --files" --split-by=timings 2>&1)) | $ASAN_SYMBOLIZE - else - if [ "$TARGET_ARCH" == "arm" ] || [ "$TARGET_ARCH" == "arm64" ]; then - export ELECTRON_SKIP_NATIVE_MODULE_TESTS=true - fi - if [ "$TARGET_ARCH" == "ia32" ]; then - npm_config_arch=x64 node electron/node_modules/dugite/script/download-git.js - fi - (cd electron && (circleci tests glob "spec/*-spec.ts" | xargs -I@ -P4 bash -c "echo $(pwd)/@" | circleci tests run --command="xargs node script/yarn test --runners=main --trace-uncaught --enable-logging --files" --split-by=timings)) - fi - - store_test_results: - path: src/junit - - store_artifacts: - path: src/electron/spec/artifacts - - - *step-verify-mksnapshot - - *step-verify-chromedriver - - - *step-maybe-notify-slack-failure - - nan-tests: - parameters: - artifact-key: - type: string - steps: - - restore_build_artifacts: - artifact-key: << parameters.artifact-key >> - - *step-depot-tools-add-to-path - - *step-electron-dist-unzip - - *step-setup-linux-for-headless-testing - - *step-fix-known-hosts-linux - - run: - name: Run Nan Tests - command: | - cd src - node electron/script/nan-spec-runner.js - - node-tests: - parameters: - artifact-key: - type: string - steps: - - restore_build_artifacts: - artifact-key: << parameters.artifact-key >> - - *step-depot-tools-add-to-path - - *step-electron-dist-unzip - - *step-setup-linux-for-headless-testing - - *step-fix-known-hosts-linux - - run: - name: Run Node Tests - command: | - cd src - node electron/script/node-spec-runner.js --default --jUnitDir=junit - - store_test_results: - path: src/junit - -# List of all jobs. -jobs: - # Layer 0: Docs. Standalone. - ts-compile-doc-change: - executor: - name: linux-docker - size: medium - environment: - <<: *env-linux-2xlarge - <<: *env-testing-build - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' - <<: *steps-electron-ts-compile-for-doc-change - - # Layer 1: Checkout. - linux-make-src-cache: - executor: - name: linux-docker - size: << pipeline.parameters.large-linux-executor >> - environment: - <<: *env-linux-2xlarge - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' - steps: - - electron-build: - persist: false - build: false - checkout: true - save-git-cache: true - checkout-to-create-src-cache: true - artifact-key: 'nil' - build-type: 'nil' - could-be-aks: true - - # Layer 2: Builds. - linux-x64-testing: - executor: - name: linux-docker - size: << pipeline.parameters.large-linux-executor >> - environment: - <<: *env-global - <<: *env-testing-build - <<: *env-ninja-status - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' - steps: - - electron-build: - persist: true - checkout: false - checkout-and-assume-cache: true - artifact-key: 'linux-x64' - build-type: 'Linux' - could-be-aks: true - - linux-x64-testing-asan: - executor: - name: linux-docker - size: << pipeline.parameters.large-linux-executor >> - environment: - <<: *env-global - <<: *env-testing-build - <<: *env-ninja-status - CHECK_DIST_MANIFEST: '0' - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' - GN_EXTRA_ARGS: 'is_asan = true' - steps: - - electron-build: - persist: true - checkout: false - checkout-and-assume-cache: true - build-nonproprietary-ffmpeg: false - artifact-key: 'linux-x64-asan' - build-type: 'Linux' - could-be-aks: true - - linux-x64-testing-gn-check: - executor: - name: linux-docker - size: << pipeline.parameters.medium-linux-executor >> - environment: - <<: *env-linux-medium - <<: *env-testing-build - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' - steps: - - run-gn-check: - could-be-aks: true - - linux-arm-testing: - executor: - name: linux-docker - size: << pipeline.parameters.large-linux-executor >> - environment: - <<: *env-global - <<: *env-arm - <<: *env-testing-build - <<: *env-ninja-status - TRIGGER_ARM_TEST: true - GENERATE_CROSS_ARCH_SNAPSHOT: true - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' - steps: - - electron-build: - persist: true - checkout: false - checkout-and-assume-cache: true - artifact-key: 'linux-arm' - build-type: 'Linux ARM' - could-be-aks: true - - linux-arm64-testing: - executor: - name: linux-docker - size: << pipeline.parameters.large-linux-executor >> - environment: - <<: *env-global - <<: *env-arm64 - <<: *env-testing-build - <<: *env-ninja-status - TRIGGER_ARM_TEST: true - GENERATE_CROSS_ARCH_SNAPSHOT: true - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' - steps: - - electron-build: - persist: true - checkout: false - checkout-and-assume-cache: true - artifact-key: 'linux-arm64' - build-type: 'Linux ARM64' - could-be-aks: true - - linux-arm64-testing-gn-check: - executor: - name: linux-docker - size: << pipeline.parameters.medium-linux-executor >> - environment: - <<: *env-linux-medium - <<: *env-arm64 - <<: *env-testing-build - GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True' - steps: - - run-gn-check: - could-be-aks: true - - # Layer 3: Tests. - linux-x64-testing-tests: - executor: - name: linux-docker - size: medium - environment: - <<: *env-linux-medium - <<: *env-headless-testing - <<: *env-stack-dumping - parallelism: 3 - steps: - - electron-tests: - artifact-key: linux-x64 - - linux-x64-testing-asan-tests: - executor: - name: linux-docker - size: xlarge - environment: - <<: *env-linux-medium - <<: *env-headless-testing - <<: *env-stack-dumping - IS_ASAN: '1' - DISABLE_CRASH_REPORTER_TESTS: '1' - parallelism: 3 - steps: - - electron-tests: - artifact-key: linux-x64-asan - - linux-x64-testing-nan: - executor: - name: linux-docker - size: medium - environment: - <<: *env-linux-medium - <<: *env-headless-testing - <<: *env-stack-dumping - steps: - - nan-tests: - artifact-key: linux-x64 - - linux-x64-testing-node: - executor: - name: linux-docker - size: xlarge - environment: - <<: *env-linux-medium - <<: *env-headless-testing - <<: *env-stack-dumping - steps: - - node-tests: - artifact-key: linux-x64 - - linux-arm-testing-tests: - executor: linux-arm - environment: - <<: *env-arm - <<: *env-global - <<: *env-headless-testing - <<: *env-stack-dumping - parallelism: 3 - steps: - - electron-tests: - artifact-key: linux-arm - - linux-arm64-testing-tests: - executor: linux-arm64 - environment: - <<: *env-arm64 - <<: *env-global - <<: *env-headless-testing - <<: *env-stack-dumping - parallelism: 3 - steps: - - electron-tests: - artifact-key: linux-arm64 - -# List all workflows -workflows: - docs-only: - when: - and: - - equal: [true, << pipeline.parameters.run-docs-only >>] - jobs: - - ts-compile-doc-change - - build-linux: - when: - and: - - equal: [true, << pipeline.parameters.run-build-linux >>] - jobs: - - linux-make-src-cache - - linux-x64-testing: - requires: - - linux-make-src-cache - - linux-x64-testing-asan: - requires: - - linux-make-src-cache - - linux-x64-testing-gn-check: - requires: - - linux-make-src-cache - - linux-x64-testing-tests: - requires: - - linux-x64-testing - - linux-x64-testing-asan-tests: - requires: - - linux-x64-testing-asan - - linux-x64-testing-nan: - requires: - - linux-x64-testing - - linux-x64-testing-node: - requires: - - linux-x64-testing - - linux-arm-testing: - requires: - - linux-make-src-cache - - 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: - requires: - - linux-make-src-cache - - 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: - requires: - - linux-make-src-cache - - lint: - jobs: - - lint diff --git a/.circleci/config/build.js b/.circleci/config/build.js deleted file mode 100644 index 4e255608a090..000000000000 --- a/.circleci/config/build.js +++ /dev/null @@ -1,34 +0,0 @@ -const cp = require('child_process'); -const fs = require('fs-extra'); -const path = require('path'); -const yaml = require('js-yaml'); - -const STAGING_DIR = path.resolve(__dirname, '..', 'config-staging'); - -function copyAndExpand(dir = './') { - const absDir = path.resolve(__dirname, dir); - const targetDir = path.resolve(STAGING_DIR, dir); - - if (!fs.existsSync(targetDir)) { - fs.mkdirSync(targetDir); - } - - for (const file of fs.readdirSync(absDir)) { - if (!file.endsWith('.yml')) { - if (fs.statSync(path.resolve(absDir, file)).isDirectory()) { - copyAndExpand(path.join(dir, file)); - } - continue; - } - - fs.writeFileSync(path.resolve(targetDir, file), yaml.dump(yaml.load(fs.readFileSync(path.resolve(absDir, file), 'utf8')), { - noRefs: true, - })); - } -} - -if (fs.pathExists(STAGING_DIR)) fs.removeSync(STAGING_DIR); -copyAndExpand(); - -const output = cp.spawnSync(process.env.CIRCLECI_BINARY || 'circleci', ['config', 'pack', STAGING_DIR]); -fs.writeFileSync(path.resolve(STAGING_DIR, 'built.yml'), output.stdout.toString()); diff --git a/.circleci/config/jobs/lint.yml b/.circleci/config/jobs/lint.yml deleted file mode 100644 index 213756654712..000000000000 --- a/.circleci/config/jobs/lint.yml +++ /dev/null @@ -1,51 +0,0 @@ -executor: - name: linux-docker - size: medium -steps: - - checkout: - path: src/electron - - run: - name: Setup third_party Depot Tools - command: | - # "depot_tools" has to be checkout into "//third_party/depot_tools" so pylint.py can a "pylintrc" file. - git clone https://chromium.googlesource.com/chromium/tools/depot_tools.git src/third_party/depot_tools - echo 'export PATH="$PATH:'"$PWD"'/src/third_party/depot_tools"' >> $BASH_ENV - - run: - name: Download GN Binary - command: | - chromium_revision="$(grep -A1 chromium_version src/electron/DEPS | tr -d '\n' | cut -d\' -f4)" - gn_version="$(curl -sL "https://chromium.googlesource.com/chromium/src/+/${chromium_revision}/DEPS?format=TEXT" | base64 -d | grep gn_version | head -n1 | cut -d\' -f4)" - - cipd ensure -ensure-file - -root . \<<-CIPD - \$ServiceURL https://chrome-infra-packages.appspot.com/ - @Subdir src/buildtools/linux64 - gn/gn/linux-amd64 $gn_version - CIPD - - echo 'export CHROMIUM_BUILDTOOLS_PATH="'"$PWD"'/src/buildtools"' >> $BASH_ENV - - run: - name: Download clang-format Binary - command: | - chromium_revision="$(grep -A1 chromium_version src/electron/DEPS | tr -d '\n' | cut -d\' -f4)" - - sha1_path='buildtools/linux64/clang-format.sha1' - curl -sL "https://chromium.googlesource.com/chromium/src/+/${chromium_revision}/${sha1_path}?format=TEXT" | base64 -d > "src/${sha1_path}" - - download_from_google_storage.py --no_resume --no_auth --bucket chromium-clang-format -s "src/${sha1_path}" - - run: - name: Run Lint - command: | - # gn.py tries to find a gclient root folder starting from the current dir. - # When it fails and returns "None" path, the whole script fails. Let's "fix" it. - touch .gclient - # Another option would be to checkout "buildtools" inside the Electron checkout, - # but then we would lint its contents (at least gn format), and it doesn't pass it. - - cd src/electron - node script/yarn install --frozen-lockfile - node script/yarn lint - - run: - name: Run Script Typechecker - command: | - cd src/electron - node script/yarn tsc -p tsconfig.script.json diff --git a/.circleci/config/package.json b/.circleci/config/package.json deleted file mode 100644 index 054dd7c11cc9..000000000000 --- a/.circleci/config/package.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "name": "@electron/circleci-config", - "version": "0.0.0", - "private": true, - "license": "MIT", - "dependencies": { - "fs-extra": "^10.1.0", - "js-yaml": "^4.1.0" - } -} diff --git a/.circleci/config/params.js b/.circleci/config/params.js deleted file mode 100644 index 700689860668..000000000000 --- a/.circleci/config/params.js +++ /dev/null @@ -1,12 +0,0 @@ -const fs = require('fs'); - -const PARAMS_PATH = '/tmp/pipeline-parameters.json'; - -const content = JSON.parse(fs.readFileSync(PARAMS_PATH, 'utf-8')); - -// Choose resource class for linux hosts -const currentBranch = process.env.CIRCLE_BRANCH || ''; -content['large-linux-executor'] = /^pull\/[0-9-]+$/.test(currentBranch) ? '2xlarge' : 'electronjs/aks-linux-large'; -content['medium-linux-executor'] = /^pull\/[0-9-]+$/.test(currentBranch) ? 'medium' : 'electronjs/aks-linux-medium'; - -fs.writeFileSync(PARAMS_PATH, JSON.stringify(content)); diff --git a/.circleci/config/yarn.lock b/.circleci/config/yarn.lock deleted file mode 100644 index 51b2d9877643..000000000000 --- a/.circleci/config/yarn.lock +++ /dev/null @@ -1,43 +0,0 @@ -# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. -# yarn lockfile v1 - - -argparse@^2.0.1: - version "2.0.1" - resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" - integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== - -fs-extra@^10.1.0: - version "10.1.0" - resolved "https://registry.yarnpkg.com/fs-extra/-/fs-extra-10.1.0.tgz#02873cfbc4084dde127eaa5f9905eef2325d1abf" - integrity sha512-oRXApq54ETRj4eMiFzGnHWGy+zo5raudjuxN0b8H7s/RU2oW0Wvsx9O0ACRN/kRq9E8Vu/ReskGB5o3ji+FzHQ== - dependencies: - graceful-fs "^4.2.0" - jsonfile "^6.0.1" - universalify "^2.0.0" - -graceful-fs@^4.1.6, graceful-fs@^4.2.0: - version "4.2.10" - resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.10.tgz#147d3a006da4ca3ce14728c7aefc287c367d7a6c" - integrity sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA== - -js-yaml@^4.1.0: - version "4.1.0" - resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" - integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== - dependencies: - argparse "^2.0.1" - -jsonfile@^6.0.1: - version "6.1.0" - resolved "https://registry.yarnpkg.com/jsonfile/-/jsonfile-6.1.0.tgz#bc55b2634793c679ec6403094eb13698a6ec0aae" - integrity sha512-5dgndWOriYSm5cnYaJNhalLNDKOqFwyDB/rr1E9ZsGciGvKPs8R2xYGCacuf3z6K1YKDz182fd+fY3cn3pMqXQ== - dependencies: - universalify "^2.0.0" - optionalDependencies: - graceful-fs "^4.1.6" - -universalify@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" - integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== diff --git a/.circleci/fix-known-hosts.sh b/.circleci/fix-known-hosts.sh deleted file mode 100755 index 9820dbf5255f..000000000000 --- a/.circleci/fix-known-hosts.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/bash - -set -e - -mkdir -p ~/.ssh -echo "github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOMqqnkVzrm0SdG6UOoqKLsabgH5C9okWi0dh2l9GKJl -github.com ecdsa-sha2-nistp256 AAAAE2VjZHNhLXNoYTItbmlzdHAyNTYAAAAIbmlzdHAyNTYAAABBBEmKSENjQEezOmxkZMy7opKgwFB9nkt5YRrYMjNuG5N87uRgg6CLrbo5wAdT/y6v0mKV0U2w0WZ2YB/++Tpockg= -github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=" >> ~/.ssh/known_hosts diff --git a/.devcontainer/devcontainer.json b/.devcontainer/devcontainer.json index 54189514f8fd..aed60d7e22f0 100644 --- a/.devcontainer/devcontainer.json +++ b/.devcontainer/devcontainer.json @@ -40,7 +40,6 @@ "dbaeumer.vscode-eslint", "shakram02.bash-beautify", "marshallofsound.gnls-electron", - "CircleCI.circleci" ], "settings": { "editor.tabSize": 2, diff --git a/.env.example b/.env.example index 4d218327bd60..9f435578ddda 100644 --- a/.env.example +++ b/.env.example @@ -2,5 +2,4 @@ # See docs/development/releasing.md APPVEYOR_CLOUD_TOKEN= -CIRCLE_TOKEN= ELECTRON_GITHUB_TOKEN= diff --git a/README.md b/README.md index e1406d8b11ea..bc52ab87b115 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ [![Electron Logo](https://electronjs.org/images/electron-logo.svg)](https://electronjs.org) -[![CircleCI Build Status](https://circleci.com/gh/electron/electron/tree/main.svg?style=shield)](https://circleci.com/gh/electron/electron/tree/main) +[![GitHub Actions Build Status](https://github.com/electron/electron/actions/workflows/build.yml/badge.svg)](https://github.com/electron/electron/actions/workflows/build.yml) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/4lggi9dpjc1qob7k/branch/main?svg=true)](https://ci.appveyor.com/project/electron-bot/electron-ljo26/branch/main) [![Electron Discord Invite](https://img.shields.io/discord/745037351163527189?color=%237289DA&label=chat&logo=discord&logoColor=white)](https://discord.gg/electronjs) diff --git a/docs/development/source-code-directory-structure.md b/docs/development/source-code-directory-structure.md index 8e44e342f5b8..d6c52bd6c307 100644 --- a/docs/development/source-code-directory-structure.md +++ b/docs/development/source-code-directory-structure.md @@ -78,8 +78,7 @@ Electron ## Structure of Other Directories -* **.circleci** - Config file for CI with CircleCI. -* **.github** - GitHub-specific config files including issues templates and CODEOWNERS. +* **.github** - GitHub-specific config files including issues templates, CI with GitHub Actions and CODEOWNERS. * **dist** - Temporary directory created by `script/create-dist.py` script when creating a distribution. * **node_modules** - Third party node modules used for building. diff --git a/script/doc-only-change.js b/script/doc-only-change.js index 40f25ae64e23..31d5523e5006 100644 --- a/script/doc-only-change.js +++ b/script/doc-only-change.js @@ -7,8 +7,7 @@ async function checkIfDocOnlyChange () { if (prNumber || prURL) { try { - // CircleCI doesn't provide the PR number except on forked PRs, - // so to cover all cases we just extract it from the PR URL. + // extract the PR number from the PR URL. if (!prNumber || isNaN(prNumber)) { if (args.prURL) { prNumber = prURL.split('/').pop(); diff --git a/script/download-circleci-artifacts.js b/script/download-circleci-artifacts.js deleted file mode 100644 index 00e1e9224b1a..000000000000 --- a/script/download-circleci-artifacts.js +++ /dev/null @@ -1,72 +0,0 @@ -const args = require('minimist')(process.argv.slice(2)); -const fs = require('node:fs'); -const got = require('got'); -const stream = require('node:stream'); -const { promisify } = require('node:util'); - -const pipeline = promisify(stream.pipeline); - -async function downloadArtifact (name, buildNum, dest) { - const circleArtifactUrl = `https://circleci.com/api/v1.1/project/github/electron/electron/${args.buildNum}/artifacts?circle-token=${process.env.CIRCLE_TOKEN}`; - const responsePromise = got(circleArtifactUrl, { - headers: { - 'Content-Type': 'application/json', - Accept: 'application/json' - } - }); - const [response, artifacts] = await Promise.all([responsePromise, responsePromise.json()]); - if (response.statusCode !== 200) { - console.error('Could not fetch circleci artifact list, got status code:', response.statusCode); - } - const artifactToDownload = artifacts.find(artifact => { - return (artifact.path === name); - }); - if (!artifactToDownload) { - console.log(`Could not find artifact called ${name} to download for build #${buildNum}.`); - process.exit(1); - } else { - console.log(`Downloading ${artifactToDownload.url}.`); - let downloadError = false; - await downloadWithRetry(artifactToDownload.url, dest).catch(err => { - if (args.verbose) { - console.log(`${artifactToDownload.url} could not be successfully downloaded. Error was:`, err); - } else { - console.log(`${artifactToDownload.url} could not be successfully downloaded.`); - } - downloadError = true; - }); - if (!downloadError) { - console.log(`Successfully downloaded ${name}.`); - } - } -} - -async function downloadWithRetry (url, directory) { - let lastError; - const downloadURL = `${url}?circle-token=${process.env.CIRCLE_TOKEN}`; - for (let i = 0; i < 5; i++) { - console.log(`Attempting to download ${url} - attempt #${(i + 1)}`); - try { - return await downloadFile(downloadURL, directory); - } catch (err) { - lastError = err; - await new Promise(resolve => setTimeout(resolve, 30000)); - } - } - throw lastError; -} - -function downloadFile (url, directory) { - return pipeline( - got.stream(url), - fs.createWriteStream(directory) - ); -} - -if (!args.name || !args.buildNum || !args.dest) { - console.log(`Download CircleCI artifacts. - Usage: download-circleci-artifacts.js [--buildNum=CIRCLE_BUILD_NUMBER] [--name=artifactName] [--dest] [--verbose]`); - process.exit(0); -} else { - downloadArtifact(args.name, args.buildNum, args.dest); -} diff --git a/script/push-patch.js b/script/push-patch.js index 78595bc6e6f1..8a0296c4b9ba 100644 --- a/script/push-patch.js +++ b/script/push-patch.js @@ -1,16 +1,6 @@ const { appCredentialsFromString, getTokenForRepo } = require('@electron/github-app-auth'); const cp = require('node:child_process'); -if (!process.env.CIRCLE_BRANCH) { - console.error('Not building for a specific branch, can\'t autopush a patch'); - process.exit(1); -} - -if (process.env.CIRCLE_PR_NUMBER) { - console.error('Building for a forked PR, can\'t autopush a patch'); - process.exit(1); -} - async function main () { const token = await getTokenForRepo( { diff --git a/spec/api-app-spec.ts b/spec/api-app-spec.ts index 2c2ee831d5ee..192f8d1fe697 100644 --- a/spec/api-app-spec.ts +++ b/spec/api-app-spec.ts @@ -1521,19 +1521,6 @@ describe('app module', () => { }); ifdescribe(!(process.platform === 'linux' && (process.arch === 'arm64' || process.arch === 'arm')))('sandbox options', () => { - // Our ARM tests are run on VSTS rather than CircleCI, and the Docker - // setup on VSTS disallows syscalls that Chrome requires for setting up - // sandboxing. - // See: - // - https://docs.docker.com/engine/security/seccomp/#significant-syscalls-blocked-by-the-default-profile - // - https://chromium.googlesource.com/chromium/src/+/70.0.3538.124/sandbox/linux/services/credentials.cc#292 - // - https://github.com/docker/docker-ce/blob/ba7dfc59ccfe97c79ee0d1379894b35417b40bca/components/engine/profiles/seccomp/seccomp_default.go#L497 - // - https://blog.jessfraz.com/post/how-to-use-new-docker-seccomp-profiles/ - // - // Adding `--cap-add SYS_ADMIN` or `--security-opt seccomp=unconfined` - // to the Docker invocation allows the syscalls that Chrome needs, but - // are probably more permissive than we'd like. - let appProcess: cp.ChildProcess = null as any; let server: net.Server = null as any; const socketPath = process.platform === 'win32' ? '\\\\.\\pipe\\electron-mixed-sandbox' : '/tmp/electron-mixed-sandbox'; diff --git a/spec/api-media-handler-spec.ts b/spec/api-media-handler-spec.ts index 5b4b4aece2f2..0a0319e1a55e 100644 --- a/spec/api-media-handler-spec.ts +++ b/spec/api-media-handler-spec.ts @@ -21,10 +21,6 @@ describe('setDisplayMediaRequestHandler', () => { server.close(); }); - // FIXME(nornagon): this test fails on our macOS CircleCI runners with the - // error message: - // [ERROR:video_capture_device_client.cc(659)] error@ OnStart@content/browser/media/capture/desktop_capture_device_mac.cc:98, CGDisplayStreamCreate failed, OS message: Value too large to be stored in data type (84) - // This is possibly related to the OS/VM setup that CircleCI uses for macOS. ifit(process.platform !== 'darwin')('works when calling getDisplayMedia', async function () { if ((await desktopCapturer.getSources({ types: ['screen'] })).length === 0) { return this.skip(); diff --git a/spec/lib/codesign-helpers.ts b/spec/lib/codesign-helpers.ts index a78411b8867e..2de425e5453b 100644 --- a/spec/lib/codesign-helpers.ts +++ b/spec/lib/codesign-helpers.ts @@ -18,11 +18,6 @@ export function getCodesignIdentity () { if (identity === undefined) { const result = cp.spawnSync(path.resolve(__dirname, '../../script/codesign/get-trusted-identity.sh')); if (result.status !== 0 || result.stdout.toString().trim().length === 0) { - // Per https://circleci.com/docs/2.0/env-vars: - // CIRCLE_PR_NUMBER is only present on forked PRs - if (process.env.CI && !process.env.CIRCLE_PR_NUMBER) { - throw new Error('No valid signing identity available to run autoUpdater specs'); - } identity = null; } else { identity = result.stdout.toString().trim(); diff --git a/spec/version-bump-spec.ts b/spec/version-bump-spec.ts index 3541e3fe2875..9c2e8039dcdb 100644 --- a/spec/version-bump-spec.ts +++ b/spec/version-bump-spec.ts @@ -90,8 +90,6 @@ describe('version-bumper', () => { }); }); - // 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. ifdescribe(!(process.platform === 'linux' && process.arch.indexOf('arm') === 0) && process.platform !== 'darwin')('nextVersion', () => { describe('bump versions', () => { const nightlyPattern = /[0-9.]*(-nightly.(\d{4})(\d{2})(\d{2}))$/g;