diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000000000000000000000000000000000000..17176a0f783bff0021d2216ddbb74adf4fec48a9 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,13 @@ +image: vispaweb/pxl-testing + +stages: + - test + +test: + stage: test + script: + - echo "Hello, world!" | tee -a output.txt + artifacts: + paths: + - output.txt + name: "${CI_BUILD_NAME}_${CI_BUILD_REF_NAME}" diff --git a/docker/testing/Dockerfile b/docker/testing/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..49567e484ecd60a1ecea035ebc919063ee288627 --- /dev/null +++ b/docker/testing/Dockerfile @@ -0,0 +1,32 @@ +FROM debian:jessie + +WORKDIR /root + +# image config +LABEL name="pxl-testing" +LABEL version="0.1" + +# copy files +COPY test_pxl.sh test_pxl.sh + +# basic environment variables +ENV PATH /usr/local/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin +ENV LD_LIBRARY_PATH=/usr/local/lib +ENV LIBPATH /usr/local/lib +ENV PYTHONPATH /usr/local/lib:/usr/local/lib64/python2.7/site-packages +ENV PKG_CONFIG_PATH /usr/local/lib/pkgconfig +ENV CMAKE_MODULE_PATH /usr/local/etc/cmake +ENV MANPATH /usr/local/man + +# setup software +RUN apt-get -y update; apt-get clean +RUN apt-get -y install build-essential git cmake swig zip gzip zlib1g-dev nano wget; apt-get clean +RUN wget https://www.python.org/ftp/python/2.7.13/Python-2.7.13.tgz && \ + tar -xzf Python-2.7.13.tgz && \ + rm Python-2.7.13.tgz && \ + cd Python-2.7.13 && \ + ./configure --enable-shared && \ + make && \ + make install && \ + cd .. && \ + rm -rf Python-2.7.13 diff --git a/docker/testing/test_pxl.sh b/docker/testing/test_pxl.sh new file mode 100755 index 0000000000000000000000000000000000000000..f60fbc444d042091ed00140c79f8953bab095d69 --- /dev/null +++ b/docker/testing/test_pxl.sh @@ -0,0 +1,22 @@ +#!/usr/bin/env bash + +action() { + + local origin="$( /bin/pwd )" + + local branch="master" + [ ! -z "$1" ] && branch="$1" + + git clone https://git.rwth-aachen.de/3pia/pxl.git + cd pxl + git checkout "$branch" + mkdir build + cd build + cmake .. ${@:2} + make + make test + + cd "$origin" + +} +action "$@"