# Is performed before the scripts in the stages step before_script: - source /etc/profile # Defines stages which are to be executed stages: - build - test - deploy - experiment # Stage "build" debian8.10: image: debian:8.10-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 libgtest-dev - cd build - cmake .. - make -j2 - make install debian9.3: image: 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 debian9.3-i386: 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 debian10: 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 ubuntu16.04: image: ubuntu:xenial 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 libgtest-dev - cd build - cmake .. - make -j2 - make install ubuntu18.04: 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 # Stage "test" run-tests: image: 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 build64 - cd build-test - cmake .. - make -j2 - make check - ../install/run_tests --gtest_output=xml - mv *.xml ../build64/ - cd .. - rm -rf build-test artifacts: paths: - build64/*.xml run-tests-i386: 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 - cmake -DENABLE_PACKAGING=ON .. - make -j2 - make check - ../install/run_tests --gtest_output=xml - mv *.xml ../build32/ - cd .. - rm -rf build-test artifacts: paths: - build32/*.xml # Stage "deploy" docker-gnsssdr: image: docker:latest stage: deploy services: - docker:dind script: - wget https://raw.githubusercontent.com/carlesfernandez/docker-gnsssdr/master/Dockerfile - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" - mkdir docker-build - cd docker-build - cp ../Dockerfile . - docker build -t carlesfernandez/docker-gnsssdr . - docker push carlesfernandez/docker-gnsssdr only: - next allow_failure: true docker-experiment: image: docker:latest stage: deploy services: - docker:dind script: - wget https://raw.githubusercontent.com/carlesfernandez/docker-gnsssdr/master/Dockerfile - docker login -u "$CI_REGISTRY_USER" -p "$CI_REGISTRY_PASSWORD" - mkdir docker-build - cd docker-build - cp ../Dockerfile . - docker build -t carlesfernandez/docker-gnsssdr . - docker tag carlesfernandez/docker-gnsssdr:latest carlesfernandez/docker-gnsssdr:test - docker push carlesfernandez/docker-gnsssdr:test # Stage "experiment" run-experiment: image: carlesfernandez/docker-gnsssdr:test stage: experiment script: - apt-get update # Grab analysis and representation tools - apt-get install -y texlive-latex-base texlive-fonts-recommended texlive-latex-extra epstool transfig octave # Grab the data set - apt-get install -y curl - cd data - 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 - md5sum L2_signal_samples.dat > data.md5 - md5sum -c data.md5 - cd .. # Execute the experiment (example) - echo " x = 0:0.01:3; hf = figure (\"visible\", \"off\"); plot (x, erf (x)); hold on; plot (x, x, \"r\"); axis ([0, 3, 0, 1]); text (0.65, 0.6175, ['$ \leftarrow x = \frac{2}{\sqrt{\pi}} \int_{0}^{x}e^{-t^2} dt = 0.6175 $']); xlabel (\"x\"); ylabel (\"erf (x)\"); title (\"erf (x) with text annotation\"); print (hf, \"results.eps\", \"-depsc\"); " > my_test_file.m - octave --no-gui my_test_file.m - epspdf results.eps results.pdf - mkdir results - cp results.pdf results/ artifacts: paths: - results/*.pdf