diff --git a/.woodpecker/deploy.yaml b/.woodpecker/deploy.yaml new file mode 100644 index 00000000..a2d124c0 --- /dev/null +++ b/.woodpecker/deploy.yaml @@ -0,0 +1,28 @@ +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: + - tests + diff --git a/.woodpecker/install.yaml b/.woodpecker/install.yaml new file mode 100644 index 00000000..d0395dd0 --- /dev/null +++ b/.woodpecker/install.yaml @@ -0,0 +1,35 @@ +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}/ diff --git a/.woodpecker.yaml b/.woodpecker/test.yaml similarity index 56% rename from .woodpecker.yaml rename to .woodpecker/test.yaml index 096ca58b..4968de65 100644 --- a/.woodpecker.yaml +++ b/.woodpecker/test.yaml @@ -2,41 +2,8 @@ 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 - depends_on: [ install ] environment: - CC=gcc-11 - CXX=g++-11 @@ -65,7 +32,6 @@ steps: - name: render-notebooks image: bjodah/bjodahimg20dot:21.8.a - depends_on: [ install ] environment: - CHEMPY_DEPRECATION_FILTER=ignore - SUNDBASE=/opt/sundials-5.7.0-release @@ -96,23 +62,5 @@ steps: - cp LICENSE doc/_build/html/ - cp -r doc/_build/html/ deploy/public_html/branches/${DRONE_BRANCH} - - name: rebuild-cache - image: bjodah/bjodahimg20dot:21.8.a - commands: - - find ./ci-cache/ -type f -mtime +90 -exec rm {} \; - - tar cf ci-cache.tar ./ci-cache/ - - curl -T ci-cache.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: + - install