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

5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
stages:
  - build
  - test
  - deploy
  - clean

build_prrt:
  stage: build
  artifacts:
    name: "$CI_BUILD_REF_NAME$"
    untracked: true
    expire_in: "1h"
  script:
    - which cmake
    - which gcc
    - which g++
    - pip3 list | grep Cython
    - pip3 list | grep numpy
    - CC=gcc-5 CXX=g++-5 cmake .
    - make

test_prrt_mem:
  stage: test
28
  script:
29
    - which valgrind
30 31 32 33 34 35 36 37 38
    - export prrtResult=0
    - valgrind --tool=memcheck --track-origins=yes --leak-check=full --error-exitcode=1 ./bin/receiver 5000 & export prrtReceiverProcessID=$!
    - valgrind --tool=memcheck --track-origins=yes --leak-check=full --error-exitcode=1 ./bin/sender 100 || prrtResult=$?; kill -INT $prrtReceiverProcessID; wait $prrtReceiverProcessID || prrtResult=$?
    - exit $prrtResult

#performanceEvaluation:
#  script:
#    - python3 setup.py build_ext --inplace
#    - make perftest
Andreas Schmidt's avatar
Andreas Schmidt committed
39

40 41
test_prrt_functional:
  stage: test
42
  script:
43
    - ./bin/prrtTests
44

45 46
package_pypi:
  stage: deploy
Andreas Schmidt's avatar
Andreas Schmidt committed
47
  script:
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62
    - 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