Skip to content

Commit 0e8aa5c

Browse files
John KleinschmidtMarshallOfSound
andauthored
ci: update to CircleCI v2 config and APIs (electron#22310)
* ci: Update to CircleCI v2 config and APIs This reverts commit e6807b3. * build: update release build endpoint from /jobs to /job (electron#21232) (cherry picked from commit 41f1569) * chore: workflows and pipeline state were split in the circle API (electron#21441) (cherry picked from commit ec0edb7) Co-authored-by: Samuel Attard <samuel.r.attard@gmail.com>
1 parent edac24c commit 0e8aa5c

File tree

2 files changed

+236
-35
lines changed

2 files changed

+236
-35
lines changed

.circleci/config.yml

Lines changed: 116 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,46 @@
1+
version: 2.1
2+
3+
parameters:
4+
upload-to-s3:
5+
type: string
6+
default: '1'
7+
8+
run-lint:
9+
type: boolean
10+
default: true
11+
12+
run-build-linux:
13+
type: boolean
14+
default: true
15+
16+
run-build-mac:
17+
type: boolean
18+
default: true
19+
20+
run-linux-x64-publish:
21+
type: boolean
22+
default: false
23+
24+
run-linux-ia32-publish:
25+
type: boolean
26+
default: false
27+
28+
run-linux-arm-publish:
29+
type: boolean
30+
default: false
31+
32+
run-linux-arm64-publish:
33+
type: boolean
34+
default: false
35+
36+
run-osx-publish:
37+
type: boolean
38+
default: false
39+
40+
run-mas-publish:
41+
type: boolean
42+
default: false
43+
144
# The config expects the following environment variables to be set:
245
# - "SLACK_WEBHOOK" Slack hook URL to send notifications.
346
#
@@ -674,7 +717,7 @@ steps-lint: &steps-lint
674717
chromium_revision="$(grep -A1 chromium_version src/electron/DEPS | tr -d '\n' | cut -d\' -f4)"
675718
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)"
676719
677-
cipd ensure -ensure-file - -root . <<-CIPD
720+
cipd ensure -ensure-file - -root . \<<-CIPD
678721
\$ServiceURL https://chrome-infra-packages.appspot.com/
679722
@Subdir src/buildtools/linux64
680723
gn/gn/linux-amd64 $gn_version
@@ -1028,7 +1071,6 @@ chromium-upgrade-branches: &chromium-upgrade-branches
10281071
/chromium\-upgrade\/[0-9]+/
10291072

10301073
# List of all jobs.
1031-
version: 2
10321074
jobs:
10331075
# Layer 0: Lint. Standalone.
10341076
lint:
@@ -1148,6 +1190,8 @@ jobs:
11481190
<<: *env-linux-2xlarge-release
11491191
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_boto=True --custom-var=checkout_requests=True'
11501192
<<: *env-release-build
1193+
<<: *env-enable-sccache
1194+
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
11511195
<<: *steps-electron-build-for-publish
11521196

11531197
linux-ia32-debug:
@@ -1198,6 +1242,8 @@ jobs:
11981242
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_boto=True --custom-var=checkout_requests=True'
11991243
<<: *env-ia32
12001244
<<: *env-release-build
1245+
<<: *env-enable-sccache
1246+
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
12011247
<<: *steps-electron-build-for-publish
12021248

12031249
linux-arm-debug:
@@ -1248,7 +1294,9 @@ jobs:
12481294
<<: *env-linux-2xlarge-release
12491295
<<: *env-arm
12501296
<<: *env-release-build
1297+
<<: *env-enable-sccache
12511298
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_boto=True --custom-var=checkout_requests=True'
1299+
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
12521300
<<: *steps-electron-build-for-publish
12531301

12541302
linux-arm64-debug:
@@ -1315,7 +1363,9 @@ jobs:
13151363
<<: *env-linux-2xlarge-release
13161364
<<: *env-arm64
13171365
<<: *env-release-build
1366+
<<: *env-enable-sccache
13181367
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm64=True --custom-var=checkout_boto=True --custom-var=checkout_requests=True'
1368+
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
13191369
<<: *steps-electron-build-for-publish
13201370

13211371
osx-testing:
@@ -1373,7 +1423,9 @@ jobs:
13731423
environment:
13741424
<<: *env-mac-large-release
13751425
<<: *env-release-build
1426+
<<: *env-enable-sccache
13761427
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_boto=True --custom-var=checkout_requests=True'
1428+
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
13771429
<<: *steps-electron-build-for-publish
13781430

13791431
mas-testing:
@@ -1437,7 +1489,9 @@ jobs:
14371489
<<: *env-mac-large-release
14381490
<<: *env-mas
14391491
<<: *env-release-build
1492+
<<: *env-enable-sccache
14401493
GCLIENT_EXTRA_ARGS: '--custom-var=checkout_boto=True --custom-var=checkout_requests=True'
1494+
UPLOAD_TO_S3: << pipeline.parameters.upload-to-s3 >>
14411495
<<: *steps-electron-build-for-publish
14421496

14431497
# Layer 3: Tests.
@@ -1693,11 +1747,56 @@ jobs:
16931747

16941748
workflows:
16951749
version: 2
1750+
1751+
# The publish workflows below each contain one job so that they are
1752+
# compatible with how sudowoodo works today. If these workflows are
1753+
# changed to have multiple jobs, then scripts/release/ci-release-build.js
1754+
# will need to be updated and there will most likely need to be changes to
1755+
# sudowoodo
1756+
1757+
publish-x64-linux:
1758+
when: << pipeline.parameters.run-linux-x64-publish >>
1759+
jobs:
1760+
- linux-x64-publish:
1761+
context: release-env
1762+
1763+
publish-ia32-linux:
1764+
when: << pipeline.parameters.run-linux-ia32-publish >>
1765+
jobs:
1766+
- linux-ia32-publish:
1767+
context: release-env
1768+
1769+
publish-arm-linux:
1770+
when: << pipeline.parameters.run-linux-arm-publish >>
1771+
jobs:
1772+
- linux-arm-publish:
1773+
context: release-env
1774+
1775+
publish-arm64-linux:
1776+
when: << pipeline.parameters.run-linux-arm64-publish >>
1777+
jobs:
1778+
- linux-arm64-publish:
1779+
context: release-env
1780+
1781+
publish-osx:
1782+
when: << pipeline.parameters.run-osx-publish >>
1783+
jobs:
1784+
- osx-publish:
1785+
context: release-env
1786+
1787+
publish-mas:
1788+
when: << pipeline.parameters.run-mas-publish >>
1789+
jobs:
1790+
- mas-publish:
1791+
context: release-env
1792+
16961793
lint:
1794+
when: << pipeline.parameters.run-lint >>
16971795
jobs:
16981796
- lint
16991797

17001798
build-linux:
1799+
when: << pipeline.parameters.run-build-linux >>
17011800
jobs:
17021801
- linux-checkout-fast
17031802
- linux-checkout-and-save-cache
@@ -1764,6 +1863,7 @@ workflows:
17641863
- linux-checkout-fast
17651864

17661865
build-mac:
1866+
when: << pipeline.parameters.run-build-mac >>
17671867
jobs:
17681868
- mac-checkout-fast
17691869
- mac-checkout-and-save-cache
@@ -1818,11 +1918,11 @@ workflows:
18181918
- master
18191919
- *chromium-upgrade-branches
18201920
jobs:
1821-
- linux-checkout
1921+
- linux-checkout-fast
18221922

18231923
- linux-x64-release:
18241924
requires:
1825-
- linux-checkout
1925+
- linux-checkout-fast
18261926
- linux-x64-release-tests:
18271927
requires:
18281928
- linux-x64-release
@@ -1834,7 +1934,7 @@ workflows:
18341934
- linux-x64-release
18351935
- linux-x64-chromedriver:
18361936
requires:
1837-
- linux-checkout
1937+
- linux-checkout-fast
18381938
- linux-x64-release-summary:
18391939
requires:
18401940
- linux-x64-release
@@ -1844,7 +1944,7 @@ workflows:
18441944

18451945
- linux-ia32-release:
18461946
requires:
1847-
- linux-checkout
1947+
- linux-checkout-fast
18481948
- linux-ia32-release-tests:
18491949
requires:
18501950
- linux-ia32-release
@@ -1856,7 +1956,7 @@ workflows:
18561956
- linux-ia32-release
18571957
- linux-ia32-chromedriver:
18581958
requires:
1859-
- linux-checkout
1959+
- linux-checkout-fast
18601960
- linux-ia32-release-summary:
18611961
requires:
18621962
- linux-ia32-release
@@ -1866,10 +1966,10 @@ workflows:
18661966

18671967
- linux-arm-release:
18681968
requires:
1869-
- linux-checkout
1969+
- linux-checkout-fast
18701970
- linux-arm-chromedriver:
18711971
requires:
1872-
- linux-checkout
1972+
- linux-checkout-fast
18731973
- linux-arm-release-summary:
18741974
requires:
18751975
- linux-arm-release
@@ -1878,10 +1978,10 @@ workflows:
18781978

18791979
- linux-arm64-release:
18801980
requires:
1881-
- linux-checkout
1981+
- linux-checkout-fast
18821982
- linux-arm64-chromedriver:
18831983
requires:
1884-
- linux-checkout
1984+
- linux-checkout-fast
18851985
- linux-arm64-release-summary:
18861986
requires:
18871987
- linux-arm64-release
@@ -1897,11 +1997,11 @@ workflows:
18971997
- master
18981998
- *chromium-upgrade-branches
18991999
jobs:
1900-
- mac-checkout
2000+
- mac-checkout-fast
19012001

19022002
- osx-release:
19032003
requires:
1904-
- mac-checkout
2004+
- mac-checkout-fast
19052005
- osx-release-tests:
19062006
requires:
19072007
- osx-release
@@ -1913,7 +2013,7 @@ workflows:
19132013
- osx-release
19142014
- osx-chromedriver:
19152015
requires:
1916-
- mac-checkout
2016+
- mac-checkout-fast
19172017
- osx-release-summary:
19182018
requires:
19192019
- osx-release
@@ -1923,7 +2023,7 @@ workflows:
19232023

19242024
- mas-release:
19252025
requires:
1926-
- mac-checkout
2026+
- mac-checkout-fast
19272027
- mas-release-tests:
19282028
requires:
19292029
- mas-release
@@ -1935,7 +2035,7 @@ workflows:
19352035
- mas-release
19362036
- mas-chromedriver:
19372037
requires:
1938-
- mac-checkout
2038+
- mac-checkout-fast
19392039
- mas-release-summary:
19402040
requires:
19412041
- mas-release

0 commit comments

Comments
 (0)