@@ -8,8 +8,8 @@ variables:
8
8
9
9
cache :
10
10
# enable per-job and per-branch caching
11
- - key :
12
- files :
11
+ - key :
12
+ files :
13
13
- ./requirements.txt
14
14
prefix : " $CI_JOB_NAME"
15
15
paths :
@@ -25,11 +25,14 @@ before_script:
25
25
- docker info || echo "no docker-command found" # Print out docker version for debugging
26
26
- echo CI_PROJECT_NAMESPACE = $CI_PROJECT_NAMESPACE
27
27
- echo CI_PROJECT_ROOT_NAMESPACE = $CI_PROJECT_ROOT_NAMESPACE
28
- - python -V # Print out python version for debugging
28
+ - python -V # Print out python version for debugging
29
29
- apt update
30
30
- apt install -y libusb-1.0-0-dev libudev-dev # usb-support in hidapi
31
- # This doesn't get cached in gitlab but we don't need it anyway for now:
32
- # - ./tests/install_noded.sh --debug --elements compile
31
+ # https://github.com/python-babel/babel/issues/990#issuecomment-1760326334
32
+ - rm -f /etc/localtime
33
+ - ln -s /usr/share/zoneinfo/Etc/UTC /etc/localtime
34
+ # This doesn't get cached in gitlab but we don't need it anyway for now:
35
+ # - ./tests/install_noded.sh --debug --elements compile
33
36
- pip3 install --upgrade virtualenv
34
37
- virtualenv --python=python3 .env
35
38
- source .env/bin/activate
@@ -45,20 +48,20 @@ check:
45
48
# So effectively, gitlab is currently only used for releasing.
46
49
47
50
.test :
48
- stage : testing
49
- # We assume here that people who want to get code into the master-branch are
50
- # relying on PRs and people who are working on gitlab-forks are working
51
- # on CI which probably want fast feedback on the releasing-jobs
52
- # and therefore skip the test-job
53
- # tem deactivated as it did not work as expected
54
- # only:
55
- # - $CI_PROJECT_ROOT_NAMESPACE =~ "cryptoadvance"
56
- script :
57
- - pip3 install -r requirements.txt
58
- - pip3 install -e .
59
- - pip3 install -e ".[test]"
60
- - python3 setup.py install # compiles babel stuff as well (might make pip install obsolete)
61
- - py.test --cov-report term --cov cryptoadvance
51
+ stage : testing
52
+ # We assume here that people who want to get code into the master-branch are
53
+ # relying on PRs and people who are working on gitlab-forks are working
54
+ # on CI which probably want fast feedback on the releasing-jobs
55
+ # and therefore skip the test-job
56
+ # tem deactivated as it did not work as expected
57
+ # only:
58
+ # - $CI_PROJECT_ROOT_NAMESPACE =~ "cryptoadvance"
59
+ script :
60
+ - pip3 install -r requirements.txt
61
+ - pip3 install -e .
62
+ - pip3 install -e ".[test]"
63
+ - python3 setup.py install # compiles babel stuff as well (might make pip install obsolete)
64
+ - py.test --cov-report term --cov cryptoadvance
62
65
63
66
.test-cypress :
64
67
image : registry.gitlab.com/cryptoadvance/specter-desktop/cypress-python-jammy:v9.7.0
80
83
81
84
release_pip :
82
85
stage : releasing
83
- only :
86
+ only :
84
87
- tags
85
88
script :
86
89
- pip3 install -e .
@@ -109,8 +112,10 @@ release_pip:
109
112
110
113
release_binary_windows :
111
114
stage : releasing
112
- only :
115
+ only :
113
116
- tags
117
+ variables :
118
+ GIT_DEPTH : 0 # Disable shallow clone to get all Git history
114
119
tags :
115
120
- windows
116
121
before_script :
@@ -120,17 +125,17 @@ release_binary_windows:
120
125
- pip install virtualenv
121
126
- virtualenv --python=python3 .env
122
127
- .\.env\Scripts\activate
123
- - pip3 install -e ".[test]"
124
-
128
+ - pip3 install -e ".[test]"
129
+
125
130
script :
126
131
# This script won't execute if the script before that fails
127
132
# No need to check the version-scheme again
128
133
129
- - echo "Releasing for ${CI_PROJECT_ROOT_NAMESPACE}"
134
+ - echo "Releasing for ${CI_PROJECT_ROOT_NAMESPACE}"
130
135
- .\pyinstaller\build-win-ci.bat $CI_COMMIT_TAG
131
136
- python ./utils/github.py upload ./pyinstaller/release/specterd-$CI_COMMIT_TAG-win64.zip
132
137
- cd ./pyinstaller/release
133
- - python ..\..\utils\release-helper .py sha256sums specterd-$CI_COMMIT_TAG-win64.zip > SHA256SUMS-windows
138
+ - python ..\..\utils\release_helper .py sha256sums specterd-$CI_COMMIT_TAG-win64.zip > SHA256SUMS-windows
134
139
- type SHA256SUMS-windows
135
140
- echo $GPG_PASSPHRASE | c:\Program` Files` `(x86`)\GnuPg\bin\gpg --detach-sign --armor --no-tty --batch --yes --passphrase-fd 0 --pinentry-mode loopback SHA256SUMS-windows
136
141
artifacts :
@@ -140,28 +145,31 @@ release_binary_windows:
140
145
expire_in : 1 day
141
146
cache :
142
147
key :
143
- files :
144
- - ./pyinstaller/electron/package-lock.json
145
- prefix : $CI_JOB_NAME
148
+ files :
149
+ - ./pyinstaller/electron/package-lock.json
150
+ prefix : $CI_JOB_NAME
146
151
paths :
147
152
- ./pyinstaller/electron/node_modules
148
153
149
154
release_electron_linux_windows :
150
155
image : registry.gitlab.com/cryptoadvance/specter-desktop/electron-builder:latest
151
156
stage : releasing
152
- only :
157
+ only :
153
158
- tags
154
159
needs :
155
160
- release_binary_windows
156
161
before_script :
157
- - python3 -V # Print out python version for debugging
162
+ - python3 -V # Print out python version for debugging
158
163
- apt update
159
164
- apt install -y unzip libusb-1.0-0-dev libudev-dev # usb-support in hidapi
160
165
- pip3 install virtualenv
161
166
# Only difference to default befor_script: (ToDo fix this)
162
167
- python3 -m virtualenv --python=python3 .env
163
168
- source .env/bin/activate
164
- - pip3 install -e ".[test]"
169
+ # https://github.com/python-babel/babel/issues/990#issuecomment-1760326334
170
+ - rm -f /etc/localtime
171
+ - ln -s /usr/share/zoneinfo/Etc/UTC /etc/localtime
172
+ - pip3 install -e ".[test]" # TZ=UTC because https://github.com/nektos/act/issues/1853
165
173
script :
166
174
- echo "Releasing for ${CI_PROJECT_ROOT_NAMESPACE}"
167
175
- export CI_PROJECT_ROOT_NAMESPACE # needed in the build-script to download the right windows-binary
@@ -176,17 +184,17 @@ release_electron_linux_windows:
176
184
- ./utils/artifact_signer.sh sign --artifact ./release/SHA256SUMS-win
177
185
- ./utils/artifact_signer.sh sign --artifact ./release/SHA256SUMS-linux
178
186
- python3 ./utils/github.py upload ./release/Specter-Setup-${CI_COMMIT_TAG}.exe
179
- - python3 ./utils/github.py upload ./release/specterd-${CI_COMMIT_TAG}-x86_64-linux-gnu.zip
180
- - python3 ./utils/github.py upload ./release/specter_desktop-${CI_COMMIT_TAG}-x86_64-linux-gnu.tar.gz
187
+ - python3 ./utils/github.py upload ./release/specterd-${CI_COMMIT_TAG}-x86_64-linux-gnu.zip
188
+ - python3 ./utils/github.py upload ./release/specter_desktop-${CI_COMMIT_TAG}-x86_64-linux-gnu.tar.gz
181
189
# - python3 ../utils/github.py upload ./release/SHA256SUMS-linux
182
190
# - python3 ../utils/github.py upload ./release/SHA256SUMS-linux.asc
183
191
# - python3 ../utils/github.py upload ./release/SHA256SUMS-win
184
192
# - python3 ../utils/github.py upload ./release/SHA256SUMS-win.asc
185
193
cache :
186
194
key :
187
- files :
188
- - ./pyinstaller/electron/package-lock.json
189
- prefix : $CI_JOB_NAME
195
+ files :
196
+ - ./pyinstaller/electron/package-lock.json
197
+ prefix : $CI_JOB_NAME
190
198
paths :
191
199
- ./pyinstaller/electron/node_modules
192
200
@@ -204,28 +212,28 @@ release_electron_linux_windows:
204
212
205
213
release_signatures :
206
214
stage : post_releasing
207
- only :
215
+ only :
208
216
- tags
209
217
before_script :
210
- - python -V # Print out python version for debugging
218
+ - python -V # Print out python version for debugging
211
219
- pip3 install --upgrade virtualenv
212
220
- virtualenv --python=python3 .env
213
221
- source .env/bin/activate
214
222
- pip3 install -e ".[test]"
215
223
- ./utils/artifact_signer.sh init # prepare .gnupg
216
224
script :
217
- - python3 -m utils.release-helper download # downloads the job-artifacts from gitlab
218
- - python3 -m utils.release-helper downloadgithub # downloads additional artifacts from github (if not there and is they have SHA256SUMS-something)
219
- - python3 -m utils.release-helper checksigs # checks the signatures of all SHA256SUMM*.asc files
220
- - python3 -m utils.release-helper checkhashes # checks all SHA256SUM* files (might modify files on the fly due to windows line endings)
221
- - python3 -m utils.release-helper create # creates a SHA256SUM
225
+ - python3 -m utils.release_helper download # downloads the job-artifacts from gitlab
226
+ - python3 -m utils.release_helper downloadgithub # downloads additional artifacts from github (if not there and is they have SHA256SUMS-something)
227
+ - python3 -m utils.release_helper checksigs # checks the signatures of all SHA256SUMM*.asc files
228
+ - python3 -m utils.release_helper checkhashes # checks all SHA256SUM* files (might modify files on the fly due to windows line endings)
229
+ - python3 -m utils.release_helper create # creates a SHA256SUM
222
230
- ./utils/artifact_signer.sh sign --artifact ./signing_dir/SHA256SUMS # Signs the SHA256SUM
223
- - python3 -m utils.release-helper upload_shasums # uploads SHA256SUMS to github
224
- - python3 -m utils.release-helper upload_shasumssig # uploads SHA256SUMS.asc to github
231
+ - python3 -m utils.release_helper upload_shasums # uploads SHA256SUMS to github
232
+ - python3 -m utils.release_helper upload_shasumssig # uploads SHA256SUMS.asc to github
225
233
226
234
release_docker :
227
235
stage : post_releasing
228
- only :
236
+ only :
229
237
- tags
230
238
before_script :
231
239
- echo "Triggering Docker Release"
@@ -239,46 +247,35 @@ tag_specterext_dummy_repo:
239
247
only :
240
248
- tags
241
249
before_script :
242
- # # Install ssh-agent if not already installed, it is required by Docker.
243
- # # (change apt-get to yum if you use an RPM-based image)
244
- # #
245
- - ' which ssh-agent || ( apk update && apk add --no-cache bash git openssh )'
246
- - docker info
247
-
248
- # #
249
- # # Run ssh-agent (inside the build environment)
250
- # #
251
- - eval $(ssh-agent -s)
252
-
253
- # #
254
- # # Add the SSH key stored in SSH_PRIVATE_KEY variable to the agent store
255
- # # We're using tr to fix line endings which makes ed25519 keys work
256
- # # without extra base64 encoding.
257
- # # https://gitlab.com/gitlab-examples/ssh-private-key/issues/1#note_48526556
258
- # #
259
- - echo "$SSH_SPECTEREXT_DEPLOY_KEY" | tr -d '\r' | ssh-add - > /dev/null
260
-
261
- # #
262
- # # Create the SSH directory and give it the right permissions
263
- # #
264
- - mkdir -p ~/.ssh
265
- - chmod 700 ~/.ssh
266
-
267
- # #
268
- # # Optionally, if you will be using any Git commands, set the user name and
269
- # # and email.
270
- # #
271
- - git config --global user.email "specter@secretvalues"
272
- - git config --global user.name "specter"
273
-
274
- # #
275
- # # Assuming you created the SSH_KNOWN_HOSTS variable, uncomment the
276
- # # following two lines.
277
- # #
278
- - echo "$KNOWN_HOSTS" > ~/.ssh/known_hosts
279
- - chmod 644 ~/.ssh/known_hosts
280
-
250
+ # write access to git@github.com:cryptoadvance/specterext-dummy.git
251
+ - source ./utils/prepare_for_git_write.sh "$SSH_SPECTEREXT_DEPLOY_KEY"
281
252
script :
282
253
- echo "Now tagging ... git@github.com:${CI_PROJECT_ROOT_NAMESPACE}/specterext-dummy.git"
283
254
- ./utils/tag_specterext_dummy.sh
284
255
256
+ update_github :
257
+ stage : post_releasing
258
+ only :
259
+ - tags
260
+ needs :
261
+ - release_signatures
262
+ before_script :
263
+ # write access to git@github.com:swan-bitcoin/specter-static.git
264
+ - source ./utils/prepare_for_git_write.sh "$SSH_SPECTERSTATIC_DEPLOY_KEY"
265
+ script :
266
+ - echo "Now updating https://github.com:${CI_PROJECT_ROOT_NAMESPACE}/specter-desktop/releases/tag/${CI_COMMIT_TAG:-v2.0.4-pre8}"
267
+ - ./utils/generate_downloadpage.sh --org_name ${CI_PROJECT_ROOT_NAMESPACE:-k9ert} --debug --version ${CI_COMMIT_TAG:-v2.0.4-pre8} generate github # default-value for testing
268
+
269
+ update_webpage :
270
+ stage : post_releasing
271
+ only :
272
+ - tags
273
+ needs :
274
+ - release_signatures
275
+ before_script :
276
+ # write access to git@github.com:swan-bitcoin/specter-static.git
277
+ - source ./utils/prepare_for_git_write.sh "$SSH_SPECTERSTATIC_DEPLOY_KEY"
278
+ script :
279
+ - echo "Now updating https://github.com:${CI_PROJECT_ROOT_NAMESPACE}/specter-static.git"
280
+ - ./utils/generate_downloadpage.sh --org_name ${CI_PROJECT_ROOT_NAMESPACE:-k9ert} --debug --version ${CI_COMMIT_TAG:-v2.0.4-pre8} generate webpage # default-value for testing
281
+
0 commit comments