.gitlab-ci.yml 2.46 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
  - doc_builds
Thomas Purcell's avatar
Thomas Purcell committed
8

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

test-gnu-py:
Thomas Purcell's avatar
Thomas Purcell committed
37
  stage: unit_test
Thomas Purcell's avatar
Thomas Purcell committed
38
39
40
  dependencies:
    - build-gnu
  script:
Thomas Purcell's avatar
Thomas Purcell committed
41
    - source sissopp_env/bin/activate
42
43
44
    - 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
45
46
47
48
49
50

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

Thomas Purcell's avatar
Thomas Purcell committed
55
test-gnu-bin:
Thomas Purcell's avatar
Thomas Purcell committed
56
  stage: bin_test
Thomas Purcell's avatar
Thomas Purcell committed
57
58
59
  dependencies:
    - build-gnu
  script:
Thomas Purcell's avatar
Thomas Purcell committed
60
    - source sissopp_env/bin/activate
61
62
    - 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
63
    - ls lib
64
65
66
67
68
    - cd tests/exec_test/default/
    - mpiexec -n 1 ../../../bin/sisso++
    - python ../check_model.py
    - cd ../classification/
    - mpiexec -n 1 ../../../bin/sisso++
69
    - python check_model.py
Thomas Purcell's avatar
Thomas Purcell committed
70
    - cd ../gen_proj/
71
    - mpiexec -n 1 ../../../bin/sisso++
72
    - python ../check_model.py
Thomas Purcell's avatar
Thomas Purcell committed
73
    - cd ../log_reg/
74
    - mpiexec -n 1 ../../../bin/sisso++
Thomas Purcell's avatar
Thomas Purcell committed
75
    - python check_model.py
Thomas Purcell's avatar
Thomas Purcell committed
76
    - cd ../max_corr/
77
    - mpiexec -n 1 ../../../bin/sisso++
78
    - python ../check_model.py
Thomas Purcell's avatar
Thomas Purcell committed
79
80

pages:
81
  stage: doc_builds
Thomas Purcell's avatar
Thomas Purcell committed
82
  script:
Thomas Purcell's avatar
Thomas Purcell committed
83
    - source sissopp_env/bin/activate
84
85
86
    - cd docs/
    - make html
    - mv _build ../public
Thomas Purcell's avatar
Thomas Purcell committed
87
88
89
90
91
92
93
  artifacts:
    paths:
    - public
  only:
  - master
  - docs
  - joss