From 7a443bf57a2cbd402d369e28dcd10eb2381895ee Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Tue, 18 Jun 2019 21:48:45 +0200 Subject: [PATCH] Faster tests --- .gitlab-ci.yml | 79 ++++++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 76 insertions(+), 3 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index e91e6e586..61deac16d 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -453,6 +453,21 @@ coverity-scan: allow_failure: true +docker-for-test: + image: docker:latest + stage: build + services: + - docker:dind + script: + - mkdir docker-build + - cd docker-build + - echo -e "FROM phusion/baseimage:0.11\nMAINTAINER carles.fernandez@cttc.es\nCMD [\"/sbin/my_init\"]\nWORKDIR /home/src\nRUN apt-get update && apt-get install -y --no-install-recommends build-essential cmake curl nano 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 libpugixml-dev libgflags-dev libgoogle-glog-dev googletest libgnutls-openssl-dev liblapack-dev liblog4cpp5-dev libmatio-dev git ca-certificates gnuradio-dev python-mako python-six libprotobuf-dev protobuf-compiler texlive-latex-base texlive-fonts-recommended texlive-font-utils texlive-pictures epstool fig2dev octave pstoedit gnuplot-x11 && rm -rf /var/lib/apt/lists/*\nRUN git clone https://gitlab.com/gnss-sdr/gnss-sdr && cd gnss-sdr/build && git checkout $CI_COMMIT_SHA && cmake -DENABLE_PACKAGING=ON -DENABLE_SYSTEM_TESTING_EXTRA=ON -DENABLE_INSTALL_TESTS=ON .. && NPROC=$(grep -c ^processor /proc/cpuinfo) && make -j$(($NPROC+1)) && make install && rm -rf /home/src\nWORKDIR /home\nRUN /usr/bin/volk_profile -v 8111\nRUN /usr/local/bin/volk_gnsssdr_profile\nRUN rm -rf /tmp/* /var/tmp/*\nCMD [\"bash\"]" > Dockerfile + - docker login -u "$DOCKER_HUB_USER" -p "$DOCKER_HUB_PASSWORD" + - docker build -t $DOCKER_HUB_USER/$DOCKER_HUB_REPO . + - docker tag $DOCKER_HUB_USER/$DOCKER_HUB_REPO:latest $DOCKER_HUB_USER/$DOCKER_HUB_REPO:testing + - git push $DOCKER_HUB_USER/$DOCKER_HUB_REPO:testing + + # Stage "test" run-tests-x86_64: image: debian:stretch-slim @@ -571,6 +586,7 @@ leo-observables-test-180417120737: position-test-180417100529: image: ubuntu:bionic stage: test + when: manual tags: - kepler script: @@ -600,8 +616,6 @@ position-test-180417100529: - mkdir ../position-test/L1L5 && rm PVT_*.* && mv *.ps ../position-test/L1L5 && [ -f GSDR* ] && mv GSDR* ../position-test/L1L5 - ../install/position_test --config_file_ptest=/captures/gitlab_test_signals/static/gnss-sdr_180417100529.A_E1E5.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/static/true_data_180417100529/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --dynamic_3D_velocity_RMSE=6 --plot_position_test --show_plots=0 - mkdir ../position-test/E1E5 && rm PVT_*.* && mv *.ps ../position-test/E1E5 && [ -f GSDR* ] && mv GSDR* ../position-test/E1E5 - - ../install/position_test --config_file_ptest=/captures/gitlab_test_signals/static/gnss-sdr_180417100529.A_L1E1L5E5.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/static/true_data_180417100529/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --dynamic_3D_velocity_RMSE=6 --plot_position_test --show_plots=0 - - mkdir ../position-test/L1E1L5E5 && rm PVT_*.* && mv *.ps ../position-test/L1E1L5E5 && [ -f GSDR* ] && mv GSDR* ../position-test/L1E1L5E5 - mv *.xml ../position-test/ - cd .. - rm -rf build-test @@ -615,7 +629,65 @@ position-test-180417100529: - position-test/L5E5/* - position-test/L1L5/* - position-test/E1E5/* - - position-test/L1E1L5E5/* + allow_failure: true + + +position-test-L1-180417100529: + image: $DOCKER_HUB_USER/$DOCKER_HUB_REPO:testing + stage: test + when: manual + tags: + - kepler + script: + - export DISPLAY=unknown + - volk_profile -v 8111 + - volk_gnsssdr_profile -v 2053 + - mkdir /test && mkdir /position_test && cd /test + - position_test --config_file_ptest=/captures/gitlab_test_signals/static/gnss-sdr_180417100529.A_L1.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/static/true_data_180417100529/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --plot_position_test --show_plots=0 + - mkdir /position-test/L1 && rm PVT_*.* && mv *.* /position-test/L1/ + - position_test --config_file_ptest=/captures/gitlab_test_signals/static/gnss-sdr_180417100529.A_E1.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/static/true_data_180417100529/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --plot_position_test --show_plots=0 + - mkdir /position-test/E1 && rm PVT_*.* && mv *.* /position-test/E1 + - ../install/position_test -config_file_ptest=/captures/gitlab_test_signals/static/gnss-sdr_180417100529.A_L1E1.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/static/true_data_180417100529/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --plot_position_test --show_plots=0 + - mkdir /position-test/L1E1 && rm PVT_*.* && mv *.* /position-test/L1E1/ + - ls -la /position-test/L1 + - ls -la /position-test/E1 + - ls -la /position-test/L1E1 + artifacts: + paths: + - /position-test/* + - /position-test/L1/* + - /position-test/E1/* + - /position-test/L1E1/* + allow_failure: true + + +position-test-L5-180417100529: + image: $DOCKER_HUB_USER/$DOCKER_HUB_REPO:testing + stage: test + when: manual + tags: + - kepler + script: + - export DISPLAY=unknown + - volk_profile -v 8111 + - volk_gnsssdr_profile -v 2053 + - mkdir /test && mkdir /position_test && cd /test + - position_test --config_file_ptest=/captures/gitlab_test_signals/static/gnss-sdr_180417100529.A_L5.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/static/true_data_180417100529/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --dynamic_3D_velocity_RMSE=6 --plot_position_test --show_plots=0 + - mkdir /position-test/L5 && rm PVT_*.* && mv *.* /position-test/L5/ + - position_test --config_file_ptest=/captures/gitlab_test_signals/static/gnss-sdr_180417100529.A_E5.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/static/true_data_180417100529/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --dynamic_3D_velocity_RMSE=6 --plot_position_test --show_plots=0 + - mkdir /position-test/E5 && rm PVT_*.* && mv *.* /position-test/E5 + - position_test --config_file_ptest=/captures/gitlab_test_signals/static/gnss-sdr_180417100529.A_L5E5.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/static/true_data_180417100529/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --dynamic_3D_velocity_RMSE=6 --plot_position_test --show_plots=0 + - mkdir /position-test/L5E5 && rm PVT_*.* && mv *.* /position-test/L5E5 + - position_test --config_file_ptest=/captures/gitlab_test_signals/static/gnss-sdr_180417100529.A_L1L5.conf --static_scenario=0 --use_ref_motion_file=1 --ref_motion_filename=/captures/gitlab_test_signals/static/true_data_180417100529/motion_V1.csv --pvt_solver_dump_filename=./PVT.dat --dynamic_3D_velocity_RMSE=6 --plot_position_test --show_plots=0 + - ls -la /position-test/L5 + - ls -la /position-test/E5 + - ls -la /position-test/L5E5 + artifacts: + paths: + - /position-test/* + - /position-test/L5/* + - /position-test/E5/* + - /position-test/L5E5/* allow_failure: true @@ -784,6 +856,7 @@ docker-access18: - docker login -u "$DOCKER_HUB_USER" -p "$DOCKER_HUB_PASSWORD" - 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 # Stage "experiment"