.cirrus.yml 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293
  1. env:
  2. PYTHON_VERSION: 3.12
  3. GITHUB_TOKEN: ENCRYPTED[!06df1c93af902fc78fbd143724c5d11733607c6e743665859073de9aa2a317a5ac67b302f5ed92b232f6d28fae602e92!]
  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[50debc954fd1b46513fa44d6270491edaba4c9c0ab6fbf0a3fb8e3bdfe9e380d203bd90857ae720b5af31d8a02c6389f]
  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. ruby-dev
  74. rpm
  75. build-essential
  76. git
  77. libsecret-1-dev
  78. fakeroot
  79. libx11-dev
  80. libxkbfile-dev
  81. libgdk-pixbuf2.0-dev
  82. libgtk-3-dev
  83. libxss-dev
  84. libasound2-dev
  85. libnss3
  86. wget
  87. xvfb
  88. - gem install dotenv -v '~> 2.8'
  89. - gem install fpm
  90. - git submodule init
  91. - git submodule update
  92. - sed -i -e "s/[0-9]*-dev/`date -u +%Y%m%d%H`/g" package.json
  93. install_script:
  94. - yarn install --ignore-engines || yarn install --ignore-engines
  95. build_script:
  96. - yarn build
  97. - yarn run build:apm
  98. build_binary_script:
  99. - yarn dist || yarn dist
  100. rename_binary_script:
  101. - node script/rename.js "ARM.Linux"
  102. fix_linux_appimage_script:
  103. - ./script/fix-linux-appimage.sh aarch64
  104. binary_artifacts:
  105. path: ./binaries/*
  106. test_script:
  107. - rm -R node_modules/electron; yarn install --check-files
  108. - ./binaries/*AppImage --appimage-extract
  109. - export BINARY_NAME='squashfs-root/pulsar'
  110. - Xvfb :99 & DISPLAY=:99 PLAYWRIGHT_JUNIT_OUTPUT_NAME=report.xml npx playwright test --reporter=junit,list
  111. rolling_upload_script:
  112. - cd ./script/rolling-release-scripts
  113. - npm install
  114. - node ./rolling-release-binary-upload.js cirrus
  115. always:
  116. videos_artifacts:
  117. path: ./tests/videos/**
  118. junit_artifacts:
  119. path: report.xml
  120. type: text/xml
  121. format: junit
  122. silicon_mac_task:
  123. alias: mac
  124. only_if: $CIRRUS_CRON != "" || $CIRRUS_TAG != ""
  125. skip: $CIRRUS_CHANGE_IN_REPO == $CIRRUS_LAST_GREEN_CHANGE
  126. macos_instance:
  127. image: ghcr.io/cirruslabs/macos-ventura-xcode:latest
  128. memory: 8G
  129. env:
  130. CSC_LINK: ENCRYPTED[0078015a03bb6cfdbd80113ae5bbb6f448fd4bbbc40efd81bf2cb1554373046b475a4d7c77e3e3e82ac1ce2f7e3d2da5]
  131. CSC_KEY_PASSWORD: ENCRYPTED[82bb72653d39578035ed1860ab4978703d50bd326d925a146ff08782f987ceb37ac2d8dbace52dec2b0e2ef92debf097]
  132. APPLEID: ENCRYPTED[549ce052bd5666dba5245f4180bf93b74ed206fe5e6e7c8f67a8596d3767c1f682b84e347b326ac318c62a07c8844a57]
  133. APPLEID_PASSWORD: ENCRYPTED[774c3307fd3b62660ecf5beb8537a24498c76e8d90d7f28e5bc816742fd8954a34ffed13f9aa2d1faf66ce08b4496e6f]
  134. TEAM_ID: ENCRYPTED[11f3fedfbaf4aff1859bf6c105f0437ace23d84f5420a2c1cea884fbfa43b115b7834a463516d50cb276d4c4d9128b49]
  135. ROLLING_UPLOAD_TOKEN: ENCRYPTED[50debc954fd1b46513fa44d6270491edaba4c9c0ab6fbf0a3fb8e3bdfe9e380d203bd90857ae720b5af31d8a02c6389f]
  136. prepare_script:
  137. - brew update
  138. - brew uninstall node@20
  139. - brew install git python@$PYTHON_VERSION python-setuptools
  140. - git submodule init
  141. - git submodule update
  142. - ln -s /opt/homebrew/bin/python$PYTHON_VERSION /opt/homebrew/bin/python
  143. - export PATH="/opt/homebrew/bin:$PATH"
  144. - mkdir tj_n && cd tj_n
  145. - curl -L https://github.com/tj/n/archive/0ce85771fdff8f4b3e09ade700461b4f58a64444.tar.gz -O
  146. - tar xf 0ce85771fdff8f4b3e09ade700461b4f58a64444.tar.gz
  147. - sudo bash ./n-0ce85771fdff8f4b3e09ade700461b4f58a64444/bin/n 16
  148. - cd ..
  149. - sudo npm install -g yarn
  150. - sed -i -e "s/[0-9]*-dev/`date -u +%Y%m%d%H`/g" package.json
  151. install_script:
  152. - export PATH="/opt/homebrew/bin:$PATH"
  153. - yarn install --ignore-engines || yarn install --ignore-engines
  154. build_script:
  155. - export PATH="/opt/homebrew/bin:$PATH"
  156. - yarn build
  157. - yarn run build:apm
  158. build_binary_script:
  159. - export PATH="/opt/homebrew/bin:$PATH"
  160. - yarn dist || yarn dist
  161. rename_binary_script:
  162. - export PATH="/opt/homebrew/bin:$PATH"
  163. - node script/rename.js "Silicon.Mac"
  164. binary_artifacts:
  165. path: ./binaries/*
  166. test_script:
  167. - export PATH="/opt/homebrew/bin:$PATH"
  168. - rm -R node_modules/electron; yarn install --check-files
  169. - hdiutil mount binaries/*Pulsar*dmg
  170. - export BINARY_NAME=`ls /Volumes/Pulsar*/Pulsar.app/Contents/MacOS/Pulsar`
  171. - PLAYWRIGHT_JUNIT_OUTPUT_NAME=report.xml npx playwright test --reporter=junit,list
  172. rolling_upload_script:
  173. - export PATH="/opt/homebrew/bin:$PATH"
  174. - cd ./script/rolling-release-scripts
  175. - npm install
  176. - node ./rolling-release-binary-upload.js cirrus
  177. always:
  178. videos_artifacts:
  179. path: ./tests/videos/**
  180. junit_artifacts:
  181. path: report.xml
  182. type: text/xml
  183. format: junit
  184. # intel_mac_task:
  185. # alias: mac
  186. # macos_instance:
  187. # image: ghcr.io/cirruslabs/macos-ventura-xcode:latest
  188. # memory: 8G
  189. # env:
  190. # CSC_LINK: ENCRYPTED[0078015a03bb6cfdbd80113ae5bbb6f448fd4bbbc40efd81bf2cb1554373046b475a4d7c77e3e3e82ac1ce2f7e3d2da5]
  191. # CSC_KEY_PASSWORD: ENCRYPTED[82bb72653d39578035ed1860ab4978703d50bd326d925a146ff08782f987ceb37ac2d8dbace52dec2b0e2ef92debf097]
  192. # APPLEID: ENCRYPTED[549ce052bd5666dba5245f4180bf93b74ed206fe5e6e7c8f67a8596d3767c1f682b84e347b326ac318c62a07c8844a57]
  193. # APPLEID_PASSWORD: ENCRYPTED[774c3307fd3b62660ecf5beb8537a24498c76e8d90d7f28e5bc816742fd8954a34ffed13f9aa2d1faf66ce08b4496e6f]
  194. # TEAM_ID: ENCRYPTED[11f3fedfbaf4aff1859bf6c105f0437ace23d84f5420a2c1cea884fbfa43b115b7834a463516d50cb276d4c4d9128b49]
  195. # prepare_script:
  196. # - sudo rm -rf /Library/Developer/CommandLineTools
  197. # - echo A | softwareupdate --install-rosetta
  198. # - arch -x86_64 xcode-select --install
  199. # - arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
  200. # - export PATH="/usr/local/bin:$PATH"
  201. # - arch -x86_64 brew update
  202. # - arch -x86_64 brew uninstall node@20
  203. # - arch -x86_64 brew install node@16 git python@$PYTHON_VERSION python-setuptools
  204. # - ln -s /usr/local/bin/python$PYTHON_VERSION /usr/local/bin/python
  205. # - npm install -g yarn
  206. # - git submodule init
  207. # - git submodule update
  208. # - sed -i -e "s/[0-9]*-dev/`date -u +%Y%m%d%H`/g" package.json
  209. # install_script:
  210. # - export PATH="/usr/local/bin:$PATH"
  211. # - arch -x86_64 npx yarn install --ignore-engines || arch -x86_64 npx yarn install --ignore-engines
  212. # build_script:
  213. # - export PATH="/usr/local/bin:$PATH"
  214. # - arch -x86_64 npx yarn build
  215. # - arch -x86_64 yarn run build:apm
  216. # build_binary_script:
  217. # - export PATH="/usr/local/bin:$PATH"
  218. # - arch -x86_64 npx yarn dist || arch -x86_64 npx yarn dist
  219. # rename_binary_script:
  220. # - export PATH="/usr/local/bin:$PATH"
  221. # - node script/rename.js "Intel.Mac"
  222. # binary_artifacts:
  223. # path: ./binaries/*
  224. # test_script:
  225. # - export PATH="/usr/local/bin:$PATH"
  226. # - rm -R node_modules/electron; yarn install --check-files
  227. # - hdiutil mount binaries/*Pulsar*dmg
  228. # - export BINARY_NAME=`ls /Volumes/Pulsar*/Pulsar.app/Contents/MacOS/Pulsar`
  229. # - PLAYWRIGHT_JUNIT_OUTPUT_NAME=report.xml arch -x86_64 npx playwright test --reporter=junit,list
  230. # always:
  231. # videos_artifacts:
  232. # path: ./tests/videos/**
  233. # junit_artifacts:
  234. # path: report.xml
  235. # type: text/xml
  236. # format: junit
  237. # windows_task:
  238. # alias: windows
  239. # timeout_in: 90m
  240. # windows_container:
  241. # image: cirrusci/windowsservercore:visualstudio2022-2022.06.23
  242. # env:
  243. # CIRRUS_SHELL: bash
  244. # 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\
  245. # prepare_script:
  246. # - choco install nodejs --version=16.16.0 -y
  247. # - choco install python --version=3.10.3 -y
  248. # - choco install git visualstudio2019-workload-vctools -y
  249. # - git submodule init
  250. # - git submodule update
  251. # - npm config set python 'C:\Python310\python.exe'
  252. # install_script:
  253. # - npx yarn install --ignore-engines
  254. # || rm -R node_modules && npx yarn install --ignore-engines
  255. # || rm -R node_modules && npx yarn install --ignore-engines
  256. # build_script:
  257. # - npx yarn build:apm
  258. # - npx yarn build || npx yarn build || npx yarn build
  259. # build_binary_script:
  260. # - sed -i -e "s/[0-9]*-dev/`date -u +%Y%m%d%H`/g" package.json
  261. # - npx yarn dist || npx yarn dist || npx yarn dist
  262. # rename_binary_script:
  263. # - node script/rename.js "Windows"
  264. # binary_artifacts:
  265. # path: .\binaries\*
  266. # test_script:
  267. # - mkdir extracted; tar -xf binaries/*zip -C ./extracted/
  268. # - export BINARY_NAME=./extracted/Pulsar.exe
  269. # - PLAYWRIGHT_JUNIT_OUTPUT_NAME=report.xml npx playwright test --reporter=junit,list || echo "Yeah, tests failed, Windows is like this"
  270. # always:
  271. # videos_artifacts:
  272. # path: ./tests/videos/**
  273. # junit_artifacts:
  274. # path: report.xml
  275. # type: text/xml
  276. # format: junit
  277. silently_mark_skipped_or_no_scheduled_tasks_builds_as_failed_task:
  278. skip_notifications: true
  279. only_if: $CIRRUS_CRON == "" && $CIRRUS_TAG == ""
  280. ### !!! ^ Don't forget to update this appropriately if our `only_if:` or `skip:` logic changes for the other tasks! !!! ###
  281. ### !!! ^ We want this task to run [only] if all other tasks would have skipped. !!! ###
  282. container:
  283. image: alpine:latest
  284. cpu: 1
  285. 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!
  286. 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.
  287. timeout_in: 6s