Skip to content

Commit

Permalink
single ci file
Browse files Browse the repository at this point in the history
  • Loading branch information
bjodah committed Apr 2, 2024
1 parent 81d912b commit 3481e8d
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 65 deletions.
68 changes: 66 additions & 2 deletions .woodpecker/testing.yaml → .woodpecker.yaml
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand All @@ -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
28 changes: 0 additions & 28 deletions .woodpecker/deploy.yaml

This file was deleted.

35 changes: 0 additions & 35 deletions .woodpecker/install.yaml

This file was deleted.

0 comments on commit 3481e8d

Please sign in to comment.