.gitlab-ci.yml 2.24 KB
Newer Older
Thomas Purcell's avatar
Thomas Purcell committed
1
image: registry.gitlab.com/sissopp_developers/sissopp
Thomas Purcell's avatar
Thomas Purcell committed
2
3
4

stages:
  - build
Thomas Purcell's avatar
Thomas Purcell committed
5
6
  - unit_test
  - bin_test
Thomas Purcell's avatar
Thomas Purcell committed
7

Thomas Purcell's avatar
Thomas Purcell committed
8
build-gnu:
Thomas Purcell's avatar
Thomas Purcell committed
9
10
  stage: build
  script:
11
    - /opt/anaconda/3/2021.05/bin/python -m venv sissopp_env
Thomas Purcell's avatar
Thomas Purcell committed
12
    - source sissopp_env/bin/activate
13
14
    - export LD_LIBRARY_PATH=/opt/anaconda/3/2021.05/lib/:/opt/anaconda/3/2021.05/lib/python3.8:$LD_LIBRARY_PATH
    - export PYTHONPATH=/opt/anaconda/3/2021.05/lib/python3.8/site-packages/:sissopp_env/lib/python3.8/site-packages/
Thomas Purcell's avatar
Thomas Purcell committed
15
16
    - mkdir build_gcc/
    - cd build_gcc/
Thomas Purcell's avatar
Thomas Purcell committed
17
    - cmake -C ../cmake/toolchains/gnu_param_py.cmake -DBUILD_TESTS=ON ../
Thomas Purcell's avatar
Thomas Purcell committed
18
19
    - make
    - make install
Thomas Purcell's avatar
Thomas Purcell committed
20
    - cd ../
Thomas Purcell's avatar
Thomas Purcell committed
21
22
23
24
  artifacts:
    when: always
    paths:
      - bin/sisso++
25
      - lib/boost/*
Thomas Purcell's avatar
Thomas Purcell committed
26
      - lib/gtest/*
27
      - lib/coin-or/*
Thomas Purcell's avatar
Thomas Purcell committed
28
      - lib/nlopt/*
29
      - lib/gtest/*
Thomas Purcell's avatar
Thomas Purcell committed
30
      - lib/fmt/*
Thomas Purcell's avatar
Thomas Purcell committed
31
32
      - lib/libsisso.so
      - sissopp_env/*
33
      - tests/googletest/sisso_test
Thomas Purcell's avatar
Thomas Purcell committed
34
35

test-gnu-py:
Thomas Purcell's avatar
Thomas Purcell committed
36
  stage: unit_test
Thomas Purcell's avatar
Thomas Purcell committed
37
38
39
  dependencies:
    - build-gnu
  script:
Thomas Purcell's avatar
Thomas Purcell committed
40
    - source sissopp_env/bin/activate
41
42
43
    - export LD_LIBRARY_PATH=/opt/anaconda/3/2021.05/lib/:/opt/anaconda/3/2021.05/lib/python3.8:$LD_LIBRARY_PATH
    - export PYTHONPATH=/opt/anaconda/3/2021.05/lib/python3.8/site-packages/:sissopp_env/lib/python3.8/site-packages/
    - /opt/anaconda/3/2021.05/bin/pytest tests/pytest
44
45
46
47
48
49

test-gnu-googletest:
  stage: unit_test
  dependencies:
    - build-gnu
  script:
Thomas Purcell's avatar
Thomas Purcell committed
50
    - source sissopp_env/bin/activate
Thomas Purcell's avatar
Thomas Purcell committed
51
    - tests/googletest/sisso_test
Thomas Purcell's avatar
Thomas Purcell committed
52

Thomas Purcell's avatar
Thomas Purcell committed
53
test-gnu-bin:
Thomas Purcell's avatar
Thomas Purcell committed
54
  stage: bin_test
Thomas Purcell's avatar
Thomas Purcell committed
55
56
57
  dependencies:
    - build-gnu
  script:
Thomas Purcell's avatar
Thomas Purcell committed
58
    - source sissopp_env/bin/activate
59
60
    - export LD_LIBRARY_PATH=/opt/anaconda/3/2021.05/lib/:/opt/anaconda/3/2021.05/lib/python3.8:`pwd`/lib/:$LD_LIBRARY_PATH
    - export PYTHONPATH=/opt/anaconda/3/2021.05/lib/python3.8/site-packages/:sissopp_env/lib/python3.8/site-packages/
Thomas Purcell's avatar
Thomas Purcell committed
61
    - ls lib
62
63
64
65
66
    - cd tests/exec_test/default/
    - mpiexec -n 1 ../../../bin/sisso++
    - python ../check_model.py
    - cd ../classification/
    - mpiexec -n 1 ../../../bin/sisso++
67
    - python check_model.py
Thomas Purcell's avatar
Thomas Purcell committed
68
    - cd ../gen_proj/
69
    - mpiexec -n 1 ../../../bin/sisso++
70
    - python ../check_model.py
Thomas Purcell's avatar
Thomas Purcell committed
71
    - cd ../log_reg/
72
    - mpiexec -n 1 ../../../bin/sisso++
73
    - python ../check_model.py
Thomas Purcell's avatar
Thomas Purcell committed
74
    - cd ../max_corr/
75
    - mpiexec -n 1 ../../../bin/sisso++
76
    - python ../check_model.py