Newer
Older
- dist
- test
- gen_cache
- update_cache
- deploy
# build the docker image we will use in all the jobs, with all
# dependencies pre-installed/configured.
gwinc/base:
stage: dist
variables:
IMAGE_TAG: $CI_REGISTRY_IMAGE/$CI_JOB_NAME:$CI_COMMIT_REF_NAME
GIT_STRATEGY: none
script:
- docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
- |
cat <<EOF > Dockerfile
FROM igwn/base:buster
RUN apt-get update -qq
RUN apt-get -y install --no-install-recommends git python3 python3-yaml python3-scipy python3-matplotlib python3-ipython lalsimulation-python3 python3-pypdf2 python3-h5py
RUN git clone https://gitlab-ci-token:ci_token@git.ligo.org/gwinc/inspiral_range.git
EOF
- docker build -t $IMAGE_TAG .
- docker push $IMAGE_TAG
# run the tests and generate the test report on failure
image: $CI_REGISTRY_IMAGE/gwinc/base:$CI_COMMIT_REF_NAME
- rm -f gwinc_test_report.pdf
- export MPLBACKEND=agg
- python3 -m gwinc.test -r gwinc_test_report.pdf
artifacts:
when: on_failure
paths:
- gwinc_test_report.pdf
expose_as: 'GWINC test failure report PDF'
# create plots for the canonical IFOs
image: $CI_REGISTRY_IMAGE/gwinc/base:$CI_COMMIT_REF_NAME
- export PYTHONPATH=/inspiral_range
- for ifo in $(python3 -c "import gwinc; print(' '.join(gwinc.IFOS))"); do
- python3 -m gwinc $ifo -s ifo/$ifo.png
- python3 -m gwinc $ifo -s ifo/$ifo.h5
- python3 -m gwinc.ifo -s ifo/all_compare.png
# generate the html doc web pages
image: $CI_REGISTRY_IMAGE/gwinc/base:$CI_COMMIT_REF_NAME
- apt-get install -y -qq python3-sphinx-rtd-theme
- cd docs
- make html
- cd ..
- mv ./build/sphinx/html public
artifacts:
when: always
paths:
- public
# the "pages" job has special meaning, as it's "public" artifact
# becomes the directory served through gitlab static pages
needs:
- job: ifo
artifacts: true
- job: html
artifacts: true
image: $CI_REGISTRY_IMAGE/gwinc/base:$CI_COMMIT_REF_NAME