.cirrus.yml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280
  1. env:
  2. PYTHON_VERSION: 3.12
  3. GITHUB_TOKEN: ENCRYPTED[!af8c6a449b6ff0a381ac6dd267d664a9e5d3551cbc9922aa98f806a0c881e10f47565f915dc277dd3f5c7cdf47f09d1b!]
  4. # The above token, is a GitHub API Token, that allows us to download RipGrep without concern of API limits
  5. # linux_task:
  6. # alias: linux
  7. # container:
  8. # image: node:16-slim
  9. # memory: 8G
  10. # prepare_script:
  11. # - apt-get update
  12. # - export DEBIAN_FRONTEND="noninteractive"
  13. # - apt-get install -y
  14. # ffmpeg
  15. # rpm
  16. # build-essential
  17. # git
  18. # libsecret-1-dev
  19. # fakeroot
  20. # libx11-dev
  21. # libxkbfile-dev
  22. # libgdk-pixbuf2.0-dev
  23. # libgtk-3-dev
  24. # libxss-dev
  25. # libasound2-dev
  26. # libnss3
  27. # xvfb
  28. # - git submodule init
  29. # - git submodule update
  30. # - sed -i -e "s/[0-9]*-dev/`date -u +%Y%m%d%H`/g" package.json
  31. # install_script:
  32. # - yarn install --ignore-engines || yarn install --ignore-engines
  33. # build_script:
  34. # - yarn build
  35. # - yarn run build:apm
  36. # build_binary_script:
  37. # - yarn dist || yarn dist
  38. # rename_binary_script:
  39. # - node script/rename.js "Linux"
  40. # binary_artifacts:
  41. # path: ./binaries/*
  42. # test_script:
  43. # - rm -R node_modules/electron; yarn install --check-files
  44. # - ./binaries/*AppImage --appimage-extract
  45. # - export BINARY_NAME='squashfs-root/pulsar'
  46. # - mkdir -p ./tests/videos
  47. # - Xvfb -screen 0 1024x768x24+32 :99 & nohup ffmpeg -video_size 1024x768 -f x11grab -i :99.0 ./tests/videos/out.mpg & DISPLAY=:99 PLAYWRIGHT_JUNIT_OUTPUT_NAME=report.xml npx playwright test --reporter=junit,list
  48. # always:
  49. # videos_artifacts:
  50. # path: ./tests/videos/**
  51. # junit_artifacts:
  52. # path: report.xml
  53. # type: text/xml
  54. # format: junit
  55. arm_linux_task:
  56. alias: linux
  57. only_if: $CIRRUS_CRON != "" || $CIRRUS_TAG != ""
  58. skip: $CIRRUS_CHANGE_IN_REPO == $CIRRUS_LAST_GREEN_CHANGE
  59. arm_container:
  60. image: node:16-slim
  61. memory: 8G
  62. env:
  63. USE_SYSTEM_FPM: 'true'
  64. ROLLING_UPLOAD_TOKEN: ENCRYPTED[e954268e0b8e724deab26a68557eb6310dec58d02b319a582214a37687ef86f47a4b83d71c4e3aa4f2bbdf542180b2d3]
  65. prepare_script:
  66. - apt-get update
  67. - export DEBIAN_FRONTEND="noninteractive"
  68. - apt-get install -y
  69. gnupg2
  70. procps
  71. curl
  72. ruby
  73. rpm
  74. build-essential
  75. git
  76. libsecret-1-dev
  77. fakeroot
  78. libx11-dev
  79. libxkbfile-dev
  80. libgdk-pixbuf2.0-dev
  81. libgtk-3-dev
  82. libxss-dev
  83. libasound2-dev
  84. libnss3
  85. xvfb
  86. - gem install fpm
  87. - git submodule init
  88. - git submodule update
  89. - sed -i -e "s/[0-9]*-dev/`date -u +%Y%m%d%H`/g" package.json
  90. install_script:
  91. - yarn install --ignore-engines || yarn install --ignore-engines
  92. build_script:
  93. - yarn build
  94. - yarn run build:apm
  95. build_binary_script:
  96. - yarn dist || yarn dist
  97. rename_binary_script:
  98. - node script/rename.js "ARM.Linux"
  99. binary_artifacts:
  100. path: ./binaries/*
  101. test_script:
  102. - rm -R node_modules/electron; yarn install --check-files
  103. - ./binaries/*AppImage --appimage-extract
  104. - export BINARY_NAME='squashfs-root/pulsar'
  105. - Xvfb :99 & DISPLAY=:99 PLAYWRIGHT_JUNIT_OUTPUT_NAME=report.xml npx playwright test --reporter=junit,list
  106. rolling_upload_script:
  107. - cd ./script/rolling-release-scripts
  108. - npm install
  109. - node ./rolling-release-binary-upload.js cirrus
  110. always:
  111. videos_artifacts:
  112. path: ./tests/videos/**
  113. junit_artifacts:
  114. path: report.xml
  115. type: text/xml
  116. format: junit
  117. silicon_mac_task:
  118. alias: mac
  119. only_if: $CIRRUS_CRON != "" || $CIRRUS_TAG != ""
  120. skip: $CIRRUS_CHANGE_IN_REPO == $CIRRUS_LAST_GREEN_CHANGE
  121. macos_instance:
  122. image: ghcr.io/cirruslabs/macos-monterey-xcode:14
  123. memory: 8G
  124. env:
  125. CSC_LINK: ENCRYPTED[0078015a03bb6cfdbd80113ae5bbb6f448fd4bbbc40efd81bf2cb1554373046b475a4d7c77e3e3e82ac1ce2f7e3d2da5]
  126. CSC_KEY_PASSWORD: ENCRYPTED[82bb72653d39578035ed1860ab4978703d50bd326d925a146ff08782f987ceb37ac2d8dbace52dec2b0e2ef92debf097]
  127. APPLEID: ENCRYPTED[549ce052bd5666dba5245f4180bf93b74ed206fe5e6e7c8f67a8596d3767c1f682b84e347b326ac318c62a07c8844a57]
  128. APPLEID_PASSWORD: ENCRYPTED[774c3307fd3b62660ecf5beb8537a24498c76e8d90d7f28e5bc816742fd8954a34ffed13f9aa2d1faf66ce08b4496e6f]
  129. TEAM_ID: ENCRYPTED[11f3fedfbaf4aff1859bf6c105f0437ace23d84f5420a2c1cea884fbfa43b115b7834a463516d50cb276d4c4d9128b49]
  130. ROLLING_UPLOAD_TOKEN: ENCRYPTED[e954268e0b8e724deab26a68557eb6310dec58d02b319a582214a37687ef86f47a4b83d71c4e3aa4f2bbdf542180b2d3]
  131. prepare_script:
  132. - brew update
  133. - brew install node@16 yarn git python@$PYTHON_VERSION
  134. - python3 -m pip install setuptools
  135. - git submodule init
  136. - git submodule update
  137. - ln -s /opt/homebrew/bin/python$PYTHON_VERSION /opt/homebrew/bin/python
  138. - export PATH="/opt/homebrew/bin:/opt/homebrew/opt/node@16/bin:$PATH"
  139. - sed -i -e "s/[0-9]*-dev/`date -u +%Y%m%d%H`/g" package.json
  140. install_script:
  141. - export PATH="/opt/homebrew/bin:/opt/homebrew/opt/node@16/bin:$PATH"
  142. - yarn install --ignore-engines || yarn install --ignore-engines
  143. build_script:
  144. - export PATH="/opt/homebrew/bin:/opt/homebrew/opt/node@16/bin:$PATH"
  145. - yarn build
  146. - yarn run build:apm
  147. build_binary_script:
  148. - export PATH="/opt/homebrew/bin:/opt/homebrew/opt/node@16/bin:$PATH"
  149. - yarn dist || yarn dist
  150. rename_binary_script:
  151. - export PATH="/opt/homebrew/bin:/opt/homebrew/opt/node@16/bin:$PATH"
  152. - node script/rename.js "Silicon.Mac"
  153. binary_artifacts:
  154. path: ./binaries/*
  155. test_script:
  156. - export PATH="/opt/homebrew/bin:/opt/homebrew/opt/node@16/bin:$PATH"
  157. - rm -R node_modules/electron; yarn install --check-files
  158. - hdiutil mount binaries/*Pulsar*dmg
  159. - export BINARY_NAME=`ls /Volumes/Pulsar*/Pulsar.app/Contents/MacOS/Pulsar`
  160. - PLAYWRIGHT_JUNIT_OUTPUT_NAME=report.xml npx playwright test --reporter=junit,list
  161. rolling_upload_script:
  162. - export PATH="/opt/homebrew/bin:/opt/homebrew/opt/node@16/bin:$PATH"
  163. - cd ./script/rolling-release-scripts
  164. - npm install
  165. - node ./rolling-release-binary-upload.js cirrus
  166. always:
  167. videos_artifacts:
  168. path: ./tests/videos/**
  169. junit_artifacts:
  170. path: report.xml
  171. type: text/xml
  172. format: junit
  173. # intel_mac_task:
  174. # alias: mac
  175. # macos_instance:
  176. # image: ghcr.io/cirruslabs/macos-monterey-xcode:14
  177. # memory: 8G
  178. # env:
  179. # CSC_LINK: ENCRYPTED[0078015a03bb6cfdbd80113ae5bbb6f448fd4bbbc40efd81bf2cb1554373046b475a4d7c77e3e3e82ac1ce2f7e3d2da5]
  180. # CSC_KEY_PASSWORD: ENCRYPTED[82bb72653d39578035ed1860ab4978703d50bd326d925a146ff08782f987ceb37ac2d8dbace52dec2b0e2ef92debf097]
  181. # APPLEID: ENCRYPTED[549ce052bd5666dba5245f4180bf93b74ed206fe5e6e7c8f67a8596d3767c1f682b84e347b326ac318c62a07c8844a57]
  182. # APPLEID_PASSWORD: ENCRYPTED[774c3307fd3b62660ecf5beb8537a24498c76e8d90d7f28e5bc816742fd8954a34ffed13f9aa2d1faf66ce08b4496e6f]
  183. # TEAM_ID: ENCRYPTED[11f3fedfbaf4aff1859bf6c105f0437ace23d84f5420a2c1cea884fbfa43b115b7834a463516d50cb276d4c4d9128b49]
  184. # prepare_script:
  185. # - sudo rm -rf /Library/Developer/CommandLineTools
  186. # - echo A | softwareupdate --install-rosetta
  187. # - arch -x86_64 xcode-select --install
  188. # - arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
  189. # - export PATH="/usr/local/opt/node@16/bin:/usr/local/bin:$PATH"
  190. # - arch -x86_64 brew update
  191. # - arch -x86_64 brew install node@16 yarn git python@$PYTHON_VERSION
  192. # - ln -s /usr/local/bin/python$PYTHON_VERSION /usr/local/bin/python
  193. # - git submodule init
  194. # - git submodule update
  195. # - sed -i -e "s/[0-9]*-dev/`date -u +%Y%m%d%H`/g" package.json
  196. # install_script:
  197. # - export PATH="/usr/local/opt/node@16/bin:/usr/local/bin:$PATH"
  198. # - arch -x86_64 npx yarn install --ignore-engines || arch -x86_64 npx yarn install --ignore-engines
  199. # build_script:
  200. # - export PATH="/usr/local/opt/node@16/bin:/usr/local/bin:$PATH"
  201. # - arch -x86_64 npx yarn build
  202. # - arch -x86_64 yarn run build:apm
  203. # build_binary_script:
  204. # - export PATH="/usr/local/opt/node@16/bin:/usr/local/bin:$PATH"
  205. # - arch -x86_64 npx yarn dist || arch -x86_64 npx yarn dist
  206. # rename_binary_script:
  207. # - export PATH="/usr/local/opt/node@16/bin:/usr/local/bin:$PATH"
  208. # - node script/rename.js "Intel.Mac"
  209. # binary_artifacts:
  210. # path: ./binaries/*
  211. # test_script:
  212. # - export PATH="/usr/local/opt/node@16/bin:/usr/local/bin:$PATH"
  213. # - rm -R node_modules/electron; yarn install --check-files
  214. # - hdiutil mount binaries/*Pulsar*dmg
  215. # - export BINARY_NAME=`ls /Volumes/Pulsar*/Pulsar.app/Contents/MacOS/Pulsar`
  216. # - PLAYWRIGHT_JUNIT_OUTPUT_NAME=report.xml arch -x86_64 npx playwright test --reporter=junit,list
  217. # always:
  218. # videos_artifacts:
  219. # path: ./tests/videos/**
  220. # junit_artifacts:
  221. # path: report.xml
  222. # type: text/xml
  223. # format: junit
  224. # windows_task:
  225. # alias: windows
  226. # timeout_in: 90m
  227. # windows_container:
  228. # image: cirrusci/windowsservercore:visualstudio2022-2022.06.23
  229. # env:
  230. # CIRRUS_SHELL: bash
  231. # PATH: C:\Python310\Scripts\;C:\Python310\;%PATH%;C:\Program Files\nodejs\;C:\Program Files\Git\cmd;C:\Users\User\AppData\Local\Microsoft\WindowsApps;C:\Users\User\AppData\Roaming\npm;C:\Program Files\Microsoft Visual Studio\2022\Community\Msbuild\Current\Bin\
  232. # prepare_script:
  233. # - choco install nodejs --version=16.16.0 -y
  234. # - choco install python --version=3.10.3 -y
  235. # - choco install git visualstudio2019-workload-vctools -y
  236. # - git submodule init
  237. # - git submodule update
  238. # - npm config set python 'C:\Python310\python.exe'
  239. # install_script:
  240. # - npx yarn install --ignore-engines
  241. # || rm -R node_modules && npx yarn install --ignore-engines
  242. # || rm -R node_modules && npx yarn install --ignore-engines
  243. # build_script:
  244. # - npx yarn build:apm
  245. # - npx yarn build || npx yarn build || npx yarn build
  246. # build_binary_script:
  247. # - sed -i -e "s/[0-9]*-dev/`date -u +%Y%m%d%H`/g" package.json
  248. # - npx yarn dist || npx yarn dist || npx yarn dist
  249. # rename_binary_script:
  250. # - node script/rename.js "Windows"
  251. # binary_artifacts:
  252. # path: .\binaries\*
  253. # test_script:
  254. # - mkdir extracted; tar -xf binaries/*zip -C ./extracted/
  255. # - export BINARY_NAME=./extracted/Pulsar.exe
  256. # - PLAYWRIGHT_JUNIT_OUTPUT_NAME=report.xml npx playwright test --reporter=junit,list || echo "Yeah, tests failed, Windows is like this"
  257. # always:
  258. # videos_artifacts:
  259. # path: ./tests/videos/**
  260. # junit_artifacts:
  261. # path: report.xml
  262. # type: text/xml
  263. # format: junit
  264. silently_mark_skipped_or_no_scheduled_tasks_builds_as_failed_task:
  265. skip_notifications: true
  266. only_if: $CIRRUS_CRON == "" && $CIRRUS_TAG == ""
  267. ### !!! ^ Don't forget to update this appropriately if our `only_if:` or `skip:` logic changes for the other tasks! !!! ###
  268. ### !!! ^ We want this task to run [only] if all other tasks would have skipped. !!! ###
  269. container:
  270. image: alpine:latest
  271. cpu: 1
  272. clone_script: exit 0 # Shortest possible script that succeeds. Saves time vs actually cloning. Failing here triggers an automatic re-run, so don't do that!
  273. mark_task_as_failed_script: exit 1 # Shortest possible script to mark a build as "failed". This protects CIRRUS_LAST_GREEN_CHANGE from being updated by builds that actually just skipped CI.
  274. timeout_in: 6s