2018-02-15 21:01:09 +00:00
|
|
|
# This script sets up a Continuous Reproducibility system for GNSS-SDR at GitLab
|
|
|
|
#
|
|
|
|
# Useful links:
|
|
|
|
# Website: http://gnss-sdr.org
|
|
|
|
# Upstream repository: https://github.com/gnss-sdr/gnss-sdr.git
|
|
|
|
# Dockerfile at https://github.com/carlesfernandez/docker-gnsssdr
|
|
|
|
# Docker cloud image: carlesfernandez/docker-gnsssdr
|
|
|
|
#
|
|
|
|
# In order to use this system and be able to make changes, you will need:
|
|
|
|
# - A GitHub account https://github.com
|
|
|
|
# - A GitLab account https://gitlab.com
|
|
|
|
# - A Docker Hub account https://hub.docker.com
|
|
|
|
# - A repository at Docker Hub.
|
|
|
|
#
|
|
|
|
# In order to use this system, please fork at GitHub the upstream
|
|
|
|
# repository; import that forked repo at GitLab; then add, commit and push to
|
|
|
|
# your GitLab repo this .gitlab-ci.yml file; and finally go to your project page
|
|
|
|
# at GitLab and set up the following secret variables. In the left panel:
|
|
|
|
# Settings > CI / CD > Secret variables
|
|
|
|
#
|
|
|
|
# CI_REGISTRY_USER <- Leave it blank
|
|
|
|
# CI_REGISTRY_PASWORD <- Leave it blank
|
|
|
|
# DOCKER_HUB_USER
|
|
|
|
# DOCKER_HUB_REPO
|
|
|
|
# DOCKER_HUB_PASSWORD
|
|
|
|
#
|
|
|
|
# For instance, my settings are:
|
|
|
|
# CI_REGISTRY_USER = carlesfernandez
|
|
|
|
# CI_REGISTRY_PASWORD = ********************
|
|
|
|
# DOCKER_HUB_USER = carlesfernandez
|
|
|
|
# DOCKER_HUB_REPO = docker-gnsssdr
|
|
|
|
# DOCKER_HUB_PASSWORD = ********************
|
|
|
|
#
|
|
|
|
# If you want to make changes in the source code, please branch-off from the
|
|
|
|
# 'next' branch of your forked repository and, if needed, add new jobs in this
|
2018-02-16 12:19:30 +00:00
|
|
|
# file at the 'deploy' and 'experiment' stages.
|
2018-02-15 21:01:09 +00:00
|
|
|
#
|
|
|
|
# Feel free to delete the docker-gnsssdr and docker-pybombs-gnsssdr jobs,
|
|
|
|
# they are for developers' team only. Actually, this is their CI/CD system.
|
|
|
|
#
|
|
|
|
# More info about how to contribute to GNSS-SDR at
|
|
|
|
# https://github.com/gnss-sdr/gnss-sdr/blob/master/CONTRIBUTING.md
|
|
|
|
#
|
|
|
|
# (C) Carles Fernandez-Prades, 2018 cfernandez@cttc.cat
|
|
|
|
|
|
|
|
|
2018-02-16 12:19:30 +00:00
|
|
|
# This is performed before the scripts in the stages step
|
2018-02-09 15:50:47 +00:00
|
|
|
before_script:
|
|
|
|
- source /etc/profile
|
|
|
|
|
2018-02-15 21:01:09 +00:00
|
|
|
|
2018-02-09 15:50:47 +00:00
|
|
|
# Defines stages which are to be executed
|
|
|
|
stages:
|
|
|
|
- build
|
|
|
|
- test
|
2018-02-10 01:54:17 +00:00
|
|
|
- deploy
|
2018-02-15 10:33:01 +00:00
|
|
|
- experiment
|
2018-02-09 15:50:47 +00:00
|
|
|
|
2018-02-15 21:01:09 +00:00
|
|
|
|
2018-02-09 15:50:47 +00:00
|
|
|
# Stage "build"
|
2018-02-11 12:34:46 +00:00
|
|
|
debian8.10:
|
2018-02-09 18:34:15 +00:00
|
|
|
image: debian:8.10-slim
|
|
|
|
stage: build
|
|
|
|
script:
|
|
|
|
- apt-get update
|
2018-02-09 18:37:02 +00:00
|
|
|
- apt-get install -y --no-install-recommends build-essential cmake git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev
|
2018-02-09 18:34:15 +00:00
|
|
|
- cd build
|
|
|
|
- cmake ..
|
|
|
|
- make -j2
|
|
|
|
- make install
|
|
|
|
|
2018-02-09 15:50:47 +00:00
|
|
|
|
2018-02-11 12:51:32 +00:00
|
|
|
debian9.3:
|
2018-02-09 18:13:51 +00:00
|
|
|
image: debian:9.3-slim
|
|
|
|
stage: build
|
2018-02-09 18:34:15 +00:00
|
|
|
script:
|
|
|
|
- apt-get update
|
|
|
|
- apt-get install -y --no-install-recommends build-essential cmake git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest
|
|
|
|
- cd build
|
|
|
|
- cmake ..
|
|
|
|
- make -j2
|
|
|
|
- make install
|
|
|
|
|
2018-02-09 21:35:38 +00:00
|
|
|
|
2018-02-11 12:51:32 +00:00
|
|
|
debian9.3-i386:
|
2018-02-09 21:17:08 +00:00
|
|
|
image: i386/debian:9.3-slim
|
|
|
|
stage: build
|
|
|
|
script:
|
|
|
|
- apt-get update
|
|
|
|
- apt-get install -y --no-install-recommends build-essential cmake git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest
|
|
|
|
- cd build
|
|
|
|
- cmake ..
|
|
|
|
- make -j2
|
|
|
|
- make install
|
|
|
|
|
|
|
|
|
2018-02-11 12:51:32 +00:00
|
|
|
debian10:
|
2018-02-09 18:44:45 +00:00
|
|
|
image: debian:buster-slim
|
|
|
|
stage: build
|
|
|
|
script:
|
|
|
|
- apt-get update
|
|
|
|
- apt-get install -y --no-install-recommends build-essential cmake git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest
|
|
|
|
- cd build
|
|
|
|
- cmake ..
|
|
|
|
- make -j2
|
|
|
|
- make install
|
|
|
|
|
|
|
|
|
2018-02-11 12:51:32 +00:00
|
|
|
ubuntu16.04:
|
2018-02-09 18:34:15 +00:00
|
|
|
image: ubuntu:xenial
|
|
|
|
stage: build
|
2018-02-09 18:13:51 +00:00
|
|
|
script:
|
|
|
|
- apt-get update
|
2018-02-09 18:44:45 +00:00
|
|
|
- apt-get install -y --no-install-recommends build-essential cmake git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev libgtest-dev
|
2018-02-09 18:13:51 +00:00
|
|
|
- cd build
|
|
|
|
- cmake ..
|
|
|
|
- make -j2
|
|
|
|
- make install
|
|
|
|
|
2018-02-09 18:34:15 +00:00
|
|
|
|
2018-02-11 12:51:32 +00:00
|
|
|
ubuntu18.04:
|
2018-02-09 18:34:15 +00:00
|
|
|
image: ubuntu:bionic
|
|
|
|
stage: build
|
|
|
|
script:
|
|
|
|
- apt-get update
|
|
|
|
- apt-get install -y --no-install-recommends build-essential cmake git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest
|
|
|
|
- cd build
|
|
|
|
- cmake ..
|
|
|
|
- make -j2
|
|
|
|
- make install
|
|
|
|
|
2018-02-09 23:39:25 +00:00
|
|
|
|
2018-02-09 15:50:47 +00:00
|
|
|
# Stage "test"
|
2018-02-14 18:46:28 +00:00
|
|
|
run-tests:
|
2018-02-09 19:39:39 +00:00
|
|
|
image: debian:9.3-slim
|
2018-02-09 15:50:47 +00:00
|
|
|
stage: test
|
|
|
|
script:
|
|
|
|
- apt-get update
|
2018-02-09 19:39:39 +00:00
|
|
|
- apt-get install -y --no-install-recommends build-essential cmake git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest
|
2018-02-09 15:50:47 +00:00
|
|
|
- mkdir build-test
|
2018-02-10 13:41:11 +00:00
|
|
|
- mkdir build64
|
2018-02-09 15:50:47 +00:00
|
|
|
- cd build-test
|
|
|
|
- cmake ..
|
|
|
|
- make -j2
|
|
|
|
- make check
|
|
|
|
- ../install/run_tests --gtest_output=xml
|
2018-02-10 13:41:11 +00:00
|
|
|
- mv *.xml ../build64/
|
2018-02-09 15:50:47 +00:00
|
|
|
- cd ..
|
|
|
|
- rm -rf build-test
|
|
|
|
|
|
|
|
artifacts:
|
|
|
|
paths:
|
2018-02-10 13:41:11 +00:00
|
|
|
- build64/*.xml
|
|
|
|
|
|
|
|
|
2018-02-11 12:51:32 +00:00
|
|
|
run-tests-i386:
|
2018-02-10 13:41:11 +00:00
|
|
|
image: i386/debian:9.3-slim
|
|
|
|
stage: test
|
|
|
|
script:
|
|
|
|
- apt-get update
|
|
|
|
- apt-get install -y --no-install-recommends build-essential cmake git libboost-dev libboost-date-time-dev libboost-system-dev libboost-filesystem-dev libboost-thread-dev libboost-chrono-dev libboost-serialization-dev liblog4cpp5-dev gnuradio-dev libblas-dev liblapack-dev libarmadillo-dev libgflags-dev libgoogle-glog-dev libgnutls-openssl-dev python-mako python-six libmatio-dev googletest
|
|
|
|
- mkdir build-test
|
|
|
|
- mkdir build32
|
|
|
|
- cd build-test
|
2018-02-10 23:48:09 +00:00
|
|
|
- cmake -DENABLE_PACKAGING=ON ..
|
2018-02-10 13:41:11 +00:00
|
|
|
- make -j2
|
|
|
|
- make check
|
|
|
|
- ../install/run_tests --gtest_output=xml
|
|
|
|
- mv *.xml ../build32/
|
|
|
|
- cd ..
|
|
|
|
- rm -rf build-test
|
|
|
|
|
|
|
|
artifacts:
|
|
|
|
paths:
|
|
|
|
- build32/*.xml
|
2018-02-10 01:54:17 +00:00
|
|
|
|
|
|
|
|
|
|
|
# Stage "deploy"
|
|
|
|
docker-gnsssdr:
|
|
|
|
image: docker:latest
|
|
|
|
stage: deploy
|
|
|
|
services:
|
|
|
|
- docker:dind
|
2018-02-14 18:46:28 +00:00
|
|
|
script:
|
2018-02-15 10:07:35 +00:00
|
|
|
- wget https://raw.githubusercontent.com/carlesfernandez/docker-gnsssdr/master/Dockerfile
|
2018-02-10 10:16:05 +00:00
|
|
|
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD"
|
2018-02-10 01:54:17 +00:00
|
|
|
- mkdir docker-build
|
|
|
|
- cd docker-build
|
2018-02-15 07:33:48 +00:00
|
|
|
- cp ../Dockerfile .
|
2018-02-10 01:54:17 +00:00
|
|
|
- docker build -t carlesfernandez/docker-gnsssdr .
|
|
|
|
- docker push carlesfernandez/docker-gnsssdr
|
2018-02-15 10:07:35 +00:00
|
|
|
only:
|
|
|
|
- next
|
|
|
|
allow_failure: true
|
2018-02-14 11:04:18 +00:00
|
|
|
|
|
|
|
|
2018-02-15 21:01:09 +00:00
|
|
|
docker-pybombs-gnsssdr:
|
2018-02-15 10:31:48 +00:00
|
|
|
image: docker:latest
|
|
|
|
stage: deploy
|
|
|
|
services:
|
|
|
|
- docker:dind
|
|
|
|
script:
|
2018-02-15 21:01:09 +00:00
|
|
|
- wget https://raw.githubusercontent.com/carlesfernandez/docker-pybombs-gnsssdr/master/Dockerfile
|
2018-02-15 10:31:48 +00:00
|
|
|
- docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD"
|
|
|
|
- mkdir docker-build
|
|
|
|
- cd docker-build
|
|
|
|
- cp ../Dockerfile .
|
2018-02-15 21:01:09 +00:00
|
|
|
- docker build -t carlesfernandez/docker-pybombs-gnsssdr .
|
|
|
|
- docker push carlesfernandez/docker-pybombs-gnsssdr
|
|
|
|
only:
|
|
|
|
- next
|
|
|
|
allow_failure: true
|
|
|
|
|
|
|
|
|
|
|
|
docker-access18:
|
|
|
|
image: docker:latest
|
2018-02-16 12:19:30 +00:00
|
|
|
stage: build
|
2018-02-15 21:01:09 +00:00
|
|
|
services:
|
|
|
|
- docker:dind
|
|
|
|
script:
|
|
|
|
- mkdir docker-build
|
|
|
|
- cd docker-build
|
2018-02-16 12:19:30 +00:00
|
|
|
- echo -e "FROM phusion/baseimage:0.10.0\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y build-essential cmake libarmadillo-dev libblas-dev libboost-chrono-dev libboost-dev libboost-date-time-dev libboost-filesystem-dev libboost-serialization-dev libboost-system-dev libboost-thread-dev libgflags-dev libgoogle-glog-dev libgtest-dev libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev libuhd-dev git gnuradio-dev gr-osmosdr python-mako python-six libxml2-dev bison flex && rm -rf /var/lib/apt/lists/*\nRUN git clone $CI_REPOSITORY_URL\nRUN cd gnss-sdr/build\nRUN git checkout $CI_COMMIT_SHA\nRUN cmake -DENABLE_PACKAGING=ON -DENABLE_INSTALL_TESTS=ON .. && make && make install\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN apt-get clean && rm -rf /tmp/* /var/tmp/*\nRUN rm -rf /home/src\nWORKDIR /home\nCMD [\"bash\"]" > Dockerfile
|
2018-02-16 13:10:04 +00:00
|
|
|
- docker login -u "$DOCKER_HUB_USER" -p "$DOCKER_HUB_PASSWORD"
|
2018-02-15 21:01:09 +00:00
|
|
|
- docker build -t $DOCKER_HUB_USER/$DOCKER_HUB_REPO .
|
|
|
|
- docker tag $DOCKER_HUB_USER/$DOCKER_HUB_REPO:latest $DOCKER_HUB_USER/$DOCKER_HUB_REPO:access18
|
|
|
|
- docker push $DOCKER_HUB_USER/$DOCKER_HUB_REPO:access18
|
2018-02-15 10:31:48 +00:00
|
|
|
|
|
|
|
|
2018-02-14 11:04:18 +00:00
|
|
|
# Stage "experiment"
|
2018-02-15 12:04:20 +00:00
|
|
|
run-access18:
|
2018-02-15 21:01:09 +00:00
|
|
|
image: $DOCKER_HUB_USER/$DOCKER_HUB_REPO:access18
|
2018-02-16 09:45:41 +00:00
|
|
|
stage: experiment
|
2018-02-14 11:04:18 +00:00
|
|
|
script:
|
|
|
|
- apt-get update
|
|
|
|
# Grab analysis and representation tools
|
2018-02-15 10:07:35 +00:00
|
|
|
- apt-get install -y texlive-latex-base texlive-fonts-recommended texlive-latex-extra epstool transfig octave
|
2018-02-14 11:04:18 +00:00
|
|
|
# Grab the data set
|
2018-02-14 12:08:38 +00:00
|
|
|
- apt-get install -y curl
|
2018-02-14 11:04:18 +00:00
|
|
|
- cd data
|
2018-02-14 13:15:20 +00:00
|
|
|
- curl https://zenodo.org/record/1172670/files/L2_signal_samples.tar.xz --output L2_signal_samples.tar.xz
|
|
|
|
- tar xvfJ L2_signal_samples.tar.xz
|
2018-02-15 21:01:09 +00:00
|
|
|
- echo "2090ad3dfb3f461314252a1e6243d714 L2_signal_samples.tar.xz" > data.md5
|
2018-02-14 11:04:18 +00:00
|
|
|
- md5sum -c data.md5
|
2018-02-14 13:54:54 +00:00
|
|
|
- cd ..
|
2018-02-14 14:34:48 +00:00
|
|
|
# Execute the experiment (example)
|
2018-02-16 09:45:41 +00:00
|
|
|
- run_tests --gtest_filter==Multi*
|
|
|
|
- echo " x = 0:0.01:3; hf = figure (\"visible\", \"off\"); plot (x, erf (x), \"linewidth\", 2); hold on; plot (x, x, \"r\", \"linewidth\", 2); axis ([0, 3, 0, 1]); text (0.65, 0.6175, ['\leftarrow x = \pi \int_{0}^{x}e^{-t^2} dt = 0.6175']); xlabel (\"x\"); ylabel (\"erf (x)\"); title (\"erf (x) with text annotation\"); hh=findall(hf,\"-property\",\"FontName\"); set(hh,\"FontName\",\"Times\"); hh2=findall(hf,\"-property\",\"interpreter\"); set(hh2, \"interpreter\", \"tex\"); hh3=findall(hf,\"-property\",\"FontSize\"); set(hh3, \"FontSize\", 22); print (hf, \"results.eps\", \"-depsc\"); " > my_test_file.m
|
2018-02-14 15:00:34 +00:00
|
|
|
- octave --no-gui my_test_file.m
|
2018-02-14 16:27:05 +00:00
|
|
|
- epspdf results.eps results.pdf
|
2018-02-15 12:04:20 +00:00
|
|
|
- mkdir access18
|
|
|
|
- cp results.pdf access18/
|
2018-02-14 14:34:48 +00:00
|
|
|
|
2018-02-14 11:04:18 +00:00
|
|
|
artifacts:
|
|
|
|
paths:
|
2018-02-15 12:04:20 +00:00
|
|
|
- access18/*.pdf
|