.gitlab-ci.yml 1.63 KB
Newer Older
Yann Leboulanger's avatar
Yann Leboulanger committed
1
before_script:
Philipp Hörist's avatar
Philipp Hörist committed
2
  - sudo apt-get update -qq && sudo apt-get install -y -qq libtool pkg-config gir1.2-gtk-3.0 gir1.2-soup-2.4 python3-gi python3-cairo
Yann Leboulanger's avatar
Yann Leboulanger committed
3
4
5
6
7
8
  - sudo apt-get build-dep -y -qq gajim-default-nightly

stages:
  - test
  - build

Philipp Hörist's avatar
Philipp Hörist committed
9
run-tests:
Philipp Hörist's avatar
Philipp Hörist committed
10
11
  stage: test
  script:
Philipp Hörist's avatar
Philipp Hörist committed
12
    - rm -rf civenv-master
13
    - virtualenv -p python3 --system-site-packages civenv
Philipp Hörist's avatar
Philipp Hörist committed
14
    - . ./civenv/bin/activate
15
16
17
18
    - pip3 install -I mypy
    - pip3 install -I git+https://dev.gajim.org/gajim/python-nbxmpp.git@master
    - pip3 install -I pylint==2.4.4
    - mypy gajim
Marcin Mielniczuk's avatar
Marcin Mielniczuk committed
19
    - scripts/dev/pylint-ci.sh --jobs=2 gajim
Philipp Hörist's avatar
Philipp Hörist committed
20
21
22
    - python3 setup.py test -s test.no_gui
    - deactivate
    - rm -rf civenv-master
Yann Leboulanger's avatar
Yann Leboulanger committed
23

24
25
26
27
28
run-appdata:
  stage: test
  script:
    - appstream-util validate data/org.gajim.Gajim.appdata.xml.in

Yann Leboulanger's avatar
Yann Leboulanger committed
29
30
31
run-build:
  stage: build
  script:
André's avatar
André committed
32
33
    - python3 setup.py sdist
    - cd dist
Yann Leboulanger's avatar
Yann Leboulanger committed
34
35
36
37
38
39
40
41
    - export FN="gajim-default-"$(date +%F)".tar"
    - mv gajim-*.tar.gz $FN.gz
    - mkdir tmp_add_plugins
    - mv $FN.gz tmp_add_plugins/
    - cd tmp_add_plugins/
    - tar xzf $FN.gz
    - rm $FN.gz
    - export GF=$(find . -maxdepth 1 -type d -name 'gajim-*')
42
43
    - mkdir -p $GF/gajim/data/plugins/
    - cd $GF/gajim/data/plugins/
Yann Leboulanger's avatar
Yann Leboulanger committed
44
45
46
    - curl -O https://ftp.gajim.org/plugins_1/plugin_installer.zip
    - unzip plugin_installer.zip
    - rm plugin_installer.zip
47
    - cd ../../../..
Yann Leboulanger's avatar
Yann Leboulanger committed
48
49
50
    - tar czf ../$FN.gz gajim-*
    - cd ..
    - rm -rf tmp_add_plugins
Yann Leboulanger's avatar
Yann Leboulanger committed
51
    - scp $FN.gz panoramix:/var/www/gajim/downloads/snap/ci/gajim-default-$CI_COMMIT_SHA.tar.gz
Yann Leboulanger's avatar
Yann Leboulanger committed
52
53
54
55
56

  artifacts:
    name: "gajim-default-$CI_COMMIT_REF_NAME-$CI_COMMIT_SHA"
    expire_in: 1 week
    paths:
Philipp Hörist's avatar
Philipp Hörist committed
57
      - gajim-default-$CI_COMMIT_SHA.tar.gz