1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2024-12-15 12:40:35 +00:00

Put experiment name in a variable, so the system can be extended easily to more experiments

This commit is contained in:
Carles Fernandez 2018-02-15 12:56:39 +01:00
parent 0b5bbce2ea
commit d3824154dc

View File

@ -2,6 +2,9 @@
before_script: before_script:
- source /etc/profile - source /etc/profile
variables:
EXPERIMENT_NAME: "ieee-access18"
# Defines stages which are to be executed # Defines stages which are to be executed
stages: stages:
- build - build
@ -146,7 +149,7 @@ docker-gnsssdr:
allow_failure: true allow_failure: true
docker-experiment: docker-$EXPERIMENT_NAME:
image: docker:latest image: docker:latest
stage: deploy stage: deploy
services: services:
@ -158,13 +161,13 @@ docker-experiment:
- cd docker-build - cd docker-build
- cp ../Dockerfile . - cp ../Dockerfile .
- docker build -t carlesfernandez/docker-gnsssdr . - docker build -t carlesfernandez/docker-gnsssdr .
- docker tag carlesfernandez/docker-gnsssdr:latest carlesfernandez/docker-gnsssdr:test - docker tag carlesfernandez/docker-gnsssdr:latest carlesfernandez/docker-gnsssdr:$EXPERIMENT_NAME
- docker push carlesfernandez/docker-gnsssdr:test - docker push carlesfernandez/docker-gnsssdr:$EXPERIMENT_NAME
# Stage "experiment" # Stage "experiment"
run-experiment: run-$EXPERIMENT_NAME:
image: carlesfernandez/docker-gnsssdr:test image: carlesfernandez/docker-gnsssdr:$EXPERIMENT_NAME
stage: experiment stage: experiment
script: script:
- apt-get update - apt-get update
@ -182,9 +185,9 @@ run-experiment:
- 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 - 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 - octave --no-gui my_test_file.m
- epspdf results.eps results.pdf - epspdf results.eps results.pdf
- mkdir results - mkdir $EXPERIMENT_NAME
- cp results.pdf results/ - cp results.pdf $EXPERIMENT_NAME/
artifacts: artifacts:
paths: paths:
- results/*.pdf - $EXPERIMENT_NAME/*.pdf