.gitlab-ci.yml 2.14 KB
Newer Older
1 2
image: scientificlinux/sl

3
before_script:
4 5 6
  - yum install --assumeyes epel-release  # needed for clang
  # NOTE: the el7 package for libzip-devel is too outdated and will therefore be installed by Sherpa-config
  - yum install --assumeyes clang gcc-c++ gcc-gfortran make automake libtool git texinfo wget zlib-devel sqlite-devel
7 8 9



10
.build_template: &build
11 12 13 14 15 16 17 18
  stage: build
  # make this manual job blocking (such that tests will only be started when
  # the build has been started manually and completed successfully)
  when: manual
  # accelerate git-clone by making it shallow
  variables:
    GIT_DEPTH: "3"

19 20 21
# default build with gcc
build:
  <<: *build
22 23
  script:
    - autoreconf -i
24 25 26
    - mkdir build
    - cd build
    - ../configure --prefix="$PWD/install" --with-libzip=install
27 28
    - make -j
    - make install
29 30 31 32 33 34
  # store what's required to run the tests
  artifacts:
    expire_in: 2 days
    paths:
      - build/install
      - Examples/CI/
35

36 37 38 39 40 41 42 43 44 45 46 47
# build with clang and -Werror
build-clang-strict:
  <<: *build
  script:
    - autoreconf -i
    - mkdir build-clang-strict
    - cd build-clang-strict
    # enable strict compilation
    - cxxflags="-Werror"
    - ../configure CC=clang CXX=clang++ CXXFLAGS="${cxxflags}" --prefix="$PWD/install" --with-libzip=install
    - make -j
    - make install
48 49
  # store what's required to run the tests
  artifacts:
50
    expire_in: 2 days
51
    paths:
52
      - build-clang-strict/install
53 54 55 56 57 58 59 60 61 62 63
      - Examples/CI/



# define test runs as single jobs; this is less dynamic then just cycling
# through all sub-directories of Examples/CI, but it makes sure that all test
# jobs will be run simultaneously; at least we use anchors and map merging to
# inherit parameters set in .test_template

.test_template: &test
  stage: test
64
  when: manual
65 66 67 68 69 70
  variables:
    GIT_STRATEGY: none  # we only need the artifacts from the build

test-LO_Z:
  <<: *test
  script:
71 72
    - mkdir test-LO_Z
    - cd test-LO_Z
73
    - ../build/install/bin/Sherpa -f ../Examples/CI/LO_Z/Sherpa.yaml
74 75 76 77 78 79

test-clang-strict-LO_Z:
  <<: *test
  script:
    - mkdir test-clang-strict-LO_Z
    - cd test-clang-strict-LO_Z
80
    - ../build-clang-strict/install/bin/Sherpa -f ../Examples/CI/LO_Z/Sherpa.yaml