1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-11-06 01:56:25 +00:00
gnss-sdr/.gitlab-ci.yml

120 lines
4.8 KiB
YAML
Raw Normal View History

2019-03-07 07:56:10 +00:00
# This script sets up a Continuous Reproducibility system for GNSS-SDR at GitLab
#
# Useful links:
# Website: https://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
#
# DOCKER_HUB_USER
# DOCKER_HUB_REPO
# DOCKER_HUB_PASSWORD
#
# You will need either to protect your branch, or to leave those variables
# unproctected.
#
# For instance, my settings are:
# DOCKER_HUB_USER = carlesfernandez
# DOCKER_HUB_REPO = docker-gnsssdr
# DOCKER_HUB_PASSWORD = ********************
#
# If you want to make changes in the source code, branch-off from the 'next'
# branch of your forked repository and, if needed, add new jobs in this
# file at the 'deploy' and 'experiment' stages. Please do not use the next
# branch for your changes, always open a new branch from next and work there.
#
# 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
# This is performed before the scripts in the stages step
before_script:
- source /etc/profile
# Defines stages which are to be executed
stages:
- build
- test
# Stage "build"
crosscompile:
image: ubuntu:xenial
stage: build
tags:
- kepler
script:
- apt-get update
- apt-get install -y build-essential xz-utils curl gawk wget git-core diffstat unzip texinfo gcc-multilib chrpath socat cpio python python3 python3-pip python3-pexpect debianutils iputils-ping
2019-03-27 14:53:10 +00:00
- curl -k https://sites.cttc.es/gnss_files/SDK/Thud/oecore-x86_64-armv7ahf-neon-toolchain-nodistro.0.sh --output oecore-x86_64-armv7ahf-neon-toolchain-nodistro.0.sh
- echo "4f74d9ab0f076e59215be2d1cb674a52 oecore-x86_64-armv7ahf-neon-toolchain-nodistro.0.sh" > sdk.md5
2019-03-07 07:56:10 +00:00
- md5sum -c sdk.md5
- chmod +x ./oecore-x86_64-armv7ahf-neon-toolchain-nodistro.0.sh
- sh ./oecore-x86_64-armv7ahf-neon-toolchain-nodistro.0.sh -y
- . /usr/local/oecore-x86_64/environment-setup-armv7ahf-neon-oe-linux-gnueabi
- cd build
- cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/Toolchains/oe-sdk_cross.cmake -DENABLE_OSMOSDR=ON -DENABLE_UNIT_TESTING_EXTRA=ON -DENABLE_SYSTEM_TESTING_EXTRA=ON -DCMAKE_INSTALL_PREFIX=/usr -DENABLE_FMCOMMS2=ON -DENABLE_AD9361=ON -DENABLE_RAW_UDP=ON -DENABLE_INSTALL_TESTS=ON -DCMAKE_C_FLAGS_RELEASE="-s" -DCMAKE_CXX_FLAGS_RELEASE="-s" -DENABLE_PACKAGING=ON -DENABLE_FPGA=ON ..
- make -j
- mkdir local_install
- make install DESTDIR=./local_install
- rm ./local_install/usr/bin/front-end-cal
- rm ./local_install/usr/bin/ttff
- cd ..
- mkdir binaries
- mkdir binaries/bin
- mkdir binaries/share
- cp build/local_install/usr/bin/* binaries/bin/
- cp build/local_install/usr/share/gnss-sim/* binaries/share/
allow_failure: true
artifacts:
paths:
- binaries/*
# Stage "test"
run-tests-armhf:
2019-03-27 14:53:10 +00:00
image: carlesfernandez/gnsssdr-dev-arm32v7:thud
2019-03-07 07:56:10 +00:00
stage: test
tags:
- arm
when: manual
dependencies:
- crosscompile
script:
- cp binaries/bin/* /usr/bin/
- mkdir /usr/share/gnss-sim/
- cp -f binaries/share/* /usr/share/gnss-sim/
- export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/lib
- ldconfig
- volk_profile -v 8111
- volk_gnsssdr_profile
- position_test
- run_tests --gtest_filter=Matio*
- run_tests --gtest_filter=HybridObservablesTest* --PLL_bw_hz_start=25.0 --DLL_bw_hz_start=1.5 --PLL_narrow_bw_hz=10.0 --DLL_narrow_bw_hz=0.75 --disable_generator=1 --enable_external_signal_file=1 --signal_file=/captures/gitlab_test_signals/static/180417100529.A_L1E1_12500000Hz_ichar.dat --fs_gen_sps=12500000 --skip_samples=125000000 --external_signal_acquisition_threshold=4.0 --extend_correlation_symbols=5 --external_signal_acquisition_doppler_step_hz=10 --trk_test_implementation=GPS_L1_CA_DLL_PLL_Tracking --show_plots=0 --filename_rinex_obs=/captures/gitlab_test_signals/static/true_data_180417100529/rinex_obs/rinex-obs_V1_A1-static_vehicle.txt --skip_trk_transitory_s=30 --gtest_output=xml:test_results.xml
allow_failure: true