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