base.yml 77 KB

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