.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 [ -z "$(ls sprng5/)" ]; then
niklas.baumgarten's avatar
niklas.baumgarten committed
14 15 16 17 18
    -   tar xjf sprng5.tar.bz2
    -   cd sprng5
    -   ./configure --with-mpi=yes --with-fortran=no
    -   make -j
    -   cd ..
niklas.baumgarten's avatar
niklas.baumgarten committed
19 20
    - else
    -   echo "Using sprng5 from cache"
niklas.baumgarten's avatar
niklas.baumgarten committed
21 22
    - fi

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

  variables:
    GIT_SUBMODULE_STRATEGY: recursive

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

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

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

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

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