-
Notifications
You must be signed in to change notification settings - Fork 80
/
.woodpecker.yaml
131 lines (121 loc) · 5.14 KB
/
.woodpecker.yaml
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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
when:
- event: [pull_request, tag, cron, push]
steps:
- name: restore-cache
image: bjodah/bjodahimg20dot:21.8.a
commands:
- curl ftp://chempy:$${ARTIFACTS_PASS}@$${FTP_SERVER}/cache/cache-ci.tar | tar x
secrets: [ ARTIFACTS_PASS, FTP_SERVER ]
when:
- event: push
repo: bjodah/chempy
- name: install
image: bjodah/bjodahimg20dot:21.8.a
environment:
- CC=gcc-11
- CXX=g++-11
- CPLUS_INCLUDE_PATH=/opt/boost-1.77.0/include
- SUNDBASE=/opt/sundials-5.7.0-release
- CPATH=/usr/include/suitesparse # sunlinsol_klu.h includes "klu.h"
commands:
- export CACHE_ROOT=$(pwd)/cache-ci
- export PYTHONUSERBASE=$CACHE_ROOT/pyusrb
- if [ ! -d $PYTHONUSERBASE ]; then mkdir -p $PYTHONUSERBASE; fi
- export CPATH=$SUNDBASE/include:$CPATH
- export LIBRARY_PATH=$SUNDBASE/lib
- export LD_LIBRARY_PATH=$SUNDBASE/lib
- python3 -m pip install --cache-dir $CACHE_ROOT/pip_cache --user --upgrade-strategy=eager --upgrade cython
- python3 -m pip install --cache-dir $CACHE_ROOT/pip_cache --user -e .[all]
- python3 -c "import pycvodes; import pyodesys; import pygslodeiv2" # debug this CI config
- git fetch -tq
- python3 setup.py sdist # test pip installable sdist (checks MANIFEST.in)
- git archive -o dist/chempy-head.zip HEAD # test pip installable zip (symlinks break)
- mkdir -p deploy/public_html/branches/${CI_COMMIT_BRANCH}
- cp dist/chempy-* deploy/public_html/branches/${CI_COMMIT_BRANCH}/
- name: test-suite
image: bjodah/bjodahimg20dot:21.8.a
environment:
- CC=gcc-11
- CXX=g++-11
- CPLUS_INCLUDE_PATH=/opt/boost-1.77.0/include
- SUNDBASE=/opt/sundials-5.7.0-release
- CPATH=/usr/include/suitesparse # sunlinsol_klu.h includes "klu.h"
- CHEMPY_SKIP_NO_TESTS=1
commands:
- export CACHE_ROOT=$(pwd)/cache-ci
- export PYTHONUSERBASE=$CACHE_ROOT/pyusrb
- export CPATH=$SUNDBASE/include:$CPATH
- export LIBRARY_PATH=$SUNDBASE/lib
- export LD_LIBRARY_PATH=$SUNDBASE/lib
- bash -c '[[ $(python3 setup.py --version) =~ ^[0-9]+.* ]]'
- ./scripts/run_tests.sh --cov chempy --cov-report html
- ./scripts/coverage_badge.py htmlcov/ htmlcov/coverage.svg
- cp -r htmlcov/ deploy/public_html/branches/${CI_COMMIT_BRANCH}/
- ./.ci/grep-for-merge-blocking-token.sh
- export CHEMPY_DEPRECATION_FILTER=ignore
- python3 -m virtualenv /tmp/test_sdist
- python3 -m virtualenv /tmp/test_git_archive
- cd deploy/public_html/branches/${CI_COMMIT_BRANCH}
- unset CHEMPY_SKIP_NO_TESTS # I can't get pip to install extras when using local file...
- bash -c "source /tmp/test_sdist/bin/activate; pip install --cache-dir $CACHE_ROOT/pip_cache file://$(realpath $(eval ls chempy-*.tar.gz))#chempy[all] pytest; pytest --pyargs chempy"
- bash -c "source /tmp/test_git_archive/bin/activate; pip install --cache-dir $CACHE_ROOT/pip_cache file://$(realpath chempy-head.zip)#chempy[all] pytest; pytest --pyargs chempy"
depends_on:
- install
- name: render-notebooks
image: bjodah/bjodahimg20dot:21.8.a
environment:
- CHEMPY_DEPRECATION_FILTER=ignore
- SUNDBASE=/opt/sundials-5.7.0-release
- CC=gcc-11
- CXX=g++-11
- CPATH=/usr/include/suitesparse # sunlinsol_klu.h includes "klu.h"
commands:
- export PYTHONUSERBASE=$(pwd)/cache-ci/pyusrb
- export CPATH=$SUNDBASE/include:$CPATH
- export LIBRARY_PATH=$SUNDBASE/lib
- export LD_LIBRARY_PATH=$SUNDBASE/lib
- ./scripts/render_notebooks.sh
- ./.ci/grep-for-binary-data.sh
- mv index.html index.ipynb.html
- cp -r index.* examples/ "deploy/public_html/branches/${CI_COMMIT_BRANCH}"
depends_on:
- install
- name: compile-documentation
image: bjodah/bjodahimg20dot:21.8.a
environment:
- CHEMPY_DEPRECATION_FILTER=ignore
- SUNDBASE=/opt/sundials-5.7.0-release
commands:
- export PYTHONUSERBASE=$(pwd)/cache-ci/pyusrb
- export CPATH=$SUNDBASE/include
- export LIBRARY_PATH=$SUNDBASE/lib
- export LD_LIBRARY_PATH=$SUNDBASE/lib
- ./scripts/generate_docs.sh
- cp LICENSE doc/_build/html/
- cp -r doc/_build/html/ deploy/public_html/branches/${CI_COMMIT_BRANCH}
depends_on:
- test-suite
- render-notebooks
- name: rebuild-cache
image: bjodah/bjodahimg20dot:21.8.a
commands:
- find ./cache-ci/ -type f -mtime +90 -exec rm {} \;
- tar cf cache-ci.tar ./cache-ci/
- curl -T cache-ci.tar ftp://chempy:$${ARTIFACTS_PASS}@$${FTP_SERVER}/cache/
secrets: [ ARTIFACTS_PASS, FTP_SERVER ]
when:
- event: push
repo: bjodah/chempy
depends_on:
- compile-documentation
- name: deploy-public-html
image: bjodah/bjodahimg20dot:21.8.a
commands:
- tar czf chempy-${CI_COMMIT_BRANCH}.tar.gz ./deploy/public_html
- curl -T chempy-${CI_COMMIT_BRANCH}.tar.gz ftp://chempy:$${ARTIFACTS_PASS}@$${FTP_SERVER}/public_html/
secrets: [ ARTIFACTS_PASS, FTP_SERVER ]
when:
- event: push
repo: bjodah/chempy
depends_on:
- compile-documentation