Welcome to mirror list, hosted at ThFree Co, Russian Federation.

.gitlab-ci.yml - dev.gajim.org/gajim/gajim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 27d35aa2715de8c2cdd518e88a01a9cf41f08f2e (plain)
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
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
workflow:
  rules:
    - if: $NIGHTLY_BUILD
    - if: $DEBIAN_BUILD
    - if: $WINDOWS_BUILD
    - if: $CI_PIPELINE_SOURCE == "push"

stages:
  - test
  - build
  - deploy
  - publish

test-other:
  image: gajim-test
  stage: test
  script:
    - pyproject-build
    - python ./pep517build/build_metadata.py
    - appstream-util validate dist/metadata/org.gajim.Gajim.appdata.xml
  interruptible: true

test-codespell:
  image: gajim-test
  stage: test
  script:
    - codespell --version
    - codespell gajim
  interruptible: true

test-pyright:
  image: gajim-test
  stage: test
  rules:
    - changes:
      - "**/*.py"
  script:
    - pip install git+https://dev.gajim.org/gajim/python-nbxmpp.git
    - pip install git+https://dev.gajim.org/gajim/omemo-dr.git
    - pip install --config-settings=config=Gtk3,Gdk3,GtkSource4 git+https://github.com/pygobject/pygobject-stubs.git
    - pyright --version
    - pyright
  interruptible: true

test-ruff:
  image: gajim-test
  stage: test
  rules:
    - changes:
      - "**/*.py"
  script:
    - ruff --version
    - ruff .
  interruptible: true

test-isort:
  image: gajim-test
  stage: test
  rules:
    - changes:
      - "**/*.py"
  script:
    - isort --version
    - isort --check .
  interruptible: true

test-unittest:
  image: gajim-test
  stage: test
  script:
    - pip install git+https://dev.gajim.org/gajim/python-nbxmpp.git
    - coverage run --source=gajim -m unittest discover -s test -v
    - coverage report -mi
    - coverage xml -i
  coverage: "/TOTAL.+ ([0-9]{1,3}%)/"
  artifacts:
    reports:
      coverage_report: 
        coverage_format: cobertura
        path: coverage.xml
  interruptible: true

build-unix:
  image: gajim-build
  stage: build
  dependencies: []
  rules:
    - if: '$DEBIAN_BUILD'
    - if: '$NIGHTLY_BUILD'
    - if: '$CI_COMMIT_TAG'
  script:
    - pyproject-build

  artifacts:
    name: "gajim-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA"
    expire_in: 1 week
    paths:
      - dist/gajim-*.tar.gz
      - dist/gajim-*.whl

