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: 7ef30646a28ed111735482718fc522b838eda960 (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
image: ci-gajim:master

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

stages:
  - test
  - build
  - deploy

test-other:
  stage: test
  script:
    - codespell -I codespell.conf --skip="*__pycache__*,gajim/data/icons,gajim/data/sounds,gajim/data/emoticons" 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
    - pip3 install git+https://github.com/pygobject/pygobject-stubs.git
    - npm install pyright
    - python3 .ci/link-gtk.py
    - $(npm bin)/pyright --version
    - $(npm bin)/pyright
  interruptible: true

test-pylint:
  stage: test
  rules:
    - changes:
      - "**/*.py"
  script:
    - pip3 install -I git+https://dev.gajim.org/gajim/python-nbxmpp.git
    - .ci/pylint.sh --jobs=2 gajim
  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:
      cobertura: coverage.xml
  interruptible: true

build-linux:
  stage: build
  rules:
    - if: '$GAJIM_NIGHTLY_BUILD'
    - if: '$CI_COMMIT_TAG'
  script:
    - python3 .ci/sdist.py

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

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

  # artifacts:
  #   expire_in: 1 day
  #   paths:
  #     - build/Gajim-*.exe

deploy-linux:
  stage: deploy
  needs: ['build-linux']
  rules:
    - if: '$GAJIM_NIGHTLY_BUILD'
    - if: '$CI_COMMIT_TAG'
      when: manual
  variables:
    DEPLOY_TYPE: "linux"
  script:
    - python3 .ci/deploy.py dist

# deploy-windows:
#   stage: deploy
#   needs: ['build-windows']
#   rules:
#     - if: '$GAJIM_NIGHTLY_BUILD'
#     - if: '$CI_COMMIT_TAG'
#       when: manual
#   variables:
#     DEPLOY_TYPE: "windows"
#   script:
#     - python3 .ci/deploy.py build

deploy-flatpak:
  stage: deploy
  needs: []
  rules:
    - if: '$CI_COMMIT_TAG'
  when: manual
  script:
    - git clone https://github.com/flathub/org.gajim.Gajim.git
    - cd org.gajim.Gajim
    - git config user.email "ci@gajim.org"
    - git config user.name "CI Deploy"
    - mv ../flatpak/org.gajim.Gajim.yaml org.gajim.Gajim.yaml
    - git diff
    - git add org.gajim.Gajim.yaml
    - git commit -m "$CI_COMMIT_TAG"