Commit da79909d authored by Andreas Schmidt's avatar Andreas Schmidt
Browse files

Merge branch 'develop'

parents 123f6356 381508c7
Loading
Loading
Loading
Loading
Loading

.gitattributes

0 → 100644
+2 −0
Original line number Diff line number Diff line
prrt/_version.py export-subst
_version.py export-subst

.gitignore

0 → 100644
+11 −0
Original line number Diff line number Diff line
*.cbp
*.pyc
.vagrant/
cython_debug/
dist/
prrt.egg-info/
prrt/__pycache__/
tests/__pycache__/
MANIFEST
prrt.cpython*.so
prrt.so

.gitlab-ci.yml

0 → 100644
+81 −0
Original line number Diff line number Diff line
variables:
  PYPI_USER: SECURE
  PYPI_PASSWORD: SECURE
  GIT_SUBMODULE_STRATEGY: recursive

stages:
  - build
  - test
  - deploy
  - clean

build:prrt:
  stage: build
  tags:
    - cmake
  artifacts:
    name: "$CI_BUILD_REF_NAME$"
    untracked: true
    expire_in: "1h"
  script:
    - rm -vf ~/.pypirc
    - which cmake
    - which gcc
    - which g++
    - pip3 list | grep Cython
    - pip3 list | grep numpy
    - CC=gcc-5 CXX=g++-5 cmake . -DPRRT_TESTS=1
    - make

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 -f docker/Dockerfile .
        - 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

test:prrt_mem:
  stage: test
  dependencies:
    - build:prrt
  tags:
    - valgrind
  script:
    - bash tests/memtest.sh

test:prrt_functional:
  stage: test
  dependencies:
    - build:prrt
  tags:
    - bash
  script:
    - exec ./bin/prrtTests

test:prrt_python_bindings:
  stage: test
  tags:
    - bash
    - python3
  script:
    - sh tests/build.sh

deploy:pypi:
  stage: deploy
  tags:
    - python3
  script:
    - 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
    - rm -vf ~/.pypirc
 No newline at end of file

.gitmodules

0 → 100644
+3 −0
Original line number Diff line number Diff line
[submodule "prrt/xlap"]
	path = prrt/xlap
	url = ../../as/X-Lap.git

CMakeLists.txt

0 → 100644
+33 −0
Original line number Diff line number Diff line
cmake_minimum_required (VERSION 2.8.11)
project (PRRT)

option(PRRT_TESTS "Build tests" OFF)

set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/build)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)

set(CMAKE_C_FLAGS "-O2 -Wall -std=gnu11 -D_GNU_SOURCE" )
set(CMAKE_CXX_FLAGS "-fstack-protector -fstack-protector-all -Wall -std=gnu++11 -D_GNU_SOURCE" )
set(CMAKE_CXX_FLAGS_DEBUG "-O2 -Wall -ggdb" )
set(CMAKE_CXX_FLAGS_RELEASE "-Os -Wall" )


find_package (Threads)
find_library(M_LIB m)


include_directories(${CMAKE_CURRENT_SOURCE_DIR})

add_subdirectory(prrt)

if(PRRT_TESTS)
    enable_testing()

    add_subdirectory(tests)

    add_custom_target(funtest COMMAND ./bin/prrtTests)
endif()

add_custom_target(perftest COMMAND python3 tests/eval.py)
add_custom_target(memtest COMMAND bash ./memtest.sh DEPENDS sender receiver)
Loading