Skip to content
Snippets Groups Projects
.gitlab-ci.yml 3.57 KiB
Newer Older

variables:
  DOCKER_DRIVER: overlay
  BRANCH: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
  COMMIT: $CI_REGISTRY_IMAGE:$CI_COMMIT_SHA
  NIGHTLY: $CI_REGISTRY_IMAGE:nightly
  TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_TAG
  GSTLAL_DIR: $CI_PROJECT_DIR/opt/gstlal

before_script:
    # Set up directory structure and copy over built-dependencies from container:
    - mkdir public
    - mkdir -p ${GSTLAL_DIR}
    - cp -r /opt/gstlal/* ${GSTLAL_DIR}/
    
    # Update apt info
    - apt update
    
    # Define GstLAL build parameters:
    - export PATH="${GSTLAL_DIR}/bin:/usr/lib/ccache:/opt/local/libexec/ccache:${PATH}"
    - export LD_LIBRARY_PATH="${GSTLAL_DIR}/lib:${GSTLAL_DIR}/lib64:${LD_LIBRARY_PATH}"
    - export LIBRARY_PATH="${GSTLAL_DIR}/lib:${GSTLAL_DIR}/lib64:${LIBRARY_PATH}"
    - export PKG_CONFIG_PATH="${GSTLAL_DIR}/lib/pkgconfig:${GSTLAL_DIR}/lib64/pkgconfig:${PKG_CONFIG_PATH}"
    - export GI_TYPELIB_PATH="${GSTLAL_DIR}/lib/girepository-1.0:${GSTLAL_DIR}/lib64/girepository-1.0:${GI_TYPELIB_PATH}"
    - export GST_PLUGIN_PATH="${GSTLAL_DIR}/lib/gstreamer-1.0:${GST_PLUGIN_PATH}"
    - export PYTHONPATH="${GSTLAL_DIR}/lib64/python2.7/site-packages:${GSTLAL_DIR}/lib/python2.7/site-packages:${PYTHONPATH}"
    - export CCACHE_DIR=${PWD}/ccache
    
    # Define build and linking parameters:
    - export CFLAGS="-O3 -fPIC -march=native -I${GSTLAL_DIR}/include"
    - export LDFLAGS="-L${GSTLAL_DIR}/lib -L${GSTLAL_DIR}/lib64 ${LDFLAGS}"
    - export GSTLAL_FIR_WHITEN=0
level0:gstlal:
  image: aepace/gstlal-dev:stretch
  stage: level0
  script:
    - cd gstlal
    - ./00init.sh
    - ./configure --prefix=${GSTLAL_DIR}
    - make
    - make install
  artifacts:
    expire_in: 3h
    paths:
      - ${GSTLAL_DIR}
      - gstlal
  only:
    - pushes
    
level1:gstlal-ugly:
  image: aepace/gstlal-dev:stretch
  stage: level1
  dependencies:
    - level0:gstlal
  script:
    - cd gstlal-ugly
    - ./00init.sh
    - ./configure --prefix=${GSTLAL_DIR}
    - make
    - make install
  artifacts:
    expire_in: 3h
    paths:
      - ${GSTLAL_DIR}
      - gstlal-ugly
  only:
    - pushes

level2:gstlal-calibration:
  image: aepace/gstlal-dev:stretch
  stage: level2
  dependencies:
    - level1:gstlal-ugly
  script:
    - cd gstlal-calibration
    - ./00init.sh
    - ./configure --prefix=${GSTLAL_DIR}
    - make
    - make install
  artifacts:
    expire_in: 3h
    paths:
      - ${GSTLAL_DIR}
      - gstlal-calibration
  only:
    - pushes

level2:gstlal-inspiral:
  image: aepace/gstlal-dev:stretch
  stage: level2
  dependencies:
    - level1:gstlal-ugly
  script:
    - cd gstlal-inspiral
    - ./00init.sh
    - ./configure --prefix=${GSTLAL_DIR}
    - make
    - make install
  artifacts:
    expire_in: 3h
    paths:
      - ${GSTLAL_DIR}
      - gstlal-inspiral
  only:
    - pushes
  
offline-test:
  image: aepace/gstlal-dev:stretch
  stage: offline-test
  dependencies:
    - level2:gstlal-inspiral
  script:
    - cd gstlal-inspiral/tests
    - make -f Makefile_offline_tutorial_test
  artifacts:
    expire_in: 3h
    paths:
      - gstlal-inspiral/tests
  only:
    - pushes
  allow_failure: true
  
  stage: nightly-pages
  script:
    - echo "Building Documentation"
    - export TMPDIR=tmp/
    - cd ..; cp -rf doc/_build/* public/
  dependencies:
    - level2:gstlal-inspiral
    - level2:gstlal-calibration
  artifacts:
    paths:
      - public
  only:
    - pushes
  except: