From d6d5310237e1b94b96763945e35dc7914d5c0493 Mon Sep 17 00:00:00 2001 From: Marcel Rieger Date: Fri, 14 Apr 2017 19:37:03 +0200 Subject: [PATCH 1/6] [ci] Add initial ci script. --- .gitlab-ci.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 00000000..b725e2cc --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,11 @@ +stages: + - test + +test: + stage: test + script: + - echo "Hello, world!" | tee -a output.txt + artifacts: + paths: + - otuput.txt + name: "${CI_BUILD_NAME}_${CI_BUILD_REF_NAME}" -- GitLab From 7a1f769b41da8bc3f981fe217139e26dcc2234b7 Mon Sep 17 00:00:00 2001 From: Marcel Rieger Date: Tue, 18 Apr 2017 10:14:13 +0200 Subject: [PATCH 2/6] [ci] Add docker file for testing. --- docker/testing/Dockerfile | 19 +++++++++++++++++++ docker/testing/install_pxl.sh | 22 ++++++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 docker/testing/Dockerfile create mode 100755 docker/testing/install_pxl.sh diff --git a/docker/testing/Dockerfile b/docker/testing/Dockerfile new file mode 100644 index 00000000..e8c65ba6 --- /dev/null +++ b/docker/testing/Dockerfile @@ -0,0 +1,19 @@ +FROM debian:jessie + +WORKDIR /root + +# copy files +COPY install_pxl.sh install_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 python python-dev git cmake swig nano; apt-get clean diff --git a/docker/testing/install_pxl.sh b/docker/testing/install_pxl.sh new file mode 100755 index 00000000..174ad21f --- /dev/null +++ b/docker/testing/install_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 install + + cd "$origin" + +} +action "$@" -- GitLab From 9d4390f3933c7d3bb5ff0d0487a1dc325783ddf1 Mon Sep 17 00:00:00 2001 From: Marcel Rieger Date: Tue, 18 Apr 2017 10:48:13 +0200 Subject: [PATCH 3/6] Update docker file, build custom python. --- .gitlab-ci.yml | 2 ++ docker/testing/Dockerfile | 14 ++++++++++++-- docker/testing/{install_pxl.sh => test_pxl.sh} | 2 +- 3 files changed, 15 insertions(+), 3 deletions(-) rename docker/testing/{install_pxl.sh => test_pxl.sh} (95%) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b725e2cc..112ba908 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,3 +1,5 @@ +image: vispaweb/pxl-testing + stages: - test diff --git a/docker/testing/Dockerfile b/docker/testing/Dockerfile index e8c65ba6..67fa8d97 100644 --- a/docker/testing/Dockerfile +++ b/docker/testing/Dockerfile @@ -2,8 +2,12 @@ FROM debian:jessie WORKDIR /root +# image config +LABEL name="pxl-testing" +LABEL version="0.1" + # copy files -COPY install_pxl.sh install_pxl.sh +COPY test_pxl.sh test_pxl.sh # basic environment variables ENV PATH /usr/local/bin:/usr/local/sbin:/usr/sbin:/usr/bin:/sbin:/bin @@ -16,4 +20,10 @@ ENV MANPATH /usr/local/man # setup software RUN apt-get -y update; apt-get clean -RUN apt-get -y install build-essential python python-dev git cmake swig nano; 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 && \ + cd Python-2.7.13 && \ + ./configure --enable-shared && \ + make -j && \ + make install diff --git a/docker/testing/install_pxl.sh b/docker/testing/test_pxl.sh similarity index 95% rename from docker/testing/install_pxl.sh rename to docker/testing/test_pxl.sh index 174ad21f..f60fbc44 100755 --- a/docker/testing/install_pxl.sh +++ b/docker/testing/test_pxl.sh @@ -14,7 +14,7 @@ action() { cd build cmake .. ${@:2} make - make install + make test cd "$origin" -- GitLab From a913099ff8f0ec1192662d35fbd1c6fa7a1a438c Mon Sep 17 00:00:00 2001 From: Marcel Rieger Date: Tue, 18 Apr 2017 10:49:10 +0200 Subject: [PATCH 4/6] Fix compile options in docker file. --- docker/testing/Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/testing/Dockerfile b/docker/testing/Dockerfile index 67fa8d97..b59e70ee 100644 --- a/docker/testing/Dockerfile +++ b/docker/testing/Dockerfile @@ -25,5 +25,5 @@ RUN wget https://www.python.org/ftp/python/2.7.13/Python-2.7.13.tgz && \ tar -xzf Python-2.7.13.tgz && \ cd Python-2.7.13 && \ ./configure --enable-shared && \ - make -j && \ + make && \ make install -- GitLab From a6986a865963b16fd0797988460bd493afd97c26 Mon Sep 17 00:00:00 2001 From: Marcel Rieger Date: Tue, 18 Apr 2017 10:51:43 +0200 Subject: [PATCH 5/6] Cleanup python installation in docker file. --- docker/testing/Dockerfile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/docker/testing/Dockerfile b/docker/testing/Dockerfile index b59e70ee..49567e48 100644 --- a/docker/testing/Dockerfile +++ b/docker/testing/Dockerfile @@ -23,7 +23,10 @@ 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 + make install && \ + cd .. && \ + rm -rf Python-2.7.13 -- GitLab From 0f37391d0edce28fb54000b91c58c7342cf808b1 Mon Sep 17 00:00:00 2001 From: Marcel Rieger Date: Fri, 21 Apr 2017 18:10:52 +0200 Subject: [PATCH 6/6] Fix typo in gitlab-ci.yml. --- .gitlab-ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 112ba908..17176a0f 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -9,5 +9,5 @@ test: - echo "Hello, world!" | tee -a output.txt artifacts: paths: - - otuput.txt + - output.txt name: "${CI_BUILD_NAME}_${CI_BUILD_REF_NAME}" -- GitLab