.gitlab-ci.yml 1.67 KB
Newer Older
1
image: $CI_REGISTRY/soundship/loopp-docker-build-env:stable
2 3 4 5 6 7 8 9 10
stages:
  - build
  - test
  - package

#include:
#  - template: Code-Quality.gitlab-ci.yml

static-analysis:
11 12
  tags: 
    - docker
13 14 15 16 17 18 19 20
  stage: test
  allow_failure: true
  script: 
    - lizard -C 10 -L 200 -x src/cjson/* src/tests/* src/ >&1 | tee lizard.txt
  artifacts:
    paths:
      - lizard.txt
    expire_in: 2 days
21
  dependencies: []
Georg Krause's avatar
Georg Krause committed
22

23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
build-test:
  tags: 
    - docker
  stage: build
  script:
    - meson buildDir -DunitTests=true -Db_coverage=true
    - ninja -C buildDir
  artifacts:
    untracked: true
    expire_in: 1 days
  dependencies: []

build-publish:
  tags: 
    - docker
38
  stage: build
Georg Krause's avatar
Georg Krause committed
39
  script: 
40 41 42 43 44 45 46
    - meson --prefix /usr buildDir
    - ninja -C buildDir
  artifacts:
    untracked: true
    expire_in: 1 days
  
test:
47 48
  tags: 
    - docker
49 50
  stage: test
  dependencies:
51 52 53
    - build-test
  script: 
    - ninja -C buildDir test
Georg Krause's avatar
Georg Krause committed
54
    - gcovr -b -e buildDir/loopp@exe/catch.hpp -e buildDir/loopp@exe/test_ <&1 | tee buildDir/coverage.txt
55 56 57 58 59 60
  artifacts:
    paths:
      - buildDir/coverage.txt
    reports:
      junit: buildDir/junit.xml
  coverage: '/^TOTAL.*\s+(\d+\%)$/'
61

62 63 64
package-AppImage:
  tags: 
    - docker
65 66
  stage: package
  dependencies:
67
    - build-publish
68 69
  script:
    - DESTDIR=./appdir ninja -C buildDir install ; find ./buildDir/appdir
Georg Krause's avatar
Georg Krause committed
70
    - cp resources/icons/loopp.png buildDir/appdir/loopp.png
Georg Krause's avatar
Georg Krause committed
71
    - unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH
Georg Krause's avatar
Georg Krause committed
72
    - /linuxdeployqt-continuous-x86_64.AppImage --appimage-extract
73
    - squashfs-root/AppRun buildDir/appdir/usr/share/applications/*.desktop -appimage
Georg Krause's avatar
Georg Krause committed
74
  artifacts:
Georg Krause's avatar
Georg Krause committed
75 76 77
    untracked: false
    expire_in: 30 days
    paths: 
Georg Krause's avatar
Georg Krause committed
78
      - Loopp-*.AppImage*