.cirrus.yml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277
  1. env:
  2. PYTHON_VERSION: 3.10
  3. GITHUB_TOKEN: ENCRYPTED[!b0ff4671044672be50914a3a10b49af642bd8e0e681a6f4e5855ec5230a5cf9afbc53d9e90239b8d2c79455f014f383f!]
  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[690950798401ec3715e9d20ac29a0859d3c58097038081ff6afeaf4721e661672d34eb952d8a6442bc7410821ab8545a]
  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[690950798401ec3715e9d20ac29a0859d3c58097038081ff6afeaf4721e661672d34eb952d8a6442bc7410821ab8545a]
  131. prepare_script:
  132. - brew install node@16 yarn git python@$PYTHON_VERSION
  133. - git submodule init
  134. - git submodule update
  135. - ln -s /opt/homebrew/bin/python$PYTHON_VERSION /opt/homebrew/bin/python
  136. - export PATH="/opt/homebrew/bin:/opt/homebrew/opt/node@16/bin:$PATH"
  137. - sed -i -e "s/[0-9]*-dev/`date -u +%Y%m%d%H`/g" package.json
  138. install_script:
  139. - export PATH="/opt/homebrew/bin:/opt/homebrew/opt/node@16/bin:$PATH"
  140. - yarn install --ignore-engines || yarn install --ignore-engines
  141. build_script:
  142. - export PATH="/opt/homebrew/bin:/opt/homebrew/opt/node@16/bin:$PATH"
  143. - yarn build
  144. - yarn run build:apm
  145. build_binary_script:
  146. - export PATH="/opt/homebrew/bin:/opt/homebrew/opt/node@16/bin:$PATH"
  147. - yarn dist || yarn dist
  148. rename_binary_script:
  149. - export PATH="/opt/homebrew/bin:/opt/homebrew/opt/node@16/bin:$PATH"
  150. - node script/rename.js "Silicon.Mac"
  151. binary_artifacts:
  152. path: ./binaries/*
  153. test_script:
  154. - export PATH="/opt/homebrew/bin:/opt/homebrew/opt/node@16/bin:$PATH"
  155. - rm -R node_modules/electron; yarn install --check-files
  156. - hdiutil mount binaries/*Pulsar*dmg
  157. - export BINARY_NAME=`ls /Volumes/Pulsar*/Pulsar.app/Contents/MacOS/Pulsar`
  158. - PLAYWRIGHT_JUNIT_OUTPUT_NAME=report.xml npx playwright test --reporter=junit,list
  159. rolling_upload_script:
  160. - export PATH="/opt/homebrew/bin:/opt/homebrew/opt/node@16/bin:$PATH"
  161. - cd ./script/rolling-release-scripts
  162. - npm install
  163. - node ./rolling-release-binary-upload.js cirrus
  164. always:
  165. videos_artifacts:
  166. path: ./tests/videos/**
  167. junit_artifacts:
  168. path: report.xml
  169. type: text/xml
  170. format: junit
  171. # intel_mac_task:
  172. # alias: mac
  173. # macos_instance:
  174. # image: ghcr.io/cirruslabs/macos-monterey-xcode:14
  175. # memory: 8G
  176. # env:
  177. # CSC_LINK: ENCRYPTED[0078015a03bb6cfdbd80113ae5bbb6f448fd4bbbc40efd81bf2cb1554373046b475a4d7c77e3e3e82ac1ce2f7e3d2da5]
  178. # CSC_KEY_PASSWORD: ENCRYPTED[82bb72653d39578035ed1860ab4978703d50bd326d925a146ff08782f987ceb37ac2d8dbace52dec2b0e2ef92debf097]
  179. # APPLEID: ENCRYPTED[549ce052bd5666dba5245f4180bf93b74ed206fe5e6e7c8f67a8596d3767c1f682b84e347b326ac318c62a07c8844a57]
  180. # APPLEID_PASSWORD: ENCRYPTED[774c3307fd3b62660ecf5beb8537a24498c76e8d90d7f28e5bc816742fd8954a34ffed13f9aa2d1faf66ce08b4496e6f]
  181. # TEAM_ID: ENCRYPTED[11f3fedfbaf4aff1859bf6c105f0437ace23d84f5420a2c1cea884fbfa43b115b7834a463516d50cb276d4c4d9128b49]
  182. # prepare_script:
  183. # - sudo rm -rf /Library/Developer/CommandLineTools
  184. # - echo A | softwareupdate --install-rosetta
  185. # - arch -x86_64 xcode-select --install
  186. # - arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
  187. # - export PATH="/usr/local/opt/node@16/bin:/usr/local/bin:$PATH"
  188. # - arch -x86_64 brew install node@16 yarn git python@$PYTHON_VERSION
  189. # - ln -s /usr/local/bin/python$PYTHON_VERSION /usr/local/bin/python
  190. # - git submodule init
  191. # - git submodule update
  192. # - sed -i -e "s/[0-9]*-dev/`date -u +%Y%m%d%H`/g" package.json
  193. # install_script:
  194. # - export PATH="/usr/local/opt/node@16/bin:/usr/local/bin:$PATH"
  195. # - arch -x86_64 npx yarn install --ignore-engines || arch -x86_64 npx yarn install --ignore-engines
  196. # build_script:
  197. # - export PATH="/usr/local/opt/node@16/bin:/usr/local/bin:$PATH"
  198. # - arch -x86_64 npx yarn build
  199. # - arch -x86_64 yarn run build:apm
  200. # build_binary_script:
  201. # - export PATH="/usr/local/opt/node@16/bin:/usr/local/bin:$PATH"
  202. # - arch -x86_64 npx yarn dist || arch -x86_64 npx yarn dist
  203. # rename_binary_script:
  204. # - export PATH="/usr/local/opt/node@16/bin:/usr/local/bin:$PATH"
  205. # - node script/rename.js "Intel.Mac"
  206. # binary_artifacts:
  207. # path: ./binaries/*
  208. # test_script:
  209. # - export PATH="/usr/local/opt/node@16/bin:/usr/local/bin:$PATH"
  210. # - rm -R node_modules/electron; yarn install --check-files
  211. # - hdiutil mount binaries/*Pulsar*dmg
  212. # - export BINARY_NAME=`ls /Volumes/Pulsar*/Pulsar.app/Contents/MacOS/Pulsar`
  213. # - PLAYWRIGHT_JUNIT_OUTPUT_NAME=report.xml arch -x86_64 npx playwright test --reporter=junit,list
  214. # always:
  215. # videos_artifacts:
  216. # path: ./tests/videos/**
  217. # junit_artifacts:
  218. # path: report.xml
  219. # type: text/xml
  220. # format: junit
  221. # windows_task:
  222. # alias: windows
  223. # timeout_in: 90m
  224. # windows_container:
  225. # image: cirrusci/windowsservercore:visualstudio2022-2022.06.23
  226. # env:
  227. # CIRRUS_SHELL: bash
  228. # 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\
  229. # prepare_script:
  230. # - choco install nodejs --version=16.16.0 -y
  231. # - choco install python --version=3.10.3 -y
  232. # - choco install git visualstudio2019-workload-vctools -y
  233. # - git submodule init
  234. # - git submodule update
  235. # - npm config set python 'C:\Python310\python.exe'
  236. # install_script:
  237. # - npx yarn install --ignore-engines
  238. # || rm -R node_modules && npx yarn install --ignore-engines
  239. # || rm -R node_modules && npx yarn install --ignore-engines
  240. # build_script:
  241. # - npx yarn build:apm
  242. # - npx yarn build || npx yarn build || npx yarn build
  243. # build_binary_script:
  244. # - sed -i -e "s/[0-9]*-dev/`date -u +%Y%m%d%H`/g" package.json
  245. # - npx yarn dist || npx yarn dist || npx yarn dist
  246. # rename_binary_script:
  247. # - node script/rename.js "Windows"
  248. # binary_artifacts:
  249. # path: .\binaries\*
  250. # test_script:
  251. # - mkdir extracted; tar -xf binaries/*zip -C ./extracted/
  252. # - export BINARY_NAME=./extracted/Pulsar.exe
  253. # - PLAYWRIGHT_JUNIT_OUTPUT_NAME=report.xml npx playwright test --reporter=junit,list || echo "Yeah, tests failed, Windows is like this"
  254. # always:
  255. # videos_artifacts:
  256. # path: ./tests/videos/**
  257. # junit_artifacts:
  258. # path: report.xml
  259. # type: text/xml
  260. # format: junit
  261. silently_mark_skipped_or_no_scheduled_tasks_builds_as_failed_task:
  262. skip_notifications: true
  263. only_if: $CIRRUS_CRON == "" && $CIRRUS_TAG == ""
  264. ### !!! ^ Don't forget to update this appropriately if our `only_if:` or `skip:` logic changes for the other tasks! !!! ###
  265. ### !!! ^ We want this task to run [only] if all other tasks would have skipped. !!! ###
  266. container:
  267. image: alpine:latest
  268. cpu: 1
  269. 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!
  270. 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.
  271. timeout_in: 6s