Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: use CircleCI 2.1 config and v2 APIs #20852

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
120 changes: 104 additions & 16 deletions .circleci/config.yml
@@ -1,3 +1,46 @@
version: 2.1

parameters:
upload-to-s3:
type: string
default: '1'

run-lint:
type: boolean
default: true

run-build-linux:
type: boolean
default: true

run-build-mac:
type: boolean
default: true

run-linux-x64-publish:
type: boolean
default: false

run-linux-ia32-publish:
type: boolean
default: false

run-linux-arm-publish:
type: boolean
default: false

run-linux-arm64-publish:
type: boolean
default: false

run-osx-publish:
type: boolean
default: false

run-mas-publish:
type: boolean
default: false

# The config expects the following environment variables to be set:
# - "SLACK_WEBHOOK" Slack hook URL to send notifications.
#
Expand Down Expand Up @@ -651,7 +694,7 @@ steps-lint: &steps-lint
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
cipd ensure -ensure-file - -root . \<<-CIPD
\$ServiceURL https://chrome-infra-packages.appspot.com/
@Subdir src/buildtools/linux64
gn/gn/linux-amd64 $gn_version
Expand Down Expand Up @@ -1008,7 +1051,6 @@ chromium-upgrade-branches: &chromium-upgrade-branches
/chromium\-upgrade\/[0-9]+/

# List of all jobs.
version: 2
jobs:
# Layer 0: Lint. Standalone.
lint:
Expand Down Expand Up @@ -1128,6 +1170,7 @@ jobs:
<<: *env-linux-2xlarge-release
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_boto=True --custom-var=checkout_requests=True'
<<: *env-release-build
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
<<: *steps-electron-build-for-publish

linux-ia32-debug:
Expand Down Expand Up @@ -1178,6 +1221,7 @@ jobs:
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_boto=True --custom-var=checkout_requests=True'
<<: *env-ia32
<<: *env-release-build
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
<<: *steps-electron-build-for-publish

linux-arm-debug:
Expand Down Expand Up @@ -1229,6 +1273,7 @@ jobs:
<<: *env-arm
<<: *env-release-build
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_boto=True --custom-var=checkout_requests=True'
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
<<: *steps-electron-build-for-publish

linux-arm64-debug:
Expand Down Expand Up @@ -1296,6 +1341,7 @@ jobs:
<<: *env-arm64
<<: *env-release-build
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm64=True --custom-var=checkout_boto=True --custom-var=checkout_requests=True'
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
<<: *steps-electron-build-for-publish

osx-testing:
Expand Down Expand Up @@ -1354,6 +1400,7 @@ jobs:
<<: *env-mac-large-release
<<: *env-release-build
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_boto=True --custom-var=checkout_requests=True'
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
<<: *steps-electron-build-for-publish

mas-testing:
Expand Down Expand Up @@ -1418,6 +1465,7 @@ jobs:
<<: *env-mas
<<: *env-release-build
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_boto=True --custom-var=checkout_requests=True'
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
<<: *steps-electron-build-for-publish

# Layer 3: Tests.
Expand Down Expand Up @@ -1673,11 +1721,50 @@ jobs:

workflows:
version: 2

# The publish workflows below each contain one job so that they are
# compatible with how sudowoodo works today. If these workflows are
# changed to have multiple jobs, then scripts/release/ci-release-build.js
# will need to be updated and there will most likely need to be changes to
# sudowoodo

publish-x64-linux:
when: << pipeline.parameters.run-linux-x64-publish >>
jobs:
- linux-x64-publish

publish-ia32-linux:
when: << pipeline.parameters.run-linux-ia32-publish >>
jobs:
- linux-ia32-publish

publish-arm-linux:
when: << pipeline.parameters.run-linux-arm-publish >>
jobs:
- linux-arm-publish

publish-arm64-linux:
when: << pipeline.parameters.run-linux-arm64-publish >>
jobs:
- linux-arm64-publish

publish-osx:
when: << pipeline.parameters.run-osx-publish >>
jobs:
- osx-publish

publish-mas:
when: << pipeline.parameters.run-mas-publish >>
jobs:
- mas-publish

lint:
when: << pipeline.parameters.run-lint >>
jobs:
- lint

build-linux:
when: << pipeline.parameters.run-build-linux >>
jobs:
- linux-checkout-fast
- linux-checkout-and-save-cache
Expand Down Expand Up @@ -1744,6 +1831,7 @@ workflows:
- linux-checkout-fast

build-mac:
when: << pipeline.parameters.run-build-mac >>
jobs:
- mac-checkout-fast
- mac-checkout-and-save-cache
Expand Down Expand Up @@ -1798,11 +1886,11 @@ workflows:
- master
- *chromium-upgrade-branches
jobs:
- linux-checkout
- linux-checkout-fast

- linux-x64-release:
requires:
- linux-checkout
- linux-checkout-fast
- linux-x64-release-tests:
requires:
- linux-x64-release
Expand All @@ -1814,7 +1902,7 @@ workflows:
- linux-x64-release
- linux-x64-chromedriver:
requires:
- linux-checkout
- linux-checkout-fast
- linux-x64-release-summary:
requires:
- linux-x64-release
Expand All @@ -1824,7 +1912,7 @@ workflows:

- linux-ia32-release:
requires:
- linux-checkout
- linux-checkout-fast
- linux-ia32-release-tests:
requires:
- linux-ia32-release
Expand All @@ -1836,7 +1924,7 @@ workflows:
- linux-ia32-release
- linux-ia32-chromedriver:
requires:
- linux-checkout
- linux-checkout-fast
- linux-ia32-release-summary:
requires:
- linux-ia32-release
Expand All @@ -1846,10 +1934,10 @@ workflows:

- linux-arm-release:
requires:
- linux-checkout
- linux-checkout-fast
- linux-arm-chromedriver:
requires:
- linux-checkout
- linux-checkout-fast
- linux-arm-release-summary:
requires:
- linux-arm-release
Expand All @@ -1858,10 +1946,10 @@ workflows:

- linux-arm64-release:
requires:
- linux-checkout
- linux-checkout-fast
- linux-arm64-chromedriver:
requires:
- linux-checkout
- linux-checkout-fast
- linux-arm64-release-summary:
requires:
- linux-arm64-release
Expand All @@ -1877,11 +1965,11 @@ workflows:
- master
- *chromium-upgrade-branches
jobs:
- mac-checkout
- mac-checkout-fast

- osx-release:
requires:
- mac-checkout
- mac-checkout-fast
- osx-release-tests:
requires:
- osx-release
Expand All @@ -1893,7 +1981,7 @@ workflows:
- osx-release
- osx-chromedriver:
requires:
- mac-checkout
- mac-checkout-fast
- osx-release-summary:
requires:
- osx-release
Expand All @@ -1903,7 +1991,7 @@ workflows:

- mas-release:
requires:
- mac-checkout
- mac-checkout-fast
- mas-release-tests:
requires:
- mas-release
Expand All @@ -1915,7 +2003,7 @@ workflows:
- mas-release
- mas-chromedriver:
requires:
- mac-checkout
- mac-checkout-fast
- mas-release-summary:
requires:
- mas-release
Expand Down