.gitlab-ci.yml 1.1 KB
Newer Older
niklas.baumgarten's avatar
niklas.baumgarten committed
1
stages:
niklas.baumgarten's avatar
niklas.baumgarten committed
2 3 4
  - build
  - test

niklas.baumgarten's avatar
niklas.baumgarten committed
5 6 7 8
cache:
  paths:
    - sprng5
    
niklas.baumgarten's avatar
niklas.baumgarten committed
9
before_script:
niklas.baumgarten's avatar
niklas.baumgarten committed
10 11 12 13 14
    - tar xjf sprng5.tar.bz2
    - cd sprng5
    - ./configure --with-mpi=yes --with-fortran=no
    - make -j

niklas.baumgarten's avatar
niklas.baumgarten committed
15
build-mlmc:
niklas.baumgarten's avatar
niklas.baumgarten committed
16 17 18 19 20 21 22 23 24 25
  stage: build

  variables:
    GIT_SUBMODULE_STRATEGY: recursive

  before_script:
    - module add foss
    - module add Anaconda3

  script:
niklas.baumgarten's avatar
niklas.baumgarten committed
26
    - if [ -z "$UPSTREAM_COMMIT" ]; then
niklas.baumgarten's avatar
niklas.baumgarten committed
27 28
    -   echo "Using referenced mpp commit"
    - else
niklas.baumgarten's avatar
niklas.baumgarten committed
29
    -   echo ${UPSTREAM_COMMIT}
niklas.baumgarten's avatar
niklas.baumgarten committed
30
    - fi
niklas.baumgarten's avatar
niklas.baumgarten committed
31 32 33
    - cd mpp
    - git fetch --all
    - git checkout $UPSTREAM_COMMIT
niklas.baumgarten's avatar
niklas.baumgarten committed
34
    - cd ..
35 36
    - mkdir build
    - cd build
niklas.baumgarten's avatar
niklas.baumgarten committed
37
    - cmake .. -DBUILD_MLMC_TESTS=OFF
niklas.baumgarten's avatar
niklas.baumgarten committed
38
    - make -j
niklas.baumgarten's avatar
niklas.baumgarten committed
39 40 41 42 43 44 45 46

  artifacts:
    paths:
      - build/mpp/src
      - build/mpp/LIB_PS
      - build/mpp/googletest
      - build/mlmc
      - sprng5
niklas.baumgarten's avatar
niklas.baumgarten committed
47
    expire_in: '1h'
niklas.baumgarten's avatar
niklas.baumgarten committed
48

niklas.baumgarten's avatar
niklas.baumgarten committed
49
test-mlmc:
50 51
  stage: test

niklas.baumgarten's avatar
niklas.baumgarten committed
52 53 54 55
  before_script:
    - module add foss
    - module add Anaconda3

56
  script:
niklas.baumgarten's avatar
niklas.baumgarten committed
57 58 59
    - cd build
    - cmake ..
    - make -j
60 61
    - cd tests
    - mpirun -n 4 TestMainProgram
62
    - mpirun -n 4 TestMultilevelPlotter
niklas.baumgarten's avatar
niklas.baumgarten committed
63
    - touch dummy_results.txt
niklas.baumgarten's avatar
niklas.baumgarten committed
64

niklas.baumgarten's avatar
niklas.baumgarten committed
65 66 67
  artifacts:
    paths:
      - build/dummy_results.txt