build-debian-nightly:
  image: gajim-build
  stage: build
  variables:
    REV: "1"
  needs:
    - job: build-unix
      artifacts: true
  rules:
    - if: '$DEBIAN_BUILD'
    - if: '$NIGHTLY_BUILD'
  script:
    - apt-get update
    - apt-get install -y python3-nbxmpp-nightly
    - apt-get install -y python3-omemo-dr
    - release-helper build-debian-pkg "$(find dist/gajim-*.tar.gz)" $REV --pkgsuffix=nightly

  artifacts:
    name: "gajim-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA"
    expire_in: 1 week
    paths:
      - debian_build/*

build-windows:
  image: gajim-build
  stage: build
  dependencies: []
  rules:
    - if: '$CI_COMMIT_TAG'
  script:
    - >
      release-helper build-windows-pkg \
        --account=lovetox \
        --repository=https://dev.gajim.org/gajim/gajim \
        --branch=master \
        --version=$CI_COMMIT_TAG \
        --commit-sha=$CI_COMMIT_SHA \
        --api-key=$APPVEYOR_API_KEY \
        .ci/appveyor.yml
  artifacts:
    expire_in: 1 day
    paths:
      - windows_build/*.json

build-windows-nightly:
  image: gajim-build
  stage: build
  dependencies: []
  rules:
    - if: '$NIGHTLY_BUILD'
    - if: '$WINDOWS_BUILD'
  script:
    - >
      release-helper build-windows-pkg \
        --account=lovetox \
        --repository=https://dev.gajim.org/gajim/gajim \
        --branch=master \
        --version=Nightly \
        --commit-sha=$CI_COMMIT_SHA \
        --api-key=$APPVEYOR_API_KEY \
        .ci/appveyor.yml
  artifacts:
    expire_in: 1 day
    paths:
      - windows_build/*.json

deploy-unix:
  image: gajim-deploy
  stage: deploy
  dependencies:
    - build-unix
  rules:
    - if: '$CI_COMMIT_TAG'
  script:
    - >
      release-helper deploy-to-ftp \
        --host=$FTP_HOST \
        --user=$FTP_USER \
        --password=$FTP_PASS \
        --directory=downloads/"$(echo $CI_COMMIT_TAG | cut -c 1-3)" \
        --rename=gajim-$CI_COMMIT_TAG.tar.gz \
        "$(find dist/gajim-*.tar.gz)"

deploy-unix-nightly:
  image: gajim-deploy
  stage: deploy
  dependencies:
    - build-unix
  needs:
    - build-unix
  rules:
    - if: '$NIGHTLY_BUILD'
  allow_failure:
    exit_codes:
      - 100
  script:
    - release-helper nightly-check
    - >
      release-helper deploy-to-ftp \
        --host=$FTP_HOST \
        --user=$FTP_USER \
        --password=$FTP_PASS \
        --directory=downloads/snap \
        --rename=gajim-"$(date +'%Y-%m-%d')".tar.gz \
        "$(find dist/gajim-*.tar.gz)"

deploy-debian-nightly:
  image: gajim-deploy
  stage: deploy
  dependencies:
    - build-debian-nightly
  needs:
    - build-debian-nightly
  rules:
    - if: '$DEBIAN_BUILD'
    - if: '$NIGHTLY_BUILD'
  allow_failure:
    exit_codes:
      - 100
  script:
    - release-helper nightly-check
    - >
      release-helper deploy-to-ftp \
        --host=$FTP_HOST \
        --user=$FTP_USER \
        --password=$FTP_PASS \
        --directory=debian/gajim/"$(date +'%Y%m%d')" \
        debian_build

deploy-windows:
  image: gajim-deploy
  stage: deploy
  dependencies:
    - build-windows
  rules:
    - if: '$CI_COMMIT_TAG'
  script:
    - release-helper download-appveyor-artifacts "$(find windows_build/*.json)" windows_build
    - rm windows_build/*.json
    - >
      release-helper deploy-to-ftp \
        --host=$FTP_HOST \
        --user=$FTP_USER \
        --password=$FTP_PASS \
        --directory=downloads/"$(echo $CI_COMMIT_TAG | cut -c 1-3)" \
        windows_build

deploy-windows-nightly:
  image: gajim-deploy
  stage: deploy
  dependencies:
    - build-windows-nightly
  needs:
    - build-windows-nightly
  rules:
    - if: '$NIGHTLY_BUILD'
    - if: '$WINDOWS_BUILD'
  allow_failure:
    exit_codes:
      - 100
  script:
    - release-helper nightly-check
    - release-helper download-appveyor-artifacts "$(find windows_build/*.json)" windows_build
    - rm windows_build/*.json
    - >
      release-helper deploy-to-ftp \
        --host=$FTP_HOST \
        --user=$FTP_USER \
        --password=$FTP_PASS \
        --directory=downloads/snap/win \
        windows_build

deploy-flatpak:
  image: gajim-deploy
  stage: deploy
  dependencies: []
  rules:
    - if: '$CI_COMMIT_TAG'
  before_script:
    - eval $(ssh-agent -s)
    - .ci/prepare_git.sh github.com "${FLATHUB_DEPLOY_KEY}"
  script:
    # extract the current commit hash of the shared-modules submodule
    - submodule_commit=$(git submodule status flatpak/shared-modules | cut -c 2-41)
    - git clone git@github.com:flathub/org.gajim.Gajim.git
    - cd org.gajim.Gajim
    - mv ../flatpak/org.gajim.Gajim.yaml org.gajim.Gajim.yaml
    - mv ../flatpak/app-overrides.json app-overrides.json
    # point the shared-modules submodule to the new commit, without fetching the repository
    - git update-index --cacheinfo 160000,${submodule_commit},shared-modules
    - git diff
    - git add --all
    - git commit -m "$CI_COMMIT_TAG"
    - git push

publish-website:
  image: gajim-publish
  stage: publish
  dependencies: []
  rules:
    - if: '$CI_COMMIT_TAG'
  before_script:
    - eval $(ssh-agent -s)
    - .ci/prepare_git.sh dev.gajim.org "${WEBSITE_DEPLOY_KEY}"
  script:
    - git clone git@dev.gajim.org:gajim/website.git
    - cd website
    - git checkout master
    - python ./scripts/bump_version.py $CI_COMMIT_TAG
    - git diff
    - git add -u
    - git commit -m "Release Gajim $CI_COMMIT_TAG"
    - git push

publish-release:
  image: gajim-publish
  stage: publish
  dependencies: []
  rules:
    - if: '$CI_COMMIT_TAG'
  script:
    - >
      release-helper finish-milestone \
        $CI_PROJECT_ID \
        $PROJECT_TOKEN \
        --version=$CI_COMMIT_TAG \
        --title="Next Release"
    - >
      release-helper create-release \
        $CI_PROJECT_ID \
        $PROJECT_TOKEN \
        --version=$CI_COMMIT_TAG \
        --tag=$CI_COMMIT_TAG \
        --milestone=$CI_COMMIT_TAG