base.yml 79 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530153115321533153415351536153715381539154015411542154315441545154615471548154915501551155215531554155515561557155815591560156115621563156415651566156715681569157015711572157315741575157615771578157915801581158215831584158515861587158815891590159115921593159415951596159715981599160016011602160316041605160616071608160916101611161216131614161516161617161816191620162116221623162416251626162716281629163016311632163316341635163616371638163916401641164216431644164516461647164816491650165116521653165416551656165716581659166016611662166316641665166616671668166916701671167216731674167516761677167816791680168116821683168416851686168716881689169016911692169316941695169616971698169917001701170217031704170517061707170817091710171117121713171417151716171717181719172017211722172317241725172617271728172917301731173217331734173517361737173817391740174117421743174417451746174717481749175017511752175317541755175617571758175917601761176217631764176517661767176817691770177117721773177417751776177717781779178017811782178317841785178617871788178917901791179217931794179517961797179817991800180118021803180418051806180718081809181018111812181318141815181618171818181918201821182218231824182518261827182818291830183118321833183418351836183718381839184018411842184318441845184618471848184918501851185218531854185518561857185818591860186118621863186418651866186718681869187018711872187318741875187618771878187918801881188218831884188518861887188818891890189118921893189418951896189718981899190019011902190319041905190619071908190919101911191219131914191519161917191819191920192119221923192419251926192719281929193019311932193319341935193619371938193919401941194219431944194519461947194819491950195119521953195419551956195719581959196019611962196319641965196619671968196919701971197219731974197519761977197819791980198119821983198419851986198719881989199019911992199319941995199619971998199920002001200220032004200520062007200820092010201120122013201420152016201720182019202020212022202320242025202620272028202920302031203220332034203520362037203820392040204120422043204420452046204720482049205020512052205320542055205620572058205920602061206220632064206520662067206820692070207120722073207420752076207720782079208020812082208320842085208620872088208920902091209220932094209520962097209820992100210121022103210421052106210721082109211021112112211321142115211621172118211921202121212221232124212521262127212821292130213121322133213421352136213721382139214021412142214321442145214621472148214921502151215221532154215521562157215821592160216121622163216421652166216721682169217021712172217321742175217621772178217921802181218221832184218521862187218821892190219121922193219421952196219721982199220022012202220322042205220622072208220922102211221222132214221522162217221822192220222122222223222422252226222722282229223022312232223322342235223622372238223922402241224222432244224522462247224822492250225122522253225422552256225722582259226022612262226322642265226622672268226922702271227222732274227522762277227822792280228122822283228422852286228722882289229022912292229322942295229622972298229923002301230223032304230523062307230823092310231123122313231423152316231723182319232023212322232323242325232623272328232923302331233223332334233523362337233823392340234123422343234423452346234723482349235023512352235323542355235623572358235923602361236223632364236523662367236823692370237123722373237423752376237723782379238023812382238323842385238623872388238923902391239223932394239523962397239823992400240124022403240424052406240724082409241024112412241324142415241624172418241924202421242224232424242524262427242824292430243124322433243424352436243724382439244024412442244324442445244624472448244924502451245224532454245524562457245824592460246124622463246424652466246724682469
  1. version: 2.1
  2. parameters:
  3. run-docs-only:
  4. type: boolean
  5. default: false
  6. upload-to-storage:
  7. type: string
  8. default: '1'
  9. run-build-linux:
  10. type: boolean
  11. default: false
  12. run-build-mac:
  13. type: boolean
  14. default: false
  15. run-linux-publish:
  16. type: boolean
  17. default: false
  18. linux-publish-arch-limit:
  19. type: enum
  20. default: all
  21. enum: ["all", "arm", "arm64", "x64", "ia32"]
  22. run-macos-publish:
  23. type: boolean
  24. default: false
  25. macos-publish-arch-limit:
  26. type: enum
  27. default: all
  28. enum: ["all", "osx-x64", "osx-arm64", "mas-x64", "mas-arm64"]
  29. # Executors
  30. executors:
  31. linux-docker:
  32. parameters:
  33. size:
  34. description: "Docker executor size"
  35. default: 2xlarge+
  36. type: enum
  37. enum: ["medium", "xlarge", "2xlarge+"]
  38. docker:
  39. - image: ghcr.io/electron/build:27db4a3e3512bfd2e47f58cea69922da0835f1d9
  40. resource_class: << parameters.size >>
  41. macos:
  42. parameters:
  43. size:
  44. description: "macOS executor size"
  45. default: large
  46. type: enum
  47. enum: ["medium", "large"]
  48. macos:
  49. xcode: "12.4.0"
  50. resource_class: << parameters.size >>
  51. # Electron Runners
  52. apple-silicon:
  53. resource_class: electronjs/macos-arm64
  54. machine: true
  55. linux-arm:
  56. resource_class: electronjs/linux-arm
  57. machine: true
  58. linux-arm64:
  59. resource_class: electronjs/linux-arm64
  60. machine: true
  61. # The config expects the following environment variables to be set:
  62. # - "SLACK_WEBHOOK" Slack hook URL to send notifications.
  63. #
  64. # The publishing scripts expect access tokens to be defined as env vars,
  65. # but those are not covered here.
  66. #
  67. # CircleCI docs on variables:
  68. # https://circleci.com/docs/2.0/env-vars/
  69. # Build configurations options.
  70. env-testing-build: &env-testing-build
  71. GN_CONFIG: //electron/build/args/testing.gn
  72. CHECK_DIST_MANIFEST: '1'
  73. env-release-build: &env-release-build
  74. GN_CONFIG: //electron/build/args/release.gn
  75. STRIP_BINARIES: true
  76. GENERATE_SYMBOLS: true
  77. CHECK_DIST_MANIFEST: '1'
  78. IS_RELEASE: true
  79. env-headless-testing: &env-headless-testing
  80. DISPLAY: ':99.0'
  81. env-stack-dumping: &env-stack-dumping
  82. ELECTRON_ENABLE_STACK_DUMPING: '1'
  83. env-browsertests: &env-browsertests
  84. GN_CONFIG: //electron/build/args/native_tests.gn
  85. BUILD_TARGET: electron/spec:chromium_browsertests
  86. TESTS_CONFIG: src/electron/spec/configs/browsertests.yml
  87. env-unittests: &env-unittests
  88. GN_CONFIG: //electron/build/args/native_tests.gn
  89. BUILD_TARGET: electron/spec:chromium_unittests
  90. TESTS_CONFIG: src/electron/spec/configs/unittests.yml
  91. # Build targets options.
  92. env-ia32: &env-ia32
  93. GN_EXTRA_ARGS: 'target_cpu = "x86"'
  94. NPM_CONFIG_ARCH: ia32
  95. TARGET_ARCH: ia32
  96. env-arm: &env-arm
  97. GN_EXTRA_ARGS: 'target_cpu = "arm"'
  98. MKSNAPSHOT_TOOLCHAIN: //build/toolchain/linux:clang_arm
  99. BUILD_NATIVE_MKSNAPSHOT: 1
  100. TARGET_ARCH: arm
  101. env-apple-silicon: &env-apple-silicon
  102. GN_EXTRA_ARGS: 'target_cpu = "arm64" use_prebuilt_v8_context_snapshot = true'
  103. TARGET_ARCH: arm64
  104. USE_PREBUILT_V8_CONTEXT_SNAPSHOT: 1
  105. npm_config_arch: arm64
  106. env-arm64: &env-arm64
  107. GN_EXTRA_ARGS: 'target_cpu = "arm64" fatal_linker_warnings = false enable_linux_installer = false'
  108. MKSNAPSHOT_TOOLCHAIN: //build/toolchain/linux:clang_arm64
  109. BUILD_NATIVE_MKSNAPSHOT: 1
  110. TARGET_ARCH: arm64
  111. env-mas: &env-mas
  112. GN_EXTRA_ARGS: 'is_mas_build = true'
  113. MAS_BUILD: 'true'
  114. env-mas-apple-silicon: &env-mas-apple-silicon
  115. GN_EXTRA_ARGS: 'target_cpu = "arm64" is_mas_build = true use_prebuilt_v8_context_snapshot = true'
  116. MAS_BUILD: 'true'
  117. TARGET_ARCH: arm64
  118. USE_PREBUILT_V8_CONTEXT_SNAPSHOT: 1
  119. env-send-slack-notifications: &env-send-slack-notifications
  120. NOTIFY_SLACK: true
  121. env-global: &env-global
  122. ELECTRON_OUT_DIR: Default
  123. env-linux-medium: &env-linux-medium
  124. <<: *env-global
  125. NUMBER_OF_NINJA_PROCESSES: 3
  126. env-linux-2xlarge: &env-linux-2xlarge
  127. <<: *env-global
  128. NUMBER_OF_NINJA_PROCESSES: 34
  129. env-linux-2xlarge-release: &env-linux-2xlarge-release
  130. <<: *env-global
  131. NUMBER_OF_NINJA_PROCESSES: 16
  132. env-machine-mac: &env-machine-mac
  133. <<: *env-global
  134. NUMBER_OF_NINJA_PROCESSES: 6
  135. env-mac-large: &env-mac-large
  136. <<: *env-global
  137. NUMBER_OF_NINJA_PROCESSES: 18
  138. env-mac-large-release: &env-mac-large-release
  139. <<: *env-global
  140. NUMBER_OF_NINJA_PROCESSES: 8
  141. env-ninja-status: &env-ninja-status
  142. NINJA_STATUS: "[%r processes, %f/%t @ %o/s : %es] "
  143. env-disable-run-as-node: &env-disable-run-as-node
  144. GN_BUILDFLAG_ARGS: 'enable_run_as_node = false'
  145. env-32bit-release: &env-32bit-release
  146. # Set symbol level to 1 for 32 bit releases because of https://crbug.com/648948
  147. GN_BUILDFLAG_ARGS: 'symbol_level = 1'
  148. env-macos-build: &env-macos-build
  149. # Disable pre-compiled headers to reduce out size, only useful for rebuilds
  150. GN_BUILDFLAG_ARGS: 'enable_precompiled_headers = false'
  151. # Individual (shared) steps.
  152. step-maybe-notify-slack-failure: &step-maybe-notify-slack-failure
  153. run:
  154. name: Send a Slack notification on failure
  155. command: |
  156. if [ "$NOTIFY_SLACK" == "true" ]; then
  157. export MESSAGE="Build failed for *<$CIRCLE_BUILD_URL|$CIRCLE_JOB>* nightly build from *$CIRCLE_BRANCH*."
  158. curl -g -H "Content-Type: application/json" -X POST \
  159. -d "{\"text\": \"$MESSAGE\", \"attachments\": [{\"color\": \"#FC5C3C\",\"title\": \"$CIRCLE_JOB nightly build results\",\"title_link\": \"$CIRCLE_BUILD_URL\"}]}" $SLACK_WEBHOOK
  160. fi
  161. when: on_fail
  162. step-maybe-notify-slack-success: &step-maybe-notify-slack-success
  163. run:
  164. name: Send a Slack notification on success
  165. command: |
  166. if [ "$NOTIFY_SLACK" == "true" ]; then
  167. export MESSAGE="Build succeeded for *<$CIRCLE_BUILD_URL|$CIRCLE_JOB>* nightly build from *$CIRCLE_BRANCH*."
  168. curl -g -H "Content-Type: application/json" -X POST \
  169. -d "{\"text\": \"$MESSAGE\", \"attachments\": [{\"color\": \"good\",\"title\": \"$CIRCLE_JOB nightly build results\",\"title_link\": \"$CIRCLE_BUILD_URL\"}]}" $SLACK_WEBHOOK
  170. fi
  171. when: on_success
  172. step-maybe-cleanup-arm64-mac: &step-maybe-cleanup-arm64-mac
  173. run:
  174. name: Cleanup after testing
  175. command: |
  176. if [ "$TARGET_ARCH" == "arm64" ] &&[ "`uname`" == "Darwin" ]; then
  177. killall Electron || echo "No Electron processes left running"
  178. killall Safari || echo "No Safari processes left running"
  179. rm -rf ~/Library/Application\ Support/Electron*
  180. rm -rf ~/Library/Application\ Support/electron*
  181. security delete-generic-password -l "Chromium Safe Storage" || echo "✓ Keychain does not contain password from tests"
  182. security delete-generic-password -l "Electron Test Main Safe Storage" || echo "✓ Keychain does not contain password from tests"
  183. elif [ "$TARGET_ARCH" == "arm" ] || [ "$TARGET_ARCH" == "arm64" ]; then
  184. XVFB=/usr/bin/Xvfb
  185. /sbin/start-stop-daemon --stop --exec $XVFB || echo "Xvfb not running"
  186. pkill electron || echo "electron not running"
  187. rm -rf ~/.config/Electron*
  188. rm -rf ~/.config/electron*
  189. fi
  190. when: always
  191. step-checkout-electron: &step-checkout-electron
  192. checkout:
  193. path: src/electron
  194. step-depot-tools-get: &step-depot-tools-get
  195. run:
  196. name: Get depot tools
  197. command: |
  198. git clone --depth=1 https://chromium.googlesource.com/chromium/tools/depot_tools.git
  199. # remove ninjalog_uploader_wrapper.py from autoninja since we don't use it and it causes problems
  200. if [ "`uname`" == "Darwin" ]; then
  201. sed -i '' '/ninjalog_uploader_wrapper.py/d' ./depot_tools/autoninja
  202. else
  203. sed -i '/ninjalog_uploader_wrapper.py/d' ./depot_tools/autoninja
  204. fi
  205. step-depot-tools-add-to-path: &step-depot-tools-add-to-path
  206. run:
  207. name: Add depot tools to PATH
  208. command: echo 'export PATH="$PATH:'"$PWD"'/depot_tools"' >> $BASH_ENV
  209. step-gclient-sync: &step-gclient-sync
  210. run:
  211. name: Gclient sync
  212. command: |
  213. # If we did not restore a complete sync then we need to sync for realz
  214. if [ ! -s "src/electron/.circle-sync-done" ]; then
  215. gclient config \
  216. --name "src/electron" \
  217. --unmanaged \
  218. $GCLIENT_EXTRA_ARGS \
  219. "$CIRCLE_REPOSITORY_URL"
  220. ELECTRON_USE_THREE_WAY_MERGE_FOR_PATCHES=1 gclient sync --with_branch_heads --with_tags
  221. if [ "$IS_RELEASE" != "true" ]; then
  222. # Re-export all the patches to check if there were changes.
  223. python src/electron/script/export_all_patches.py src/electron/patches/config.json
  224. cd src/electron
  225. git update-index --refresh || true
  226. if ! git diff-index --quiet HEAD --; then
  227. # There are changes to the patches. Make a git commit with the updated patches
  228. git add patches
  229. 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>"
  230. # Export it
  231. mkdir -p ../../patches
  232. git format-patch -1 --stdout --keep-subject --no-stat --full-index > ../../patches/update-patches.patch
  233. if (node ./script/push-patch.js 2> /dev/null > /dev/null); then
  234. echo
  235. echo "======================================================================"
  236. echo "Changes to the patches when applying, we have auto-pushed the diff to the current branch"
  237. echo "A new CI job will kick off shortly"
  238. echo "======================================================================"
  239. exit 1
  240. else
  241. echo
  242. echo "======================================================================"
  243. echo "There were changes to the patches when applying."
  244. echo "Check the CI artifacts for a patch you can apply to fix it."
  245. echo "======================================================================"
  246. exit 1
  247. fi
  248. fi
  249. fi
  250. fi
  251. step-setup-env-for-build: &step-setup-env-for-build
  252. run:
  253. name: Setup Environment Variables
  254. command: |
  255. # To find `gn` executable.
  256. echo 'export CHROMIUM_BUILDTOOLS_PATH="'"$PWD"'/src/buildtools"' >> $BASH_ENV
  257. step-setup-goma-for-build: &step-setup-goma-for-build
  258. run:
  259. name: Setup Goma
  260. command: |
  261. echo 'export NUMBER_OF_NINJA_PROCESSES=300' >> $BASH_ENV
  262. if [ "`uname`" == "Darwin" ]; then
  263. echo 'ulimit -n 10000' >> $BASH_ENV
  264. echo 'sudo launchctl limit maxfiles 65536 200000' >> $BASH_ENV
  265. fi
  266. if [ ! -z "$RAW_GOMA_AUTH" ]; then
  267. echo $RAW_GOMA_AUTH > ~/.goma_oauth2_config
  268. fi
  269. git clone https://github.com/electron/build-tools.git
  270. cd build-tools
  271. npm install
  272. mkdir third_party
  273. node -e "require('./src/utils/goma.js').downloadAndPrepare({ gomaOneForAll: true })"
  274. export GOMA_FALLBACK_ON_AUTH_FAILURE=true
  275. third_party/goma/goma_ctl.py ensure_start
  276. if [ ! -z "$RAW_GOMA_AUTH" ] && [ "`third_party/goma/goma_auth.py info`" != "Login as Fermi Planck" ]; then
  277. echo "WARNING!!!!!! Goma authentication is incorrect; please update Goma auth token."
  278. exit 1
  279. fi
  280. echo 'export GN_GOMA_FILE='`node -e "console.log(require('./src/utils/goma.js').gnFilePath)"` >> $BASH_ENV
  281. echo 'export LOCAL_GOMA_DIR='`node -e "console.log(require('./src/utils/goma.js').dir)"` >> $BASH_ENV
  282. echo 'export GOMA_FALLBACK_ON_AUTH_FAILURE=true' >> $BASH_ENV
  283. cd ..
  284. touch "${TMPDIR:=/tmp}"/.goma-ready
  285. background: true
  286. step-wait-for-goma: &step-wait-for-goma
  287. run:
  288. name: Wait for Goma
  289. command: |
  290. until [ -f "${TMPDIR:=/tmp}"/.goma-ready ]
  291. do
  292. sleep 5
  293. done
  294. echo "Goma ready"
  295. no_output_timeout: 2m
  296. step-restore-brew-cache: &step-restore-brew-cache
  297. restore_cache:
  298. paths:
  299. - /usr/local/Cellar/gnu-tar
  300. - /usr/local/bin/gtar
  301. keys:
  302. - v4-brew-cache-{{ arch }}
  303. step-save-brew-cache: &step-save-brew-cache
  304. save_cache:
  305. paths:
  306. - /usr/local/Cellar/gnu-tar
  307. - /usr/local/bin/gtar
  308. key: v4-brew-cache-{{ arch }}
  309. name: Persisting brew cache
  310. step-get-more-space-on-mac: &step-get-more-space-on-mac
  311. run:
  312. name: Free up space on MacOS
  313. command: |
  314. if [ "`uname`" == "Darwin" ]; then
  315. sudo mkdir -p $TMPDIR/del-target
  316. if [ "$TARGET_ARCH" == "arm64" ]; then
  317. # Remount the root volume as writable, don't ask questions plz
  318. sudo mount -uw /
  319. fi
  320. tmpify() {
  321. if [ -d "$1" ]; then
  322. sudo mv "$1" $TMPDIR/del-target/$(echo $1|shasum -a 256|head -n1|cut -d " " -f1)
  323. fi
  324. }
  325. strip_arm_deep() {
  326. opwd=$(pwd)
  327. cd $1
  328. f=$(find . -perm +111 -type f)
  329. for fp in $f
  330. do
  331. if [[ $(file "$fp") == *"universal binary"* ]]; then
  332. if [[ $(file "$fp") == *"arm64e)"* ]]; then
  333. sudo lipo -remove arm64e "$fp" -o "$fp" || true
  334. fi
  335. if [[ $(file "$fp") == *"arm64)"* ]]; then
  336. sudo lipo -remove arm64 "$fp" -o "$fp" || true
  337. fi
  338. fi
  339. done
  340. cd $opwd
  341. }
  342. tmpify /Library/Developer/CoreSimulator
  343. tmpify ~/Library/Developer/CoreSimulator
  344. tmpify $(xcode-select -p)/Platforms/AppleTVOS.platform
  345. tmpify $(xcode-select -p)/Platforms/iPhoneOS.platform
  346. tmpify $(xcode-select -p)/Platforms/WatchOS.platform
  347. tmpify $(xcode-select -p)/Platforms/WatchSimulator.platform
  348. tmpify $(xcode-select -p)/Platforms/AppleTVSimulator.platform
  349. tmpify $(xcode-select -p)/Platforms/iPhoneSimulator.platform
  350. tmpify $(xcode-select -p)/Toolchains/XcodeDefault.xctoolchain/usr/metal/ios
  351. tmpify $(xcode-select -p)/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift
  352. tmpify $(xcode-select -p)/Toolchains/XcodeDefault.xctoolchain/usr/lib/swift-5.0
  353. tmpify ~/.rubies
  354. tmpify ~/Library/Caches/Homebrew
  355. tmpify /usr/local/Homebrew
  356. sudo rm -rf $TMPDIR/del-target
  357. if [ "$TARGET_ARCH" == "arm64" ]; then
  358. sudo rm -rf "/System/Library/Desktop Pictures"
  359. sudo rm -rf /System/Library/Templates/Data
  360. sudo rm -rf /System/Library/Speech/Voices
  361. sudo rm -rf "/System/Library/Screen Savers"
  362. sudo rm -rf /System/Volumes/Data/Library/Developer/CommandLineTools/SDKs
  363. sudo rm -rf "/System/Volumes/Data/Library/Application Support/Apple/Photos/Print Products"
  364. sudo rm -rf /System/Volumes/Data/Library/Java
  365. sudo rm -rf /System/Volumes/Data/Library/Ruby
  366. sudo rm -rf /System/Volumes/Data/Library/Printers
  367. sudo rm -rf /System/iOSSupport
  368. sudo rm -rf /System/Applications/*.app
  369. sudo rm -rf /System/Applications/Utilities/*.app
  370. sudo rm -rf /System/Library/LinguisticData
  371. sudo rm -rf /System/Volumes/Data/private/var/db/dyld/*
  372. # sudo rm -rf /System/Library/Fonts/*
  373. # sudo rm -rf /System/Library/PreferencePanes
  374. sudo rm -rf /System/Library/AssetsV2/*
  375. sudo rm -rf /Applications/Safari.app
  376. sudo rm -rf ~/project/src/build/linux
  377. sudo rm -rf ~/project/src/third_party/catapult/tracing/test_data
  378. sudo rm -rf ~/project/src/third_party/angle/third_party/VK-GL-CTS
  379. # lipo off some huge binaries arm64 versions to save space
  380. strip_arm_deep $(xcode-select -p)/../SharedFrameworks
  381. strip_arm_deep /System/Volumes/Data/Library/Developer/CommandLineTools/usr
  382. fi
  383. fi
  384. background: true
  385. # On macOS delete all .git directories under src/ expect for
  386. # third_party/angle/ because of build time generation of file
  387. # gen/angle/commit.h depends on third_party/angle/.git/HEAD
  388. # https://chromium-review.googlesource.com/c/angle/angle/+/2074924
  389. # TODO: maybe better to always leave out */.git/HEAD file for all targets ?
  390. step-delete-git-directories: &step-delete-git-directories
  391. run:
  392. name: Delete all .git directories under src on MacOS to free space
  393. command: |
  394. if [ "`uname`" == "Darwin" ]; then
  395. cd src
  396. ( find . -type d -name ".git" -not -path "./third_party/angle/*" ) | xargs rm -rf
  397. fi
  398. # On macOS the yarn install command during gclient sync was run on a linux
  399. # machine and therefore installed a slightly different set of dependencies
  400. # Notably "fsevents" is a macOS only dependency, we rerun yarn install once
  401. # we are on a macOS machine to get the correct state
  402. step-install-npm-deps-on-mac: &step-install-npm-deps-on-mac
  403. run:
  404. name: Install node_modules on MacOS
  405. command: |
  406. if [ "`uname`" == "Darwin" ]; then
  407. cd src/electron
  408. node script/yarn install
  409. fi
  410. # This step handles the differences between the linux "gclient sync"
  411. # and the expected state on macOS
  412. step-fix-sync-on-mac: &step-fix-sync-on-mac
  413. run:
  414. name: Fix Sync on Mac
  415. command: |
  416. if [ "`uname`" == "Darwin" ]; then
  417. # Fix Clang Install (wrong binary)
  418. rm -rf src/third_party/llvm-build
  419. python src/tools/clang/scripts/update.py
  420. fi
  421. step-install-signing-cert-on-mac: &step-install-signing-cert-on-mac
  422. run:
  423. name: Import and trust self-signed codesigning cert on MacOS
  424. command: |
  425. if [ "$TARGET_ARCH" != "arm64" ] && [ "`uname`" == "Darwin" ]; then
  426. cd src/electron
  427. ./script/codesign/generate-identity.sh
  428. fi
  429. step-install-gnutar-on-mac: &step-install-gnutar-on-mac
  430. run:
  431. name: Install gnu-tar on macos
  432. command: |
  433. if [ "`uname`" == "Darwin" ]; then
  434. if [ ! -d /usr/local/Cellar/gnu-tar/ ]; then
  435. brew update
  436. brew install gnu-tar
  437. fi
  438. ln -fs /usr/local/bin/gtar /usr/local/bin/tar
  439. fi
  440. step-gn-gen-default: &step-gn-gen-default
  441. run:
  442. name: Default GN gen
  443. command: |
  444. cd src
  445. gn gen out/Default --args="import(\"$GN_CONFIG\") import(\"$GN_GOMA_FILE\") $GN_EXTRA_ARGS $GN_BUILDFLAG_ARGS"
  446. step-gn-check: &step-gn-check
  447. run:
  448. name: GN check
  449. command: |
  450. cd src
  451. gn check out/Default //electron:electron_lib
  452. gn check out/Default //electron:electron_app
  453. gn check out/Default //electron/shell/common/api:mojo
  454. # Check the hunspell filenames
  455. node electron/script/gen-hunspell-filenames.js --check
  456. node electron/script/gen-libc++-filenames.js --check
  457. step-electron-build: &step-electron-build
  458. run:
  459. name: Electron build
  460. no_output_timeout: 30m
  461. command: |
  462. # On arm platforms we generate a cross-arch ffmpeg that ninja does not seem
  463. # to realize is not correct / should be rebuilt. We delete it here so it is
  464. # rebuilt
  465. if [ "$TRIGGER_ARM_TEST" == "true" ]; then
  466. rm -f src/out/Default/libffmpeg.so
  467. fi
  468. cd src
  469. # Enable if things get really bad
  470. # if [ "$TARGET_ARCH" == "arm64" ] &&[ "`uname`" == "Darwin" ]; then
  471. # diskutil erasevolume HFS+ "xcode_disk" `hdiutil attach -nomount ram://12582912`
  472. # mv /Applications/Xcode-12.beta.5.app /Volumes/xcode_disk/
  473. # ln -s /Volumes/xcode_disk/Xcode-12.beta.5.app /Applications/Xcode-12.beta.5.app
  474. # fi
  475. # Lets generate a snapshot and mksnapshot and then delete all the x-compiled generated files to save space
  476. if [ "$USE_PREBUILT_V8_CONTEXT_SNAPSHOT" == "1" ]; then
  477. ninja -C out/Default electron:electron_mksnapshot_zip -j $NUMBER_OF_NINJA_PROCESSES
  478. ninja -C out/Default tools/v8_context_snapshot -j $NUMBER_OF_NINJA_PROCESSES
  479. gn desc out/Default v8:run_mksnapshot_default args > out/Default/mksnapshot_args
  480. (cd out/Default; zip mksnapshot.zip mksnapshot_args clang_x64_v8_arm64/gen/v8/embedded.S)
  481. rm -rf out/Default/clang_x64_v8_arm64/gen
  482. rm -rf out/Default/clang_x64_v8_arm64/obj
  483. rm -rf out/Default/clang_x64/obj
  484. # Regenerate because we just deleted some ninja files
  485. gn gen out/Default --args="import(\"$GN_CONFIG\") import(\"$GN_GOMA_FILE\") $GN_EXTRA_ARGS $GN_BUILDFLAG_ARGS"
  486. fi
  487. NINJA_SUMMARIZE_BUILD=1 autoninja -C out/Default electron -j $NUMBER_OF_NINJA_PROCESSES
  488. cp out/Default/.ninja_log out/electron_ninja_log
  489. node electron/script/check-symlinks.js
  490. step-maybe-electron-dist-strip: &step-maybe-electron-dist-strip
  491. run:
  492. name: Strip electron binaries
  493. command: |
  494. if [ "$STRIP_BINARIES" == "true" ] && [ "`uname`" == "Linux" ]; then
  495. if [ x"$TARGET_ARCH" == x ]; then
  496. target_cpu=x64
  497. elif [ "$TARGET_ARCH" == "ia32" ]; then
  498. target_cpu=x86
  499. else
  500. target_cpu="$TARGET_ARCH"
  501. fi
  502. cd src
  503. electron/script/copy-debug-symbols.py --target-cpu="$target_cpu" --out-dir=out/Default/debug --compress
  504. electron/script/strip-binaries.py --target-cpu="$target_cpu"
  505. electron/script/add-debug-link.py --target-cpu="$target_cpu" --debug-dir=out/Default/debug
  506. fi
  507. step-electron-chromedriver-build: &step-electron-chromedriver-build
  508. run:
  509. name: Build chromedriver.zip
  510. command: |
  511. cd src
  512. if [ "$TARGET_ARCH" == "arm" ] || [ "$TARGET_ARCH" == "arm64" ]; then
  513. gn gen out/chromedriver --args="import(\"$GN_CONFIG\") import(\"$GN_GOMA_FILE\") is_component_ffmpeg=false proprietary_codecs=false $GN_EXTRA_ARGS $GN_BUILDFLAG_ARGS"
  514. export CHROMEDRIVER_DIR="out/chromedriver"
  515. else
  516. export CHROMEDRIVER_DIR="out/Default"
  517. fi
  518. ninja -C $CHROMEDRIVER_DIR electron:electron_chromedriver -j $NUMBER_OF_NINJA_PROCESSES
  519. if [ "`uname`" == "Linux" ]; then
  520. electron/script/strip-binaries.py --target-cpu="$TARGET_ARCH" --file $PWD/$CHROMEDRIVER_DIR/chromedriver
  521. fi
  522. ninja -C $CHROMEDRIVER_DIR electron:electron_chromedriver_zip
  523. if [ "$TARGET_ARCH" == "arm" ] || [ "$TARGET_ARCH" == "arm64" ]; then
  524. cp out/chromedriver/chromedriver.zip out/Default
  525. fi
  526. step-nodejs-headers-build: &step-nodejs-headers-build
  527. run:
  528. name: Build Node.js headers
  529. command: |
  530. cd src
  531. ninja -C out/Default third_party/electron_node:headers
  532. step-electron-publish: &step-electron-publish
  533. run:
  534. name: Publish Electron Dist
  535. command: |
  536. if [ "`uname`" == "Darwin" ]; then
  537. rm -rf src/out/Default/obj
  538. fi
  539. cd src/electron
  540. if [ "$UPLOAD_TO_STORAGE" == "1" ]; then
  541. echo 'Uploading Electron release distribution to Azure'
  542. script/release/uploaders/upload.py --verbose --UPLOAD_TO_STORAGE
  543. else
  544. echo 'Uploading Electron release distribution to Github releases'
  545. script/release/uploaders/upload.py --verbose
  546. fi
  547. step-persist-data-for-tests: &step-persist-data-for-tests
  548. persist_to_workspace:
  549. root: .
  550. paths:
  551. # Build artifacts
  552. - src/out/Default/dist.zip
  553. - src/out/Default/mksnapshot.zip
  554. - src/out/Default/chromedriver.zip
  555. - src/out/Default/gen/node_headers
  556. - src/out/ffmpeg/ffmpeg.zip
  557. - src/electron
  558. - src/third_party/electron_node
  559. - src/third_party/nan
  560. - src/cross-arch-snapshots
  561. - src/third_party/llvm-build
  562. - src/build/linux
  563. - src/buildtools/third_party/libc++
  564. - src/buildtools/third_party/libc++abi
  565. - src/out/Default/obj/buildtools/third_party
  566. step-electron-dist-unzip: &step-electron-dist-unzip
  567. run:
  568. name: Unzip dist.zip
  569. command: |
  570. cd src/out/Default
  571. # -o overwrite files WITHOUT prompting
  572. # TODO(alexeykuzmin): Remove '-o' when it's no longer needed.
  573. # -: allows to extract archive members into locations outside
  574. # of the current ``extraction root folder''.
  575. # ASan builds have the llvm-symbolizer binaries listed as
  576. # runtime_deps, with their paths as `../../third_party/...`
  577. # unzip exits with non-zero code on such zip files unless -: is
  578. # passed.
  579. unzip -:o dist.zip
  580. step-ffmpeg-unzip: &step-ffmpeg-unzip
  581. run:
  582. name: Unzip ffmpeg.zip
  583. command: |
  584. cd src/out/ffmpeg
  585. unzip -:o ffmpeg.zip
  586. step-mksnapshot-unzip: &step-mksnapshot-unzip
  587. run:
  588. name: Unzip mksnapshot.zip
  589. command: |
  590. cd src/out/Default
  591. unzip -:o mksnapshot.zip
  592. step-chromedriver-unzip: &step-chromedriver-unzip
  593. run:
  594. name: Unzip chromedriver.zip
  595. command: |
  596. cd src/out/Default
  597. unzip -:o chromedriver.zip
  598. step-ffmpeg-gn-gen: &step-ffmpeg-gn-gen
  599. run:
  600. name: ffmpeg GN gen
  601. command: |
  602. cd src
  603. gn gen out/ffmpeg --args="import(\"//electron/build/args/ffmpeg.gn\") import(\"$GN_GOMA_FILE\") $GN_EXTRA_ARGS"
  604. step-ffmpeg-build: &step-ffmpeg-build
  605. run:
  606. name: Non proprietary ffmpeg build
  607. command: |
  608. cd src
  609. ninja -C out/ffmpeg electron:electron_ffmpeg_zip -j $NUMBER_OF_NINJA_PROCESSES
  610. step-verify-ffmpeg: &step-verify-ffmpeg
  611. run:
  612. name: Verify ffmpeg
  613. command: |
  614. cd src
  615. python electron/script/verify-ffmpeg.py --source-root "$PWD" --build-dir out/Default --ffmpeg-path out/ffmpeg
  616. step-verify-mksnapshot: &step-verify-mksnapshot
  617. run:
  618. name: Verify mksnapshot
  619. command: |
  620. if [ "$IS_ASAN" != "1" ]; then
  621. cd src
  622. if [ "$TARGET_ARCH" == "arm" ] || [ "$TARGET_ARCH" == "arm64" ]; then
  623. python electron/script/verify-mksnapshot.py --source-root "$PWD" --build-dir out/Default --snapshot-files-dir $PWD/cross-arch-snapshots
  624. else
  625. python electron/script/verify-mksnapshot.py --source-root "$PWD" --build-dir out/Default
  626. fi
  627. fi
  628. step-verify-chromedriver: &step-verify-chromedriver
  629. run:
  630. name: Verify ChromeDriver
  631. command: |
  632. if [ "$IS_ASAN" != "1" ]; then
  633. cd src
  634. python electron/script/verify-chromedriver.py --source-root "$PWD" --build-dir out/Default
  635. fi
  636. step-setup-linux-for-headless-testing: &step-setup-linux-for-headless-testing
  637. run:
  638. name: Setup for headless testing
  639. command: |
  640. if [ "`uname`" != "Darwin" ]; then
  641. sh -e /etc/init.d/xvfb start
  642. fi
  643. step-show-goma-stats: &step-show-goma-stats
  644. run:
  645. shell: /bin/bash
  646. name: Check goma stats after build
  647. command: |
  648. set +e
  649. set +o pipefail
  650. $LOCAL_GOMA_DIR/goma_ctl.py stat
  651. $LOCAL_GOMA_DIR/diagnose_goma_log.py
  652. true
  653. when: always
  654. background: true
  655. step-mksnapshot-build: &step-mksnapshot-build
  656. run:
  657. name: mksnapshot build
  658. command: |
  659. cd src
  660. if [ "$USE_PREBUILT_V8_CONTEXT_SNAPSHOT" != "1" ]; then
  661. ninja -C out/Default electron:electron_mksnapshot -j $NUMBER_OF_NINJA_PROCESSES
  662. gn desc out/Default v8:run_mksnapshot_default args > out/Default/mksnapshot_args
  663. fi
  664. if [ "`uname`" != "Darwin" ]; then
  665. if [ "$TARGET_ARCH" == "arm" ]; then
  666. electron/script/strip-binaries.py --file $PWD/out/Default/clang_x86_v8_arm/mksnapshot
  667. electron/script/strip-binaries.py --file $PWD/out/Default/clang_x86_v8_arm/v8_context_snapshot_generator
  668. elif [ "$TARGET_ARCH" == "arm64" ]; then
  669. electron/script/strip-binaries.py --file $PWD/out/Default/clang_x64_v8_arm64/mksnapshot
  670. electron/script/strip-binaries.py --file $PWD/out/Default/clang_x64_v8_arm64/v8_context_snapshot_generator
  671. else
  672. electron/script/strip-binaries.py --file $PWD/out/Default/mksnapshot
  673. electron/script/strip-binaries.py --file $PWD/out/Default/v8_context_snapshot_generator
  674. fi
  675. fi
  676. if [ "$USE_PREBUILT_V8_CONTEXT_SNAPSHOT" != "1" ] && [ "$SKIP_DIST_ZIP" != "1" ]; then
  677. ninja -C out/Default electron:electron_mksnapshot_zip -j $NUMBER_OF_NINJA_PROCESSES
  678. (cd out/Default; zip mksnapshot.zip mksnapshot_args gen/v8/embedded.S)
  679. fi
  680. step-hunspell-build: &step-hunspell-build
  681. run:
  682. name: hunspell build
  683. command: |
  684. cd src
  685. if [ "$SKIP_DIST_ZIP" != "1" ]; then
  686. ninja -C out/Default electron:hunspell_dictionaries_zip -j $NUMBER_OF_NINJA_PROCESSES
  687. fi
  688. step-maybe-generate-libcxx: &step-maybe-generate-libcxx
  689. run:
  690. name: maybe generate libcxx
  691. command: |
  692. cd src
  693. if [ "`uname`" == "Linux" ]; then
  694. ninja -C out/Default electron:libcxx_headers_zip -j $NUMBER_OF_NINJA_PROCESSES
  695. ninja -C out/Default electron:libcxxabi_headers_zip -j $NUMBER_OF_NINJA_PROCESSES
  696. ninja -C out/Default electron:libcxx_objects_zip -j $NUMBER_OF_NINJA_PROCESSES
  697. fi
  698. step-maybe-generate-breakpad-symbols: &step-maybe-generate-breakpad-symbols
  699. run:
  700. name: Generate breakpad symbols
  701. no_output_timeout: 30m
  702. command: |
  703. if [ "$GENERATE_SYMBOLS" == "true" ]; then
  704. cd src
  705. ninja -C out/Default electron:electron_symbols
  706. fi
  707. step-maybe-zip-symbols: &step-maybe-zip-symbols
  708. run:
  709. name: Zip symbols
  710. command: |
  711. cd src
  712. export BUILD_PATH="$PWD/out/Default"
  713. ninja -C out/Default electron:licenses
  714. ninja -C out/Default electron:electron_version
  715. DELETE_DSYMS_AFTER_ZIP=1 electron/script/zip-symbols.py -b $BUILD_PATH
  716. step-maybe-cross-arch-snapshot: &step-maybe-cross-arch-snapshot
  717. run:
  718. name: Generate cross arch snapshot (arm/arm64)
  719. command: |
  720. if [ "$GENERATE_CROSS_ARCH_SNAPSHOT" == "true" ] && [ -z "$CIRCLE_PR_NUMBER" ]; then
  721. cd src
  722. if [ "$TARGET_ARCH" == "arm" ]; then
  723. export MKSNAPSHOT_PATH="clang_x86_v8_arm"
  724. elif [ "$TARGET_ARCH" == "arm64" ]; then
  725. export MKSNAPSHOT_PATH="clang_x64_v8_arm64"
  726. fi
  727. cp "out/Default/$MKSNAPSHOT_PATH/mksnapshot" out/Default
  728. cp "out/Default/$MKSNAPSHOT_PATH/v8_context_snapshot_generator" out/Default
  729. if [ "`uname`" == "Linux" ]; then
  730. cp "out/Default/$MKSNAPSHOT_PATH/libffmpeg.so" out/Default
  731. elif [ "`uname`" == "Darwin" ]; then
  732. cp "out/Default/$MKSNAPSHOT_PATH/libffmpeg.dylib" out/Default
  733. fi
  734. python electron/script/verify-mksnapshot.py --source-root "$PWD" --build-dir out/Default --create-snapshot-only
  735. mkdir cross-arch-snapshots
  736. cp out/Default-mksnapshot-test/*.bin cross-arch-snapshots
  737. fi
  738. step-maybe-generate-typescript-defs: &step-maybe-generate-typescript-defs
  739. run:
  740. name: Generate type declarations
  741. command: |
  742. if [ "`uname`" == "Darwin" ]; then
  743. cd src/electron
  744. node script/yarn create-typescript-definitions
  745. fi
  746. step-fix-known-hosts-linux: &step-fix-known-hosts-linux
  747. run:
  748. name: Fix Known Hosts on Linux
  749. command: |
  750. if [ "`uname`" == "Linux" ]; then
  751. ./src/electron/.circleci/fix-known-hosts.sh
  752. fi
  753. # Checkout Steps
  754. step-generate-deps-hash: &step-generate-deps-hash
  755. run:
  756. name: Generate DEPS Hash
  757. command: node src/electron/script/generate-deps-hash.js && cat src/electron/.depshash-target
  758. step-touch-sync-done: &step-touch-sync-done
  759. run:
  760. name: Touch Sync Done
  761. command: touch src/electron/.circle-sync-done
  762. # Restore exact src cache based on the hash of DEPS and patches/*
  763. # If no cache is matched EXACTLY then the .circle-sync-done file is empty
  764. # If a cache is matched EXACTLY then the .circle-sync-done file contains "done"
  765. step-maybe-restore-src-cache: &step-maybe-restore-src-cache
  766. restore_cache:
  767. keys:
  768. - v14-src-cache-{{ checksum "src/electron/.depshash" }}
  769. name: Restoring src cache
  770. step-maybe-restore-src-cache-marker: &step-maybe-restore-src-cache-marker
  771. restore_cache:
  772. keys:
  773. - v14-src-cache-marker-{{ checksum "src/electron/.depshash" }}
  774. name: Restoring src cache marker
  775. # Restore exact or closest git cache based on the hash of DEPS and .circle-sync-done
  776. # If the src cache was restored above then this will match an empty cache
  777. # If the src cache was not restored above then this will match a close git cache
  778. step-maybe-restore-git-cache: &step-maybe-restore-git-cache
  779. restore_cache:
  780. paths:
  781. - git-cache
  782. keys:
  783. - v1-git-cache-{{ checksum "src/electron/.circle-sync-done" }}-{{ checksum "src/electron/DEPS" }}
  784. - v1-git-cache-{{ checksum "src/electron/.circle-sync-done" }}
  785. name: Conditionally restoring git cache
  786. step-restore-out-cache: &step-restore-out-cache
  787. restore_cache:
  788. paths:
  789. - ./src/out/Default
  790. keys:
  791. - v9-out-cache-{{ checksum "src/electron/.depshash" }}-{{ checksum "src/electron/.depshash-target" }}
  792. name: Restoring out cache
  793. step-set-git-cache-path: &step-set-git-cache-path
  794. run:
  795. name: Set GIT_CACHE_PATH to make gclient to use the cache
  796. command: |
  797. # CircleCI does not support interpolation when setting environment variables.
  798. # https://circleci.com/docs/2.0/env-vars/#setting-an-environment-variable-in-a-shell-command
  799. echo 'export GIT_CACHE_PATH="$PWD/git-cache"' >> $BASH_ENV
  800. # Persist the git cache based on the hash of DEPS and .circle-sync-done
  801. # If the src cache was restored above then this will persist an empty cache
  802. step-save-git-cache: &step-save-git-cache
  803. save_cache:
  804. paths:
  805. - git-cache
  806. key: v1-git-cache-{{ checksum "src/electron/.circle-sync-done" }}-{{ checksum "src/electron/DEPS" }}
  807. name: Persisting git cache
  808. step-save-out-cache: &step-save-out-cache
  809. save_cache:
  810. paths:
  811. - ./src/out/Default
  812. key: v9-out-cache-{{ checksum "src/electron/.depshash" }}-{{ checksum "src/electron/.depshash-target" }}
  813. name: Persisting out cache
  814. step-run-electron-only-hooks: &step-run-electron-only-hooks
  815. run:
  816. name: Run Electron Only Hooks
  817. command: gclient runhooks --spec="solutions=[{'name':'src/electron','url':None,'deps_file':'DEPS','custom_vars':{'process_deps':False},'managed':False}]"
  818. step-generate-deps-hash-cleanly: &step-generate-deps-hash-cleanly
  819. run:
  820. name: Generate DEPS Hash
  821. command: (cd src/electron && git checkout .) && node src/electron/script/generate-deps-hash.js && cat src/electron/.depshash-target
  822. # Mark the sync as done for future cache saving
  823. step-mark-sync-done: &step-mark-sync-done
  824. run:
  825. name: Mark Sync Done
  826. command: echo DONE > src/electron/.circle-sync-done
  827. # Minimize the size of the cache
  828. step-minimize-workspace-size-from-checkout: &step-minimize-workspace-size-from-checkout
  829. run:
  830. name: Remove some unused data to avoid storing it in the workspace/cache
  831. command: |
  832. rm -rf src/android_webview
  833. rm -rf src/ios/chrome
  834. rm -rf src/third_party/blink/web_tests
  835. rm -rf src/third_party/blink/perf_tests
  836. rm -rf src/third_party/WebKit/LayoutTests
  837. rm -rf third_party/electron_node/deps/openssl
  838. rm -rf third_party/electron_node/deps/v8
  839. rm -rf chrome/test/data/xr/webvr_info
  840. # Save the src cache based on the deps hash
  841. step-save-src-cache: &step-save-src-cache
  842. save_cache:
  843. paths:
  844. - /var/portal
  845. key: v14-src-cache-{{ checksum "/var/portal/src/electron/.depshash" }}
  846. name: Persisting src cache
  847. step-make-src-cache-marker: &step-make-src-cache-marker
  848. run:
  849. name: Making src cache marker
  850. command: touch .src-cache-marker
  851. step-save-src-cache-marker: &step-save-src-cache-marker
  852. save_cache:
  853. paths:
  854. - .src-cache-marker
  855. key: v14-src-cache-marker-{{ checksum "/var/portal/src/electron/.depshash" }}
  856. step-maybe-early-exit-no-doc-change: &step-maybe-early-exit-no-doc-change
  857. run:
  858. name: Shortcircuit job if change is not doc only
  859. command: |
  860. if [ ! -s src/electron/.skip-ci-build ]; then
  861. circleci-agent step halt
  862. fi
  863. step-ts-compile: &step-ts-compile
  864. run:
  865. name: Run TS/JS compile on doc only change
  866. command: |
  867. cd src
  868. ninja -C out/Default electron:default_app_js -j $NUMBER_OF_NINJA_PROCESSES
  869. ninja -C out/Default electron:electron_js2c -j $NUMBER_OF_NINJA_PROCESSES
  870. # List of all steps.
  871. steps-electron-gn-check: &steps-electron-gn-check
  872. steps:
  873. - *step-checkout-electron
  874. - *step-depot-tools-get
  875. - *step-depot-tools-add-to-path
  876. - *step-setup-env-for-build
  877. - *step-setup-goma-for-build
  878. - *step-generate-deps-hash
  879. - *step-touch-sync-done
  880. - maybe-restore-portaled-src-cache
  881. - *step-wait-for-goma
  882. - *step-gn-gen-default
  883. - *step-gn-check
  884. steps-electron-ts-compile-for-doc-change: &steps-electron-ts-compile-for-doc-change
  885. steps:
  886. # Checkout - Copied from steps-checkout
  887. - *step-checkout-electron
  888. - *step-depot-tools-get
  889. - *step-depot-tools-add-to-path
  890. - *step-restore-brew-cache
  891. - *step-install-gnutar-on-mac
  892. - *step-get-more-space-on-mac
  893. - *step-setup-goma-for-build
  894. - *step-generate-deps-hash
  895. - *step-touch-sync-done
  896. - maybe-restore-portaled-src-cache
  897. - *step-maybe-restore-git-cache
  898. - *step-set-git-cache-path
  899. # This sync call only runs if .circle-sync-done is an EMPTY file
  900. - *step-gclient-sync
  901. # These next few steps reset Electron to the correct commit regardless of which cache was restored
  902. - run:
  903. name: Wipe Electron
  904. command: rm -rf src/electron
  905. - *step-checkout-electron
  906. - *step-run-electron-only-hooks
  907. - *step-generate-deps-hash-cleanly
  908. - *step-mark-sync-done
  909. - *step-minimize-workspace-size-from-checkout
  910. - *step-depot-tools-add-to-path
  911. - *step-setup-env-for-build
  912. - *step-wait-for-goma
  913. - *step-get-more-space-on-mac
  914. - *step-install-npm-deps-on-mac
  915. - *step-fix-sync-on-mac
  916. - *step-gn-gen-default
  917. #Compile ts/js to verify doc change didn't break anything
  918. - *step-ts-compile
  919. steps-native-tests: &steps-native-tests
  920. steps:
  921. - attach_workspace:
  922. at: .
  923. - *step-depot-tools-add-to-path
  924. - *step-setup-env-for-build
  925. - *step-setup-goma-for-build
  926. - *step-wait-for-goma
  927. - *step-gn-gen-default
  928. - run:
  929. name: Build tests
  930. command: |
  931. cd src
  932. ninja -C out/Default $BUILD_TARGET
  933. - *step-show-goma-stats
  934. - *step-setup-linux-for-headless-testing
  935. - run:
  936. name: Run tests
  937. command: |
  938. mkdir test_results
  939. python src/electron/script/native-tests.py run \
  940. --config $TESTS_CONFIG \
  941. --tests-dir src/out/Default \
  942. --output-dir test_results \
  943. $TESTS_ARGS
  944. - store_artifacts:
  945. path: test_results
  946. destination: test_results # Put it in the root folder.
  947. - store_test_results:
  948. path: test_results
  949. steps-verify-ffmpeg: &steps-verify-ffmpeg
  950. steps:
  951. - attach_workspace:
  952. at: .
  953. - *step-depot-tools-add-to-path
  954. - *step-electron-dist-unzip
  955. - *step-ffmpeg-unzip
  956. - *step-setup-linux-for-headless-testing
  957. - *step-verify-ffmpeg
  958. - *step-maybe-notify-slack-failure
  959. steps-tests: &steps-tests
  960. steps:
  961. - attach_workspace:
  962. at: .
  963. - *step-depot-tools-add-to-path
  964. - *step-electron-dist-unzip
  965. - *step-mksnapshot-unzip
  966. - *step-chromedriver-unzip
  967. - *step-setup-linux-for-headless-testing
  968. - *step-restore-brew-cache
  969. - *step-fix-known-hosts-linux
  970. - *step-install-signing-cert-on-mac
  971. - run:
  972. name: Run Electron tests
  973. environment:
  974. MOCHA_REPORTER: mocha-multi-reporters
  975. ELECTRON_TEST_RESULTS_DIR: junit
  976. MOCHA_MULTI_REPORTERS: mocha-junit-reporter, tap
  977. ELECTRON_DISABLE_SECURITY_WARNINGS: 1
  978. command: |
  979. cd src
  980. if [ "$IS_ASAN" == "1" ]; then
  981. ASAN_SYMBOLIZE="$PWD/tools/valgrind/asan/asan_symbolize.py --executable-path=$PWD/out/Default/electron"
  982. export ASAN_OPTIONS="symbolize=0 handle_abort=1"
  983. export G_SLICE=always-malloc
  984. export NSS_DISABLE_ARENA_FREE_LIST=1
  985. export NSS_DISABLE_UNLOAD=1
  986. export LLVM_SYMBOLIZER_PATH=$PWD/third_party/llvm-build/Release+Asserts/bin/llvm-symbolizer
  987. export MOCHA_TIMEOUT=180000
  988. echo "Piping output to ASAN_SYMBOLIZE ($ASAN_SYMBOLIZE)"
  989. (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
  990. (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
  991. else
  992. if [ "$TARGET_ARCH" == "arm" ] || [ "$TARGET_ARCH" == "arm64" ]; then
  993. export ELECTRON_SKIP_NATIVE_MODULE_TESTS=true
  994. (cd electron && node script/yarn test --runners=main --trace-uncaught --enable-logging)
  995. (cd electron && node script/yarn test --runners=remote --trace-uncaught --enable-logging)
  996. else
  997. if [ "$TARGET_ARCH" == "ia32" ]; then
  998. npm_config_arch=x64 node electron/node_modules/dugite/script/download-git.js
  999. fi
  1000. (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))
  1001. (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))
  1002. fi
  1003. fi
  1004. - run:
  1005. name: Check test results existence
  1006. command: |
  1007. cd src
  1008. # Check if test results exist and are not empty.
  1009. if [ ! -s "junit/test-results-remote.xml" ]; then
  1010. exit 1
  1011. fi
  1012. if [ ! -s "junit/test-results-main.xml" ]; then
  1013. exit 1
  1014. fi
  1015. - store_test_results:
  1016. path: src/junit
  1017. - *step-verify-mksnapshot
  1018. - *step-verify-chromedriver
  1019. - *step-maybe-notify-slack-failure
  1020. - *step-maybe-cleanup-arm64-mac
  1021. steps-test-nan: &steps-test-nan
  1022. steps:
  1023. - attach_workspace:
  1024. at: .
  1025. - *step-depot-tools-add-to-path
  1026. - *step-electron-dist-unzip
  1027. - *step-setup-linux-for-headless-testing
  1028. - *step-fix-known-hosts-linux
  1029. - run:
  1030. name: Run Nan Tests
  1031. command: |
  1032. cd src
  1033. node electron/script/nan-spec-runner.js
  1034. steps-test-node: &steps-test-node
  1035. steps:
  1036. - attach_workspace:
  1037. at: .
  1038. - *step-depot-tools-add-to-path
  1039. - *step-electron-dist-unzip
  1040. - *step-setup-linux-for-headless-testing
  1041. - *step-fix-known-hosts-linux
  1042. - run:
  1043. name: Run Node Tests
  1044. command: |
  1045. cd src
  1046. node electron/script/node-spec-runner.js --default --jUnitDir=junit
  1047. - store_test_results:
  1048. path: src/junit
  1049. # Command Aliases
  1050. commands:
  1051. maybe-restore-portaled-src-cache:
  1052. parameters:
  1053. halt-if-successful:
  1054. type: boolean
  1055. default: false
  1056. steps:
  1057. - run:
  1058. name: Prepare for cross-OS sync restore
  1059. command: |
  1060. sudo mkdir -p /var/portal
  1061. sudo chown -R $(id -u):$(id -g) /var/portal
  1062. - when:
  1063. condition: << parameters.halt-if-successful >>
  1064. steps:
  1065. - *step-maybe-restore-src-cache-marker
  1066. - run:
  1067. name: Halt the job early if the src cache exists
  1068. command: |
  1069. if [ -f ".src-cache-marker" ]; then
  1070. circleci-agent step halt
  1071. fi
  1072. - *step-maybe-restore-src-cache
  1073. - run:
  1074. name: Fix the src cache restore point on macOS
  1075. command: |
  1076. if [ -d "/var/portal/src" ]; then
  1077. echo Relocating Cache
  1078. rm -rf src
  1079. mv /var/portal/src ./
  1080. fi
  1081. move_and_store_all_artifacts:
  1082. steps:
  1083. - run:
  1084. name: Move all generated artifacts to upload folder
  1085. command: |
  1086. rm -rf generated_artifacts
  1087. mkdir generated_artifacts
  1088. mv_if_exist() {
  1089. if [ -f "$1" ] || [ -d "$1" ]; then
  1090. echo Storing $1
  1091. mv $1 generated_artifacts
  1092. else
  1093. echo Skipping $1 - It is not present on disk
  1094. fi
  1095. }
  1096. mv_if_exist src/out/Default/dist.zip
  1097. mv_if_exist src/out/Default/gen/node_headers.tar.gz
  1098. mv_if_exist src/out/Default/symbols.zip
  1099. mv_if_exist src/out/Default/mksnapshot.zip
  1100. mv_if_exist src/out/Default/chromedriver.zip
  1101. mv_if_exist src/out/ffmpeg/ffmpeg.zip
  1102. mv_if_exist src/out/Default/hunspell_dictionaries.zip
  1103. mv_if_exist src/cross-arch-snapshots
  1104. mv_if_exist src/out/electron_ninja_log
  1105. when: always
  1106. - store_artifacts:
  1107. path: generated_artifacts
  1108. destination: ./
  1109. - store_artifacts:
  1110. path: generated_artifacts/cross-arch-snapshots
  1111. destination: cross-arch-snapshots
  1112. checkout-from-cache:
  1113. steps:
  1114. - *step-checkout-electron
  1115. - *step-depot-tools-get
  1116. - *step-depot-tools-add-to-path
  1117. - *step-generate-deps-hash
  1118. - maybe-restore-portaled-src-cache
  1119. - run:
  1120. name: Ensure src checkout worked
  1121. command: |
  1122. if [ ! -d "src/third_party/blink" ]; then
  1123. echo src cache was not restored for some reason, idk what happened here...
  1124. exit 1
  1125. fi
  1126. - run:
  1127. name: Wipe Electron
  1128. command: rm -rf src/electron
  1129. - *step-checkout-electron
  1130. - *step-run-electron-only-hooks
  1131. - *step-generate-deps-hash-cleanly
  1132. step-electron-dist-build:
  1133. parameters:
  1134. additional-targets:
  1135. type: string
  1136. default: ''
  1137. steps:
  1138. - run:
  1139. name: Build dist.zip
  1140. command: |
  1141. cd src
  1142. if [ "$SKIP_DIST_ZIP" != "1" ]; then
  1143. ninja -C out/Default electron:electron_dist_zip << parameters.additional-targets >>
  1144. if [ "$CHECK_DIST_MANIFEST" == "1" ]; then
  1145. if [ "`uname`" == "Darwin" ]; then
  1146. target_os=mac
  1147. target_cpu=x64
  1148. if [ x"$MAS_BUILD" == x"true" ]; then
  1149. target_os=mac_mas
  1150. fi
  1151. if [ "$TARGET_ARCH" == "arm64" ]; then
  1152. target_cpu=arm64
  1153. fi
  1154. elif [ "`uname`" == "Linux" ]; then
  1155. target_os=linux
  1156. if [ x"$TARGET_ARCH" == x ]; then
  1157. target_cpu=x64
  1158. elif [ "$TARGET_ARCH" == "ia32" ]; then
  1159. target_cpu=x86
  1160. else
  1161. target_cpu="$TARGET_ARCH"
  1162. fi
  1163. else
  1164. echo "Unknown system: `uname`"
  1165. exit 1
  1166. fi
  1167. electron/script/zip_manifests/check-zip-manifest.py out/Default/dist.zip electron/script/zip_manifests/dist_zip.$target_os.$target_cpu.manifest
  1168. fi
  1169. fi
  1170. electron-build:
  1171. parameters:
  1172. attach:
  1173. type: boolean
  1174. default: false
  1175. persist:
  1176. type: boolean
  1177. default: true
  1178. persist-checkout:
  1179. type: boolean
  1180. default: false
  1181. checkout:
  1182. type: boolean
  1183. default: true
  1184. checkout-and-assume-cache:
  1185. type: boolean
  1186. default: false
  1187. save-git-cache:
  1188. type: boolean
  1189. default: false
  1190. checkout-to-create-src-cache:
  1191. type: boolean
  1192. default: false
  1193. build:
  1194. type: boolean
  1195. default: true
  1196. use-out-cache:
  1197. type: boolean
  1198. default: true
  1199. restore-src-cache:
  1200. type: boolean
  1201. default: true
  1202. build-nonproprietary-ffmpeg:
  1203. type: boolean
  1204. default: true
  1205. steps:
  1206. - when:
  1207. condition: << parameters.attach >>
  1208. steps:
  1209. - attach_workspace:
  1210. at: .
  1211. - run: rm -rf src/electron
  1212. - *step-restore-brew-cache
  1213. - *step-install-gnutar-on-mac
  1214. - *step-save-brew-cache
  1215. - when:
  1216. condition: << parameters.build >>
  1217. steps:
  1218. - *step-setup-goma-for-build
  1219. - when:
  1220. condition: << parameters.checkout-and-assume-cache >>
  1221. steps:
  1222. - checkout-from-cache
  1223. - when:
  1224. condition: << parameters.checkout >>
  1225. steps:
  1226. # Checkout - Copied from steps-checkout
  1227. - *step-checkout-electron
  1228. - *step-depot-tools-get
  1229. - *step-depot-tools-add-to-path
  1230. - *step-get-more-space-on-mac
  1231. - *step-generate-deps-hash
  1232. - *step-touch-sync-done
  1233. - when:
  1234. condition: << parameters.restore-src-cache >>
  1235. steps:
  1236. - maybe-restore-portaled-src-cache:
  1237. halt-if-successful: << parameters.checkout-to-create-src-cache >>
  1238. - *step-maybe-restore-git-cache
  1239. - *step-set-git-cache-path
  1240. # This sync call only runs if .circle-sync-done is an EMPTY file
  1241. - *step-gclient-sync
  1242. - store_artifacts:
  1243. path: patches
  1244. - when:
  1245. condition: << parameters.save-git-cache >>
  1246. steps:
  1247. - *step-save-git-cache
  1248. # These next few steps reset Electron to the correct commit regardless of which cache was restored
  1249. - run:
  1250. name: Wipe Electron
  1251. command: rm -rf src/electron
  1252. - *step-checkout-electron
  1253. - *step-run-electron-only-hooks
  1254. - *step-generate-deps-hash-cleanly
  1255. - *step-touch-sync-done
  1256. - when:
  1257. condition: << parameters.save-git-cache >>
  1258. steps:
  1259. - *step-save-git-cache
  1260. # Mark sync as done _after_ saving the git cache so that it is uploaded
  1261. # only when the src cache was not present
  1262. # Their are theoretically two cases for this cache key
  1263. # 1. `vX-git-cache-DONE-{deps_hash}
  1264. # 2. `vX-git-cache-EMPTY-{deps_hash}
  1265. #
  1266. # Case (1) occurs when the flag file has "DONE" in it
  1267. # which only occurs when "step-mark-sync-done" is run
  1268. # or when the src cache was restored successfully as that
  1269. # flag file contains "DONE" in the src cache.
  1270. #
  1271. # Case (2) occurs when the flag file is empty, this occurs
  1272. # when the src cache was not restored and "step-mark-sync-done"
  1273. # has not run yet.
  1274. #
  1275. # Notably both of these cases also have completely different
  1276. # gclient cache states.
  1277. # In (1) the git cache is completely empty as we didn't run
  1278. # "gclient sync" because the src cache was restored.
  1279. # In (2) the git cache is full as we had to run "gclient sync"
  1280. #
  1281. # This allows us to do make the follow transitive assumption:
  1282. # In cases where the src cache is restored, saving the git cache
  1283. # will save an empty cache. In cases where the src cache is built
  1284. # during this build the git cache will save a full cache.
  1285. #
  1286. # In order words if there is a src cache for a given DEPS hash
  1287. # the git cache restored will be empty. But if the src cache
  1288. # is missing we will restore a useful git cache.
  1289. - *step-mark-sync-done
  1290. - *step-minimize-workspace-size-from-checkout
  1291. - *step-delete-git-directories
  1292. - when:
  1293. condition: << parameters.persist-checkout >>
  1294. steps:
  1295. - persist_to_workspace:
  1296. root: .
  1297. paths:
  1298. - depot_tools
  1299. - src
  1300. - when:
  1301. condition: << parameters.checkout-to-create-src-cache >>
  1302. steps:
  1303. - run:
  1304. name: Move src folder to the cross-OS portal
  1305. command: |
  1306. sudo mkdir -p /var/portal
  1307. sudo chown -R $(id -u):$(id -g) /var/portal
  1308. mv ./src /var/portal
  1309. - *step-save-src-cache
  1310. - *step-make-src-cache-marker
  1311. - *step-save-src-cache-marker
  1312. - when:
  1313. condition: << parameters.build >>
  1314. steps:
  1315. - *step-depot-tools-add-to-path
  1316. - *step-setup-env-for-build
  1317. - *step-wait-for-goma
  1318. - *step-get-more-space-on-mac
  1319. - *step-fix-sync-on-mac
  1320. - *step-delete-git-directories
  1321. # Electron app
  1322. - when:
  1323. condition: << parameters.use-out-cache >>
  1324. steps:
  1325. - *step-restore-out-cache
  1326. - *step-gn-gen-default
  1327. - *step-electron-build
  1328. - *step-maybe-electron-dist-strip
  1329. - step-electron-dist-build:
  1330. additional-targets: shell_browser_ui_unittests third_party/electron_node:headers electron:hunspell_dictionaries_zip
  1331. - *step-show-goma-stats
  1332. # mksnapshot
  1333. - *step-mksnapshot-build
  1334. - *step-maybe-cross-arch-snapshot
  1335. # chromedriver
  1336. - *step-electron-chromedriver-build
  1337. - when:
  1338. condition: << parameters.build-nonproprietary-ffmpeg >>
  1339. steps:
  1340. # ffmpeg
  1341. - *step-ffmpeg-gn-gen
  1342. - *step-ffmpeg-build
  1343. # Save all data needed for a further tests run.
  1344. - when:
  1345. condition: << parameters.persist >>
  1346. steps:
  1347. - *step-minimize-workspace-size-from-checkout
  1348. - run: |
  1349. rm -rf src/third_party/electron_node/deps/openssl
  1350. rm -rf src/third_party/electron_node/deps/v8
  1351. - *step-persist-data-for-tests
  1352. - when:
  1353. condition: << parameters.build >>
  1354. steps:
  1355. - *step-maybe-generate-breakpad-symbols
  1356. - *step-maybe-zip-symbols
  1357. - when:
  1358. condition: << parameters.build >>
  1359. steps:
  1360. - move_and_store_all_artifacts
  1361. - run:
  1362. name: Remove the big things on macOS, this seems to be better on average
  1363. command: |
  1364. if [ "`uname`" == "Darwin" ]; then
  1365. mkdir -p src/out/Default
  1366. cd src/out/Default
  1367. find . -type f -size +50M -delete
  1368. mkdir -p gen/electron
  1369. cd gen/electron
  1370. # These files do not seem to like being in a cache, let us remove them
  1371. find . -type f -name '*_pkg_info' -delete
  1372. fi
  1373. - when:
  1374. condition: << parameters.use-out-cache >>
  1375. steps:
  1376. - *step-save-out-cache
  1377. - *step-maybe-notify-slack-failure
  1378. electron-publish:
  1379. parameters:
  1380. attach:
  1381. type: boolean
  1382. default: false
  1383. checkout:
  1384. type: boolean
  1385. default: true
  1386. steps:
  1387. - when:
  1388. condition: << parameters.attach >>
  1389. steps:
  1390. - attach_workspace:
  1391. at: .
  1392. - when:
  1393. condition: << parameters.checkout >>
  1394. steps:
  1395. - *step-depot-tools-get
  1396. - *step-depot-tools-add-to-path
  1397. - *step-restore-brew-cache
  1398. - *step-get-more-space-on-mac
  1399. - when:
  1400. condition: << parameters.checkout >>
  1401. steps:
  1402. - *step-checkout-electron
  1403. - *step-touch-sync-done
  1404. - *step-maybe-restore-git-cache
  1405. - *step-set-git-cache-path
  1406. - *step-gclient-sync
  1407. - *step-delete-git-directories
  1408. - *step-minimize-workspace-size-from-checkout
  1409. - *step-fix-sync-on-mac
  1410. - *step-setup-env-for-build
  1411. - *step-setup-goma-for-build
  1412. - *step-wait-for-goma
  1413. - *step-gn-gen-default
  1414. # Electron app
  1415. - *step-electron-build
  1416. - *step-show-goma-stats
  1417. - *step-maybe-generate-breakpad-symbols
  1418. - *step-maybe-electron-dist-strip
  1419. - step-electron-dist-build
  1420. - *step-maybe-zip-symbols
  1421. # mksnapshot
  1422. - *step-mksnapshot-build
  1423. # chromedriver
  1424. - *step-electron-chromedriver-build
  1425. # Node.js headers
  1426. - *step-nodejs-headers-build
  1427. # ffmpeg
  1428. - *step-ffmpeg-gn-gen
  1429. - *step-ffmpeg-build
  1430. # hunspell
  1431. - *step-hunspell-build
  1432. # libcxx
  1433. - *step-maybe-generate-libcxx
  1434. # typescript defs
  1435. - *step-maybe-generate-typescript-defs
  1436. # Publish
  1437. - *step-electron-publish
  1438. - move_and_store_all_artifacts
  1439. # List of all jobs.
  1440. jobs:
  1441. # Layer 0: Docs. Standalone.
  1442. ts-compile-doc-change:
  1443. executor:
  1444. name: linux-docker
  1445. size: medium
  1446. environment:
  1447. <<: *env-linux-medium
  1448. <<: *env-testing-build
  1449. GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
  1450. <<: *steps-electron-ts-compile-for-doc-change
  1451. # Layer 1: Checkout.
  1452. linux-make-src-cache:
  1453. executor:
  1454. name: linux-docker
  1455. size: xlarge
  1456. environment:
  1457. <<: *env-linux-2xlarge
  1458. GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
  1459. steps:
  1460. - electron-build:
  1461. persist: false
  1462. build: false
  1463. checkout: true
  1464. save-git-cache: true
  1465. checkout-to-create-src-cache: true
  1466. linux-checkout-for-native-tests:
  1467. executor: linux-docker
  1468. environment:
  1469. <<: *env-linux-2xlarge
  1470. GCLIENT_EXTRA_ARGS: '--custom-var=checkout_pyyaml=True'
  1471. steps:
  1472. - electron-build:
  1473. persist: false
  1474. build: false
  1475. checkout: true
  1476. persist-checkout: true
  1477. linux-checkout-for-native-tests-with-no-patches:
  1478. executor: linux-docker
  1479. environment:
  1480. <<: *env-linux-2xlarge
  1481. GCLIENT_EXTRA_ARGS: '--custom-var=apply_patches=False --custom-var=checkout_pyyaml=True'
  1482. steps:
  1483. - electron-build:
  1484. persist: false
  1485. build: false
  1486. checkout: true
  1487. persist-checkout: true
  1488. mac-checkout:
  1489. executor: linux-docker
  1490. environment:
  1491. <<: *env-linux-2xlarge
  1492. <<: *env-testing-build
  1493. <<: *env-macos-build
  1494. GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac'
  1495. steps:
  1496. - electron-build:
  1497. persist: false
  1498. build: false
  1499. checkout: true
  1500. persist-checkout: true
  1501. restore-src-cache: false
  1502. mac-make-src-cache:
  1503. executor:
  1504. name: linux-docker
  1505. size: xlarge
  1506. environment:
  1507. <<: *env-linux-2xlarge
  1508. <<: *env-testing-build
  1509. <<: *env-macos-build
  1510. GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac'
  1511. steps:
  1512. - electron-build:
  1513. persist: false
  1514. build: false
  1515. checkout: true
  1516. save-git-cache: true
  1517. checkout-to-create-src-cache: true
  1518. # Layer 2: Builds.
  1519. linux-x64-testing:
  1520. executor: linux-docker
  1521. environment:
  1522. <<: *env-global
  1523. <<: *env-testing-build
  1524. <<: *env-ninja-status
  1525. GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
  1526. steps:
  1527. - electron-build:
  1528. persist: true
  1529. checkout: false
  1530. checkout-and-assume-cache: true
  1531. use-out-cache: false
  1532. linux-x64-testing-asan:
  1533. executor: linux-docker
  1534. environment:
  1535. <<: *env-global
  1536. <<: *env-testing-build
  1537. <<: *env-ninja-status
  1538. CHECK_DIST_MANIFEST: '0'
  1539. GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
  1540. GN_EXTRA_ARGS: 'is_asan = true'
  1541. steps:
  1542. - electron-build:
  1543. persist: true
  1544. checkout: true
  1545. use-out-cache: false
  1546. build-nonproprietary-ffmpeg: false
  1547. linux-x64-testing-no-run-as-node:
  1548. executor: linux-docker
  1549. environment:
  1550. <<: *env-linux-2xlarge
  1551. <<: *env-testing-build
  1552. <<: *env-ninja-status
  1553. <<: *env-disable-run-as-node
  1554. GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
  1555. steps:
  1556. - electron-build:
  1557. persist: false
  1558. checkout: true
  1559. use-out-cache: false
  1560. linux-x64-testing-gn-check:
  1561. executor:
  1562. name: linux-docker
  1563. size: medium
  1564. environment:
  1565. <<: *env-linux-medium
  1566. <<: *env-testing-build
  1567. GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
  1568. <<: *steps-electron-gn-check
  1569. linux-x64-release:
  1570. executor: linux-docker
  1571. environment:
  1572. <<: *env-linux-2xlarge-release
  1573. <<: *env-release-build
  1574. <<: *env-send-slack-notifications
  1575. <<: *env-ninja-status
  1576. GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
  1577. steps:
  1578. - electron-build:
  1579. persist: true
  1580. checkout: true
  1581. linux-x64-publish:
  1582. executor: linux-docker
  1583. environment:
  1584. <<: *env-linux-2xlarge-release
  1585. <<: *env-release-build
  1586. UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >>
  1587. <<: *env-ninja-status
  1588. steps:
  1589. - run: echo running
  1590. - when:
  1591. condition:
  1592. or:
  1593. - equal: ["all", << pipeline.parameters.linux-publish-arch-limit >>]
  1594. - equal: ["x64", << pipeline.parameters.linux-publish-arch-limit >>]
  1595. steps:
  1596. - electron-publish:
  1597. attach: false
  1598. checkout: true
  1599. linux-ia32-testing:
  1600. executor: linux-docker
  1601. environment:
  1602. <<: *env-global
  1603. <<: *env-ia32
  1604. <<: *env-testing-build
  1605. <<: *env-ninja-status
  1606. GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
  1607. steps:
  1608. - electron-build:
  1609. persist: true
  1610. checkout: true
  1611. use-out-cache: false
  1612. linux-ia32-release:
  1613. executor: linux-docker
  1614. environment:
  1615. <<: *env-linux-2xlarge-release
  1616. <<: *env-ia32
  1617. <<: *env-release-build
  1618. <<: *env-send-slack-notifications
  1619. <<: *env-ninja-status
  1620. GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
  1621. steps:
  1622. - electron-build:
  1623. persist: true
  1624. checkout: true
  1625. linux-ia32-publish:
  1626. executor: linux-docker
  1627. environment:
  1628. <<: *env-linux-2xlarge-release
  1629. <<: *env-ia32
  1630. <<: *env-release-build
  1631. <<: *env-32bit-release
  1632. UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >>
  1633. <<: *env-ninja-status
  1634. steps:
  1635. - run: echo running
  1636. - when:
  1637. condition:
  1638. or:
  1639. - equal: ["all", << pipeline.parameters.linux-publish-arch-limit >>]
  1640. - equal: ["ia32", << pipeline.parameters.linux-publish-arch-limit >>]
  1641. steps:
  1642. - electron-publish:
  1643. attach: false
  1644. checkout: true
  1645. linux-arm-testing:
  1646. executor: linux-docker
  1647. environment:
  1648. <<: *env-global
  1649. <<: *env-arm
  1650. <<: *env-testing-build
  1651. <<: *env-ninja-status
  1652. TRIGGER_ARM_TEST: true
  1653. GENERATE_CROSS_ARCH_SNAPSHOT: true
  1654. GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
  1655. steps:
  1656. - electron-build:
  1657. persist: true
  1658. checkout: false
  1659. checkout-and-assume-cache: true
  1660. use-out-cache: false
  1661. linux-arm-release:
  1662. executor: linux-docker
  1663. environment:
  1664. <<: *env-linux-2xlarge-release
  1665. <<: *env-arm
  1666. <<: *env-release-build
  1667. <<: *env-send-slack-notifications
  1668. <<: *env-ninja-status
  1669. GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
  1670. steps:
  1671. - electron-build:
  1672. persist: false
  1673. checkout: true
  1674. linux-arm-publish:
  1675. executor: linux-docker
  1676. environment:
  1677. <<: *env-linux-2xlarge-release
  1678. <<: *env-arm
  1679. <<: *env-release-build
  1680. <<: *env-32bit-release
  1681. GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True'
  1682. UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >>
  1683. <<: *env-ninja-status
  1684. steps:
  1685. - run: echo running
  1686. - when:
  1687. condition:
  1688. or:
  1689. - equal: ["all", << pipeline.parameters.linux-publish-arch-limit >>]
  1690. - equal: ["arm", << pipeline.parameters.linux-publish-arch-limit >>]
  1691. steps:
  1692. - electron-publish:
  1693. attach: false
  1694. checkout: true
  1695. linux-arm64-testing:
  1696. executor: linux-docker
  1697. environment:
  1698. <<: *env-global
  1699. <<: *env-arm64
  1700. <<: *env-testing-build
  1701. <<: *env-ninja-status
  1702. TRIGGER_ARM_TEST: true
  1703. GENERATE_CROSS_ARCH_SNAPSHOT: true
  1704. GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
  1705. steps:
  1706. - electron-build:
  1707. persist: true
  1708. checkout: false
  1709. checkout-and-assume-cache: true
  1710. use-out-cache: false
  1711. linux-arm64-testing-gn-check:
  1712. executor:
  1713. name: linux-docker
  1714. size: medium
  1715. environment:
  1716. <<: *env-linux-medium
  1717. <<: *env-arm64
  1718. <<: *env-testing-build
  1719. GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
  1720. <<: *steps-electron-gn-check
  1721. linux-arm64-release:
  1722. executor: linux-docker
  1723. environment:
  1724. <<: *env-linux-2xlarge-release
  1725. <<: *env-arm64
  1726. <<: *env-release-build
  1727. <<: *env-send-slack-notifications
  1728. <<: *env-ninja-status
  1729. GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm=True --custom-var=checkout_arm64=True'
  1730. steps:
  1731. - electron-build:
  1732. persist: false
  1733. checkout: true
  1734. linux-arm64-publish:
  1735. executor: linux-docker
  1736. environment:
  1737. <<: *env-linux-2xlarge-release
  1738. <<: *env-arm64
  1739. <<: *env-release-build
  1740. GCLIENT_EXTRA_ARGS: '--custom-var=checkout_arm64=True'
  1741. UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >>
  1742. <<: *env-ninja-status
  1743. steps:
  1744. - run: echo running
  1745. - when:
  1746. condition:
  1747. or:
  1748. - equal: ["all", << pipeline.parameters.linux-publish-arch-limit >>]
  1749. - equal: ["arm64", << pipeline.parameters.linux-publish-arch-limit >>]
  1750. steps:
  1751. - electron-publish:
  1752. attach: false
  1753. checkout: true
  1754. osx-testing-x64:
  1755. executor: macos
  1756. environment:
  1757. <<: *env-mac-large
  1758. <<: *env-testing-build
  1759. <<: *env-ninja-status
  1760. <<: *env-macos-build
  1761. GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac'
  1762. steps:
  1763. - electron-build:
  1764. persist: true
  1765. checkout: false
  1766. checkout-and-assume-cache: true
  1767. attach: true
  1768. osx-testing-x64-gn-check:
  1769. executor:
  1770. name: macos
  1771. size: medium
  1772. environment:
  1773. <<: *env-machine-mac
  1774. <<: *env-testing-build
  1775. GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac'
  1776. <<: *steps-electron-gn-check
  1777. osx-publish-x64-skip-checkout:
  1778. executor: macos
  1779. environment:
  1780. <<: *env-mac-large-release
  1781. <<: *env-release-build
  1782. UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >>
  1783. <<: *env-ninja-status
  1784. steps:
  1785. - run: echo running
  1786. - when:
  1787. condition:
  1788. or:
  1789. - equal: ["all", << pipeline.parameters.macos-publish-arch-limit >>]
  1790. - equal: ["osx-x64", << pipeline.parameters.macos-publish-arch-limit >>]
  1791. steps:
  1792. - electron-publish:
  1793. attach: true
  1794. checkout: false
  1795. osx-publish-arm64-skip-checkout:
  1796. executor: macos
  1797. environment:
  1798. <<: *env-mac-large-release
  1799. <<: *env-release-build
  1800. <<: *env-apple-silicon
  1801. UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >>
  1802. <<: *env-ninja-status
  1803. steps:
  1804. - run: echo running
  1805. - when:
  1806. condition:
  1807. or:
  1808. - equal: ["all", << pipeline.parameters.macos-publish-arch-limit >>]
  1809. - equal: ["osx-arm64", << pipeline.parameters.macos-publish-arch-limit >>]
  1810. steps:
  1811. - electron-publish:
  1812. attach: true
  1813. checkout: false
  1814. osx-testing-arm64:
  1815. executor: macos
  1816. environment:
  1817. <<: *env-mac-large
  1818. <<: *env-testing-build
  1819. <<: *env-ninja-status
  1820. <<: *env-macos-build
  1821. <<: *env-apple-silicon
  1822. GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac'
  1823. GENERATE_CROSS_ARCH_SNAPSHOT: true
  1824. steps:
  1825. - electron-build:
  1826. persist: true
  1827. checkout: false
  1828. checkout-and-assume-cache: true
  1829. attach: true
  1830. mas-testing-x64:
  1831. executor: macos
  1832. environment:
  1833. <<: *env-mac-large
  1834. <<: *env-mas
  1835. <<: *env-testing-build
  1836. <<: *env-ninja-status
  1837. <<: *env-macos-build
  1838. GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac'
  1839. steps:
  1840. - electron-build:
  1841. persist: true
  1842. checkout: false
  1843. checkout-and-assume-cache: true
  1844. attach: true
  1845. mas-testing-x64-gn-check:
  1846. executor:
  1847. name: macos
  1848. size: medium
  1849. environment:
  1850. <<: *env-machine-mac
  1851. <<: *env-mas
  1852. <<: *env-testing-build
  1853. GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac'
  1854. <<: *steps-electron-gn-check
  1855. mas-publish-x64-skip-checkout:
  1856. executor: macos
  1857. environment:
  1858. <<: *env-mac-large-release
  1859. <<: *env-mas
  1860. <<: *env-release-build
  1861. UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >>
  1862. steps:
  1863. - run: echo running
  1864. - when:
  1865. condition:
  1866. or:
  1867. - equal: ["all", << pipeline.parameters.macos-publish-arch-limit >>]
  1868. - equal: ["mas-x64", << pipeline.parameters.macos-publish-arch-limit >>]
  1869. steps:
  1870. - electron-publish:
  1871. attach: true
  1872. checkout: false
  1873. mas-publish-arm64-skip-checkout:
  1874. executor: macos
  1875. environment:
  1876. <<: *env-mac-large-release
  1877. <<: *env-mas-apple-silicon
  1878. <<: *env-release-build
  1879. UPLOAD_TO_STORAGE: << pipeline.parameters.upload-to-storage >>
  1880. <<: *env-ninja-status
  1881. steps:
  1882. - run: echo running
  1883. - when:
  1884. condition:
  1885. or:
  1886. - equal: ["all", << pipeline.parameters.macos-publish-arch-limit >>]
  1887. - equal: ["mas-arm64", << pipeline.parameters.macos-publish-arch-limit >>]
  1888. steps:
  1889. - electron-publish:
  1890. attach: true
  1891. checkout: false
  1892. mas-testing-arm64:
  1893. executor: macos
  1894. environment:
  1895. <<: *env-mac-large
  1896. <<: *env-testing-build
  1897. <<: *env-ninja-status
  1898. <<: *env-macos-build
  1899. <<: *env-mas-apple-silicon
  1900. GCLIENT_EXTRA_ARGS: '--custom-var=checkout_mac=True --custom-var=host_os=mac'
  1901. GENERATE_CROSS_ARCH_SNAPSHOT: true
  1902. steps:
  1903. - electron-build:
  1904. persist: true
  1905. checkout: false
  1906. checkout-and-assume-cache: true
  1907. attach: true
  1908. # Layer 3: Tests.
  1909. linux-x64-unittests:
  1910. executor: linux-docker
  1911. environment:
  1912. <<: *env-linux-2xlarge
  1913. <<: *env-unittests
  1914. <<: *env-headless-testing
  1915. <<: *steps-native-tests
  1916. linux-x64-disabled-unittests:
  1917. executor: linux-docker
  1918. environment:
  1919. <<: *env-linux-2xlarge
  1920. <<: *env-unittests
  1921. <<: *env-headless-testing
  1922. TESTS_ARGS: '--only-disabled-tests'
  1923. <<: *steps-native-tests
  1924. linux-x64-chromium-unittests:
  1925. executor: linux-docker
  1926. environment:
  1927. <<: *env-linux-2xlarge
  1928. <<: *env-unittests
  1929. <<: *env-headless-testing
  1930. TESTS_ARGS: '--include-disabled-tests'
  1931. <<: *steps-native-tests
  1932. linux-x64-browsertests:
  1933. executor: linux-docker
  1934. environment:
  1935. <<: *env-linux-2xlarge
  1936. <<: *env-browsertests
  1937. <<: *env-testing-build
  1938. <<: *env-headless-testing
  1939. <<: *steps-native-tests
  1940. linux-x64-testing-tests:
  1941. executor:
  1942. name: linux-docker
  1943. size: medium
  1944. environment:
  1945. <<: *env-linux-medium
  1946. <<: *env-headless-testing
  1947. <<: *env-stack-dumping
  1948. parallelism: 3
  1949. <<: *steps-tests
  1950. linux-x64-testing-asan-tests:
  1951. executor:
  1952. name: linux-docker
  1953. size: xlarge
  1954. environment:
  1955. <<: *env-linux-medium
  1956. <<: *env-headless-testing
  1957. <<: *env-stack-dumping
  1958. IS_ASAN: '1'
  1959. DISABLE_CRASH_REPORTER_TESTS: '1'
  1960. parallelism: 3
  1961. <<: *steps-tests
  1962. linux-x64-testing-nan:
  1963. executor:
  1964. name: linux-docker
  1965. size: medium
  1966. environment:
  1967. <<: *env-linux-medium
  1968. <<: *env-headless-testing
  1969. <<: *env-stack-dumping
  1970. <<: *steps-test-nan
  1971. linux-x64-testing-node:
  1972. executor: linux-docker
  1973. environment:
  1974. <<: *env-linux-medium
  1975. <<: *env-headless-testing
  1976. <<: *env-stack-dumping
  1977. <<: *steps-test-node
  1978. linux-x64-release-tests:
  1979. executor:
  1980. name: linux-docker
  1981. size: medium
  1982. environment:
  1983. <<: *env-linux-medium
  1984. <<: *env-headless-testing
  1985. <<: *env-send-slack-notifications
  1986. <<: *steps-tests
  1987. linux-x64-verify-ffmpeg:
  1988. executor:
  1989. name: linux-docker
  1990. size: medium
  1991. environment:
  1992. <<: *env-linux-medium
  1993. <<: *env-headless-testing
  1994. <<: *env-send-slack-notifications
  1995. <<: *steps-verify-ffmpeg
  1996. linux-ia32-testing-tests:
  1997. executor:
  1998. name: linux-docker
  1999. size: medium
  2000. environment:
  2001. <<: *env-linux-medium
  2002. <<: *env-ia32
  2003. <<: *env-headless-testing
  2004. <<: *env-stack-dumping
  2005. parallelism: 3
  2006. <<: *steps-tests
  2007. linux-ia32-testing-nan:
  2008. executor:
  2009. name: linux-docker
  2010. size: medium
  2011. environment:
  2012. <<: *env-linux-medium
  2013. <<: *env-ia32
  2014. <<: *env-headless-testing
  2015. <<: *env-stack-dumping
  2016. <<: *steps-test-nan
  2017. linux-ia32-testing-node:
  2018. executor: linux-docker
  2019. environment:
  2020. <<: *env-linux-medium
  2021. <<: *env-ia32
  2022. <<: *env-headless-testing
  2023. <<: *env-stack-dumping
  2024. <<: *steps-test-node
  2025. linux-ia32-release-tests:
  2026. executor:
  2027. name: linux-docker
  2028. size: medium
  2029. environment:
  2030. <<: *env-linux-medium
  2031. <<: *env-ia32
  2032. <<: *env-headless-testing
  2033. <<: *env-send-slack-notifications
  2034. <<: *steps-tests
  2035. linux-ia32-verify-ffmpeg:
  2036. executor:
  2037. name: linux-docker
  2038. size: medium
  2039. environment:
  2040. <<: *env-linux-medium
  2041. <<: *env-ia32
  2042. <<: *env-headless-testing
  2043. <<: *env-send-slack-notifications
  2044. <<: *steps-verify-ffmpeg
  2045. linux-arm-testing-tests:
  2046. executor: linux-arm
  2047. environment:
  2048. <<: *env-arm
  2049. <<: *env-global
  2050. <<: *env-headless-testing
  2051. <<: *env-stack-dumping
  2052. <<: *steps-tests
  2053. linux-arm64-testing-tests:
  2054. executor: linux-arm64
  2055. environment:
  2056. <<: *env-arm64
  2057. <<: *env-global
  2058. <<: *env-headless-testing
  2059. <<: *env-stack-dumping
  2060. <<: *steps-tests
  2061. osx-testing-x64-tests:
  2062. executor:
  2063. name: macos
  2064. size: medium
  2065. environment:
  2066. <<: *env-mac-large
  2067. <<: *env-stack-dumping
  2068. parallelism: 2
  2069. <<: *steps-tests
  2070. osx-testing-arm64-tests:
  2071. executor: apple-silicon
  2072. environment:
  2073. <<: *env-mac-large
  2074. <<: *env-stack-dumping
  2075. <<: *env-apple-silicon
  2076. <<: *steps-tests
  2077. mas-testing-x64-tests:
  2078. executor:
  2079. name: macos
  2080. size: medium
  2081. environment:
  2082. <<: *env-mac-large
  2083. <<: *env-stack-dumping
  2084. parallelism: 2
  2085. <<: *steps-tests
  2086. mas-testing-arm64-tests:
  2087. executor: apple-silicon
  2088. environment:
  2089. <<: *env-mac-large
  2090. <<: *env-stack-dumping
  2091. <<: *env-apple-silicon
  2092. <<: *steps-tests
  2093. # Layer 4: Summary.
  2094. linux-release-summary:
  2095. executor:
  2096. name: linux-docker
  2097. size: medium
  2098. environment:
  2099. <<: *env-linux-medium
  2100. <<: *env-send-slack-notifications
  2101. steps:
  2102. - *step-maybe-notify-slack-success
  2103. # List all workflows
  2104. workflows:
  2105. docs-only:
  2106. when:
  2107. and:
  2108. - equal: [false, << pipeline.parameters.run-macos-publish >>]
  2109. - equal: [false, << pipeline.parameters.run-linux-publish >>]
  2110. - equal: [true, << pipeline.parameters.run-docs-only >>]
  2111. jobs:
  2112. - ts-compile-doc-change
  2113. publish-linux:
  2114. when: << pipeline.parameters.run-linux-publish >>
  2115. jobs:
  2116. - linux-x64-publish:
  2117. context: release-env
  2118. - linux-ia32-publish:
  2119. context: release-env
  2120. - linux-arm-publish:
  2121. context: release-env
  2122. - linux-arm64-publish:
  2123. context: release-env
  2124. publish-macos:
  2125. when: << pipeline.parameters.run-macos-publish >>
  2126. jobs:
  2127. - mac-checkout
  2128. - osx-publish-x64-skip-checkout:
  2129. requires:
  2130. - mac-checkout
  2131. context: release-env
  2132. - mas-publish-x64-skip-checkout:
  2133. requires:
  2134. - mac-checkout
  2135. context: release-env
  2136. - osx-publish-arm64-skip-checkout:
  2137. requires:
  2138. - mac-checkout
  2139. context: release-env
  2140. - mas-publish-arm64-skip-checkout:
  2141. requires:
  2142. - mac-checkout
  2143. context: release-env
  2144. build-linux:
  2145. when:
  2146. and:
  2147. - equal: [false, << pipeline.parameters.run-macos-publish >>]
  2148. - equal: [false, << pipeline.parameters.run-linux-publish >>]
  2149. - equal: [true, << pipeline.parameters.run-build-linux >>]
  2150. jobs:
  2151. - linux-make-src-cache
  2152. - linux-x64-testing:
  2153. requires:
  2154. - linux-make-src-cache
  2155. - linux-x64-testing-asan:
  2156. requires:
  2157. - linux-make-src-cache
  2158. - linux-x64-testing-no-run-as-node:
  2159. requires:
  2160. - linux-make-src-cache
  2161. - linux-x64-testing-gn-check:
  2162. requires:
  2163. - linux-make-src-cache
  2164. - linux-x64-testing-tests:
  2165. requires:
  2166. - linux-x64-testing
  2167. - linux-x64-testing-asan-tests:
  2168. requires:
  2169. - linux-x64-testing-asan
  2170. - linux-x64-testing-nan:
  2171. requires:
  2172. - linux-x64-testing
  2173. - linux-x64-testing-node:
  2174. requires:
  2175. - linux-x64-testing
  2176. - linux-ia32-testing:
  2177. requires:
  2178. - linux-make-src-cache
  2179. - linux-ia32-testing-tests:
  2180. requires:
  2181. - linux-ia32-testing
  2182. - linux-ia32-testing-nan:
  2183. requires:
  2184. - linux-ia32-testing
  2185. - linux-ia32-testing-node:
  2186. requires:
  2187. - linux-ia32-testing
  2188. - linux-arm-testing:
  2189. requires:
  2190. - linux-make-src-cache
  2191. - linux-arm-testing-tests:
  2192. filters:
  2193. branches:
  2194. # Do not run this on forked pull requests
  2195. ignore: /pull\/[0-9]+/
  2196. requires:
  2197. - linux-arm-testing
  2198. - linux-arm64-testing:
  2199. requires:
  2200. - linux-make-src-cache
  2201. - linux-arm64-testing-tests:
  2202. filters:
  2203. branches:
  2204. # Do not run this on forked pull requests
  2205. ignore: /pull\/[0-9]+/
  2206. requires:
  2207. - linux-arm64-testing
  2208. - linux-arm64-testing-gn-check:
  2209. requires:
  2210. - linux-make-src-cache
  2211. build-mac:
  2212. when:
  2213. and:
  2214. - equal: [false, << pipeline.parameters.run-macos-publish >>]
  2215. - equal: [false, << pipeline.parameters.run-linux-publish >>]
  2216. - equal: [true, << pipeline.parameters.run-build-mac >>]
  2217. jobs:
  2218. - mac-make-src-cache
  2219. - osx-testing-x64:
  2220. requires:
  2221. - mac-make-src-cache
  2222. - osx-testing-x64-gn-check:
  2223. requires:
  2224. - mac-make-src-cache
  2225. - osx-testing-x64-tests:
  2226. requires:
  2227. - osx-testing-x64
  2228. - osx-testing-arm64:
  2229. requires:
  2230. - mac-make-src-cache
  2231. - osx-testing-arm64-tests:
  2232. filters:
  2233. branches:
  2234. # Do not run this on forked pull requests
  2235. ignore: /pull\/[0-9]+/
  2236. requires:
  2237. - osx-testing-arm64
  2238. - mas-testing-x64:
  2239. requires:
  2240. - mac-make-src-cache
  2241. - mas-testing-x64-gn-check:
  2242. requires:
  2243. - mac-make-src-cache
  2244. - mas-testing-x64-tests:
  2245. requires:
  2246. - mas-testing-x64
  2247. - mas-testing-arm64:
  2248. requires:
  2249. - mac-make-src-cache
  2250. - mas-testing-arm64-tests:
  2251. filters:
  2252. branches:
  2253. # Do not run this on forked pull requests
  2254. ignore: /pull\/[0-9]+/
  2255. requires:
  2256. - mas-testing-arm64
  2257. lint:
  2258. jobs:
  2259. - lint