-
Notifications
You must be signed in to change notification settings - Fork 2
/
.gitlab-ci.yml
59 lines (54 loc) · 1.38 KB
/
.gitlab-ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
image: owan/libsia:latest
stages:
- build
- test
- deploy
build:
stage: build
script:
- mkdir build && cd build
- cmake -DCMAKE_BUILD_TYPE=Debug ..
- cmake -DTEST_COVERAGE=ON ..
- make
- make install
- pip install --upgrade ..
- python -c "import pysia"
- cp /usr/local/lib/python3.6/dist-packages/pysia.cpython-36m-x86_64-linux-gnu.so $CI_PROJECT_DIR/lib/pysia.cpython-36m-x86_64-linux-gnu.so
artifacts:
paths:
- build/
- bin/
- lib/
expire_in: 1 week
test:
stage: test
variables:
CODECOV_TOKEN: 0df5e030-4952-4335-a58f-4b31e0e844a3
script:
- export PYTHONPATH=$CI_PROJECT_DIR/lib
- export LD_LIBRARY_PATH=$CI_PROJECT_DIR/lib
- cd build/
- make test
- make coverage
after_script:
- lcov --capture --directory . --output-file coverage.info
- lcov --remove coverage.info '/usr/*' --output-file coverage.info # filter system-files
- lcov --list coverage.info
- bash <(curl -s https://codecov.io/bash) -f coverage.info || echo "Codecov did not collect coverage reports"
dependencies:
- build
docs:
stage: test
script:
- sphinx-build -b html . public
rules:
- if: $CI_COMMIT_REF_NAME != $CI_DEFAULT_BRANCH
pages:
stage: deploy
script:
- sphinx-build -b html . public
artifacts:
paths:
- public
rules:
- if: $CI_COMMIT_REF_NAME == $CI_DEFAULT_BRANCH