1+ variables :
2+ # Developers are not expected to actually use this CI image locally, however,
3+ # using this image avoid downloading a bunch of PyPI packages for each CI run.
4+ - &ci_image 'cont-reg.bjodah.se:443/bjodah/triceratops-6:32'
5+
16when :
2- - event : [pull_request, tag, cron, push]
7+ - event : [push]
38
49steps :
510
611 - name : restore-cache
7- image : bjodah/bjodahimg20dot:21.8.a
12+ image : *ci_image
813 commands :
914 - curl ftp://chempy:$${ARTIFACTS_PASS}@$${FTP_SERVER}/cache/cache-ci.tar | tar x
1015 secrets : [ ARTIFACTS_PASS, FTP_SERVER ]
1116 when :
1217 - event : push
1318 repo : bjodah/chempy
1419
15- - name : install
16- image : bjodah/bjodahimg20dot:21.8.a
20+ - name : test-suite
21+ image : *ci_image
1722 environment :
18- - CC=gcc-11
19- - CXX=g++-11
20- - CPLUS_INCLUDE_PATH=/opt/boost-1.77.0/include
21- - SUNDBASE=/opt/sundials-5.7.0-release
22- - CPATH=/usr/include/suitesparse # sunlinsol_klu.h includes "klu.h"
23+ - CHEMPY_SKIP_NO_TESTS=1
2324 commands :
24- - export CACHE_ROOT=$(pwd)/cache-ci
25- - export PYTHONUSERBASE=$CACHE_ROOT/pyusrb
26- - if [ ! -d $PYTHONUSERBASE ]; then mkdir -p $PYTHONUSERBASE; fi
27- - export CPATH=$SUNDBASE/include:$CPATH
28- - export LIBRARY_PATH=$SUNDBASE/lib
29- - export LD_LIBRARY_PATH=$SUNDBASE/lib
30- - python3 -m pip install --cache-dir $CACHE_ROOT/pip_cache --user --upgrade-strategy=eager --upgrade cython
31- - python3 -m pip install --cache-dir $CACHE_ROOT/pip_cache --user -e .[all]
32- - python3 -c "import pycvodes; import pyodesys; import pygslodeiv2" # debug this CI config
33- - git fetch -tq
34- - python3 setup.py sdist # test pip installable sdist (checks MANIFEST.in)
35- - git archive -o dist/chempy-head.zip HEAD # test pip installable zip (symlinks break)
25+ - mkdir -p deploy/public_html/branches/${CI_COMMIT_BRANCH}/
26+ - bash -l .ci/run-01-install-deps-create-sdist.sh
27+ - bash -l .ci/run-02-test-suite.sh
3628 - mkdir -p deploy/public_html/branches/${CI_COMMIT_BRANCH}
3729 - cp dist/chempy-* deploy/public_html/branches/${CI_COMMIT_BRANCH}/
3830
39- - name : test-suite
40- image : bjodah/bjodahimg20dot:21.8.a
41- environment :
42- - CC=gcc-11
43- - CXX=g++-11
44- - CPLUS_INCLUDE_PATH=/opt/boost-1.77.0/include
45- - SUNDBASE=/opt/sundials-5.7.0-release
46- - CPATH=/usr/include/suitesparse # sunlinsol_klu.h includes "klu.h"
47- - CHEMPY_SKIP_NO_TESTS=1
48- commands :
49- - export CACHE_ROOT=$(pwd)/cache-ci
50- - export PYTHONUSERBASE=$CACHE_ROOT/pyusrb
51- - export CPATH=$SUNDBASE/include:$CPATH
52- - export LIBRARY_PATH=$SUNDBASE/lib
53- - export LD_LIBRARY_PATH=$SUNDBASE/lib
54- - bash -c '[[ $(python3 setup.py --version) =~ ^[0-9]+.* ]]'
55- - ./scripts/run_tests.sh --cov chempy --cov-report html
56- - ./scripts/coverage_badge.py htmlcov/ htmlcov/coverage.svg
57- - cp -r htmlcov/ deploy/public_html/branches/${CI_COMMIT_BRANCH}/
58- - ./.ci/grep-for-merge-blocking-token.sh
59- - export CHEMPY_DEPRECATION_FILTER=ignore
60- - python3 -m virtualenv /tmp/test_sdist
61- - python3 -m virtualenv /tmp/test_git_archive
62- - cd deploy/public_html/branches/${CI_COMMIT_BRANCH}
63- - unset CHEMPY_SKIP_NO_TESTS # I can't get pip to install extras when using local file...
64- - 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"
65- - 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"
66- depends_on :
67- - install
6831
6932 - name : render-notebooks
70- image : bjodah/bjodahimg20dot:21.8.a
33+ image : *ci_image
7134 environment :
7235 - CHEMPY_DEPRECATION_FILTER=ignore
73- - SUNDBASE=/opt/sundials-5.7.0-release
74- - CC=gcc-11
75- - CXX=g++-11
76- - CPATH=/usr/include/suitesparse # sunlinsol_klu.h includes "klu.h"
7736 commands :
78- - export PYTHONUSERBASE=$(pwd)/cache-ci/pyusrb
79- - export CPATH=$SUNDBASE/include:$CPATH
80- - export LIBRARY_PATH=$SUNDBASE/lib
81- - export LD_LIBRARY_PATH=$SUNDBASE/lib
82- - ./scripts/render_notebooks.sh
83- - ./.ci/grep-for-binary-data.sh
84- - mv index.html index.ipynb.html
85- - cp -r index.* examples/ "deploy/public_html/branches/${CI_COMMIT_BRANCH}"
86- depends_on :
87- - install
37+ - mkdir -p deploy/public_html/branches/${CI_COMMIT_BRANCH}/
38+ - bash -l .ci/run-01-install-deps-create-sdist.sh
39+ - bash -l .ci/run-03-render-notebooks.sh
40+ - .ci/grep-for-binary-data.sh
8841
8942 - name : compile-documentation
90- image : bjodah/bjodahimg20dot:21.8.a
43+ image : *ci_image
9144 environment :
9245 - CHEMPY_DEPRECATION_FILTER=ignore
93- - SUNDBASE=/opt/sundials-5.7.0-release
9446 commands :
95- - export PYTHONUSERBASE=$(pwd)/cache-ci/pyusrb
96- - export CPATH=$SUNDBASE/include
97- - export LIBRARY_PATH=$SUNDBASE/lib
98- - export LD_LIBRARY_PATH=$SUNDBASE/lib
99- - ./scripts/generate_docs.sh
47+ - bash -lc '. .ci/_source_common_env.sh; ./scripts/generate_docs.sh'
10048 - cp LICENSE doc/_build/html/
10149 - cp -r doc/_build/html/ deploy/public_html/branches/${CI_COMMIT_BRANCH}
10250 depends_on :
10351 - test-suite
10452 - render-notebooks
10553
10654 - name : rebuild-cache
107- image : bjodah/bjodahimg20dot:21.8.a
55+ image : *ci_image
10856 commands :
10957 - find ./cache-ci/ -type f -mtime +90 -exec rm {} \;
11058 - tar cf cache-ci.tar ./cache-ci/
@@ -117,7 +65,7 @@ steps:
11765 - compile-documentation
11866
11967 - name : deploy-public-html
120- image : bjodah/bjodahimg20dot:21.8.a
68+ image : *ci_image
12169 commands :
12270 - tar czf chempy-${CI_COMMIT_BRANCH}.tar.gz ./deploy/public_html
12371 - curl -T chempy-${CI_COMMIT_BRANCH}.tar.gz ftp://chempy:$${ARTIFACTS_PASS}@$${FTP_SERVER}/public_html/
@@ -127,5 +75,3 @@ steps:
12775 repo : bjodah/chempy
12876 depends_on :
12977 - compile-documentation
130-
131-
0 commit comments