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: 4cfb3bc995338e7a29c58322a437b5bf7b95e7af (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
image: gajim-master:latest

workflow:
  rules:
    - if: $GAJIM_NIGHTLY_BUILD
    - if: $CI_PIPELINE_SOURCE == "push"

stages:
  - test
  - build
  - deploy
  - publish

test-other:
  stage: test
  script:
    - codespell gajim
    - python3 setup.py build
    - appstream-util validate build/data/org.gajim.Gajim.appdata.xml
  interruptible: true

test-pyright:
  stage: test
  rules:
    - changes:
      - "**/*.py"
  script:
    - pip3 install git+https://dev.gajim.org/gajim/python-nbxmpp.git
    - PYGOBJECT_STUB_CONFIG=Gtk3,Gdk3,Soup2 pip3 install git+https://github.com/pygobject/pygobject-stubs.git
    - npm install pyright@1.1.284
    - python3 .ci/link-gtk.py
    - $(npm bin)/pyright --version
    - $(npm bin)/pyright
  interruptible: true

test-ruff:
  stage: test
  rules:
    - changes:
      - "**/*.py"
  script:
    - pip3 install ruff
    - ruff .
  interruptible: true

test-unittest:
  stage: test
  script:
    - pip3 install -I 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-linux:
  image: gajim-deb-build:latest
  stage: build
  dependencies: []
  rules:
    - if: '$GAJIM_NIGHTLY_BUILD'
    - if: '$CI_COMMIT_TAG'
  script:
    - apt-get update
    - apt-get install -y python3-nbxmpp-nightly
    - python3 setup.py sdist
    - python3 .ci/debian_build.py "$(find dist/gajim-*)" 1

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

build-windows:
  stage: build
  dependencies: []
  rules:
    - if: '$GAJIM_NIGHTLY_BUILD'
    - if: '$CI_COMMIT_TAG'
  script:
    - python3 .ci/appveyor_build.py
  artifacts:
    expire_in: 1 day
    paths:
      - build/*.json

deploy-linux:
  stage: deploy
  dependencies:
    - build-linux
  rules:
    - if: '$GAJIM_NIGHTLY_BUILD'
    - if: '$CI_COMMIT_TAG'
  variables:
    DEPLOY_TYPE: "linux"
  script:
    - python3 .ci/deploy.py dist

deploy-windows:
  stage: deploy
  dependencies:
    - build-windows
  rules:
    - if: '$GAJIM_NIGHTLY_BUILD'
    - if: '$CI_COMMIT_TAG'
  variables:
    DEPLOY_TYPE: "windows"
  script:
    - python3 .ci/deploy.py build

deploy-flatpak:
  image: git-deploy:latest
  stage: deploy
  dependencies: []
  rules:
    - if: '$CI_COMMIT_TAG'
  before_script:
    - eval $(ssh-agent -s)
    - .ci/prepare_git.sh github.com "${FLATHUB_DEPLOY_KEY}"
  script:
    - 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
    - git diff
    - git add --all
    - git commit -m "$CI_COMMIT_TAG"
    - git push

publish-release:
  image: git-deploy:latest
  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
    - python3 ./scripts/bump_version.py $CI_COMMIT_TAG
    - git diff
    - git add -u
    - git commit -m "Release Gajim $CI_COMMIT_TAG"
    - git push
    - .ci/make_release.py $CI_COMMIT_TAG "${PROJECT_TOKEN}"