.gitlab-ci.yml 1.12 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
    - module add foss
    - module add Anaconda3
niklas.baumgarten's avatar
niklas.baumgarten committed
12
    
niklas.baumgarten's avatar
niklas.baumgarten committed
13
    - if [ -d "sprng5" ]; then
niklas.baumgarten's avatar
niklas.baumgarten committed
14 15
    -   echo "Using sprng5 from cache"
    - else
niklas.baumgarten's avatar
niklas.baumgarten committed
16 17 18 19 20 21 22
    -   tar xjf sprng5.tar.bz2
    -   cd sprng5
    -   ./configure --with-mpi=yes --with-fortran=no
    -   make -j
    -   cd ..
    - fi

niklas.baumgarten's avatar
niklas.baumgarten committed
23

niklas.baumgarten's avatar
niklas.baumgarten committed
24
build-mlmc:
niklas.baumgarten's avatar
niklas.baumgarten committed
25 26 27 28 29 30
  stage: build

  variables:
    GIT_SUBMODULE_STRATEGY: recursive

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

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

niklas.baumgarten's avatar
niklas.baumgarten committed
53
test-mlmc:
54 55 56
  stage: test

  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