diff --git a/.woodpecker/testing.yaml b/.woodpecker.yaml similarity index 54% rename from .woodpecker/testing.yaml rename to .woodpecker.yaml index 4968de65..26c27e14 100644 --- a/.woodpecker/testing.yaml +++ b/.woodpecker.yaml @@ -2,6 +2,39 @@ 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 -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/${DRONE_BRANCH} + - cp dist/chempy-* deploy/public_html/branches/${DRONE_BRANCH}/ + - name: test-suite image: bjodah/bjodahimg20dot:21.8.a environment: @@ -29,6 +62,8 @@ steps: - 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 @@ -47,6 +82,8 @@ steps: - ./.ci/grep-for-binary-data.sh - mv index.html index.ipynb.html - cp -r index.* examples/ "deploy/public_html/branches/${DRONE_BRANCH}" + depends_on: + - install - name: compile-documentation image: bjodah/bjodahimg20dot:21.8.a @@ -61,6 +98,33 @@ steps: - ./scripts/generate_docs.sh - cp LICENSE doc/_build/html/ - cp -r doc/_build/html/ deploy/public_html/branches/${DRONE_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 + -depends_on: - - install diff --git a/.woodpecker/deploy.yaml b/.woodpecker/deploy.yaml deleted file mode 100644 index da23dd76..00000000 --- a/.woodpecker/deploy.yaml +++ /dev/null @@ -1,28 +0,0 @@ -when: - - event: [pull_request, tag, cron, push] - -steps: - - 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 - - - name: deploy - 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: - - testing - diff --git a/.woodpecker/install.yaml b/.woodpecker/install.yaml deleted file mode 100644 index e2f9c552..00000000 --- a/.woodpecker/install.yaml +++ /dev/null @@ -1,35 +0,0 @@ -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 -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/${DRONE_BRANCH} - - cp dist/chempy-* deploy/public_html/branches/${DRONE_BRANCH}/