.gitlab-ci.yml 1.57 KB
Newer Older
1 2 3
variables:
  PYPI_USER: SECURE
  PYPI_PASSWORD: SECURE
4
  GIT_SUBMODULE_STRATEGY: recursive
Andreas Schmidt's avatar
Andreas Schmidt committed
5

6 7 8 9 10 11 12 13
stages:
  - build
  - test
  - deploy
  - clean

build_prrt:
  stage: build
14 15
  tags:
    - cmake
16 17 18 19 20
  artifacts:
    name: "$CI_BUILD_REF_NAME$"
    untracked: true
    expire_in: "1h"
  script:
21
    - rm -vf ~/.pypirc
22 23 24 25 26 27 28 29
    - which cmake
    - which gcc
    - which g++
    - pip3 list | grep Cython
    - pip3 list | grep numpy
    - CC=gcc-5 CXX=g++-5 cmake .
    - make

30 31 32 33 34 35 36 37 38 39 40
build_container:
    stage: build
    tags:
        - docker
    script:
        - export DOCKER_TAG=$(echo "$CI_BUILD_REF_NAME" | sed 's#/#_#' | sed 's#^master$#latest#')
        - docker build -t $CI_REGISTRY_IMAGE:$DOCKER_TAG --build-arg http_proxy=http://www-proxy.uni-saarland.de:3128 .
        - docker login -u gitlab-ci-token -p $CI_BUILD_TOKEN $CI_REGISTRY
        - docker push $CI_REGISTRY_IMAGE:$DOCKER_TAG
        - docker rmi $CI_REGISTRY_IMAGE:$DOCKER_TAG

41 42
test_prrt_mem:
  stage: test
43 44
  tags:
    - valgrind
45
  script:
Andreas Schmidt's avatar
Andreas Schmidt committed
46
    - bash memtest.sh
47

48 49
test_prrt_functional:
  stage: test
50
  script:
51
    - ./bin/prrtTests
52

53 54
package_pypi:
  stage: deploy
Andreas Schmidt's avatar
Andreas Schmidt committed
55
  script:
56 57 58 59 60 61 62 63 64 65 66 67 68 69 70
    - echo "[distutils]" >> ~/.pypirc
    - echo "index-servers =" >> ~/.pypirc
    - echo "  on" >> ~/.pypirc
    - echo " " >> ~/.pypirc
    - echo "[on]" >> ~/.pypirc
    - echo "repository=http://git.nt.uni-saarland.de:5678" >> ~/.pypirc
    - echo "username=$PYPI_USER" >> ~/.pypirc
    - echo "password=$PYPI_PASSWORD" >> ~/.pypirc
    - python3 setup.py check sdist bdist upload -r on

clean_pypirc:
  stage: clean
  when: always
  script:
    - rm -vf ~/.pypirc
Andreas Schmidt's avatar
Andreas Schmidt committed
71