Skip to content
Snippets Groups Projects
.gitlab-ci.yml 1.83 KiB
Newer Older
  - unit_test
#  - integration_test
#
# PREPARE STAGE
#

prepare_RAServices:
  stage: prepare
  script:
    - docker build -t ci_raservices -f SubSystems/RAServices/Dockerfile .
  image: ci_raservices:latest
    - PACKAGE=RAServices
    - mkdir install
Auke Klazema's avatar
Auke Klazema committed
    - mkdir -p build/gnucxx11_opt
    - cd build/gnucxx11_opt
    - cmake -DBUILD_PACKAGES=$PACKAGE -DCASACORE_ROOT_DIR=/opt/casacore/ -DCASAREST_ROOT_DIR=/opt/casarest/ -DCMAKE_INSTALL_PREFIX=/opt/lofar -DUSE_LOG4CPLUS=false ../..
    - make DESTDIR=../../install install
    - cd ../../install/opt/lofar
Auke Klazema's avatar
Auke Klazema committed
    - tar --ignore-failed-read --exclude=include -czf ../../RAServices_$CI_COMMIT_SHORT_SHA.ztar *
  dependencies:
    - prepare_RAServices
Auke Klazema's avatar
Auke Klazema committed
      - build/gnucxx11_opt
      - install/*.ztar
# UNIT TEST STAGE
#
unit_test_RAServices:
  stage: unit_test
  image: ci_raservices:latest
  script:
    - PACKAGE=RAServices
    - echo "Testing $PACKAGE..."
    - cd build/gnucxx11_opt
    - SKIP_INTEGRATION_TESTS=true ctest
  dependencies:
    - build_RAServices
  artifacts:
    name: unit-test-report
    when: always
    paths:
      - build/gnucxx11_opt/Testing/Temporary/LastTest.log
# INTEGRATION TEST STAGE
# integration_test_RAServices:
#   stage: integration_test
#   image: ci_raservices:latest
#   services:
#     - rabbitmq:latest
#   variables:
#     LOFAR_DEFAULT_BROKER: "rabbitmq"
#   script:
#     - PACKAGE=RAServices
#     - echo "Testing $PACKAGE..."
#     - cd build/gnucxx11_opt
#     - SKIP_UNIT_TESTS=true ctest
#   dependencies:
#     - build_RAServices
#   artifacts:
#     name: integration-test-report
#     when: always
#     paths:
#       - build/gnucxx11_opt/Testing/Temporary/LastTest.log