Commit b64738a0 authored by Andreas Schmidt's avatar Andreas Schmidt

Add PyPI packaging, including automated builds.

parent b471cf83
Pipeline #759 failed with stages
in 55 seconds
build/
bin/
*.cmake
src/cython/prrt.c
*.cbp
*.pyc
CMakeCache.txt
.vagrant/
build/
bin/
CMakeFiles/
Makefile
cython_debug/
dist/
prrt.egg-info/
tests/__pycache__/
CMakeCache.txt
Makefile
MANIFEST
prrt.cpython*.so
tests/__pycache__/
\ No newline at end of file
prrt.so
src/cython/prrt.c
\ No newline at end of file
before_script:
- which cmake
- which gcc
- which g++
- which valgrind
- pip3 list | grep Cython
- pip3 list | grep numpy
- CC=gcc-5 CXX=g++-5 cmake .
- make
variables:
PYPI_USER: SECURE
PYPI_PASSWORD: SECURE
memcheck:
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
script:
- which valgrind
- 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=$?
......@@ -20,10 +37,26 @@ memcheck:
# - python3 setup.py build_ext --inplace
# - make perftest
pythonbindings:
test_prrt_functional:
stage: test
script:
- python3 setup.py build_ext --inplace
- ./bin/prrtTests
tests:
package_pypi:
stage: deploy
script:
- ./bin/prrtTests
- 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
include requirements.txt
recursive-include src *
\ No newline at end of file
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/xenial64"
config.vm.box_check_update = false
config.vm.provider "virtualbox" do |v|
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
v.name = "prrt"
v.memory = "2048"
v.cpus = "2"
end
config.vm.provision "shell", inline: <<-SHELL
sudo sed -i 's@http://archive.ubuntu.com/ubuntu@http://ftp.uni-kl.de/pub/linux/ubuntu/@' /etc/apt/sources.list
sudo apt-get update
sudo apt-get install -y python-dev python-pip
SHELL
end
[bdist_wheel]
# This code is written to work with both Python 2 and Python 3
universal=1
from distutils.core import setup
from setuptools import setup
from distutils.extension import Extension
from Cython.Build import cythonize
import os
......@@ -6,7 +6,33 @@ import os
os.environ["CC"] = "gcc-5"
os.environ["CXX"] = "g++-5"
ext = Extension(name='prrt', sources=["src/cython/**/*.pyx"])
ext_modules = cythonize(ext, gdb_debug=True)
setup(
name='prrt',
version='0.0.12',
description='Predictably Reliable Real-time Transport',
long_description='Predictably Reliable Real-time Transport Protocol',
url='https://git.nt.uni-saarland.de/LARN/PRRT',
author='Andreas Schmidt',
author_email='schmidt@nt.uni-saarland.de',
license='MIT',
classifiers=[
# 3 - Alpha // 4 - Beta // 5 - Production/Stable
'Development Status :: 3 - Alpha',
# Audience and Topic
'Intended Audience :: Developers',
'Topic :: Communications'
# Supported Python Versions
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.2',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4'
],
install_requires=["cython==0.25.2"],
keywords='prrt protocol',
include_dirs=["./src"],
ext_modules = cythonize("src/cython/**/*.pyx", gdb_debug=True)
)
\ No newline at end of file
ext_modules=ext_modules
)
!*.cmake
gtest-1.8.0/CTestTestfile.cmake
gtest-1.8.0/cmake_install.cmake
gtest-1.8.0/googlemock/CTestTestfile.cmake
gtest-1.8.0/googlemock/cmake_install.cmake
gtest-1.8.0/googlemock/gtest/
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment