Commit 92352aa3 authored by Anton Akhmerov's avatar Anton Akhmerov
Browse files

CI: setup scipy/mpl dependency testing and pip cache

parent 53a73b3d
Pipeline #1460 failed with stages
in 36 minutes and 58 seconds
image: kwant/testing
stages:
- build
- test
- deploy
mirror repository:
stage: build
only:
......@@ -23,27 +25,33 @@ mirror repository:
- cd $(mktemp -d); git clone --bare $ORIGIN_URL .
- for REPO in $REPOS; do git push --mirror $REPO; done
build package:
stage: build
cache:
paths:
- .pip_cache
key: pip_cache
script:
- export PIP_CACHE_DIR=".pip_cache"
- pip3 install -U cython scipy numpy matplotlib
- echo -e "[DEFAULT]\ndefine_macros = CYTHON_TRACE=1" >build.conf
- ./setup.py build
- ./setup.py build_ext -i
artifacts:
untracked: true
paths:
- kwant
- build
- tutorial
expire_in: 1 hour
check for whitespace:
stage: build
script:
- "! for f in `git ls-files | grep -v \\.diff$`; do file $f | grep -q ' text' && grep -l '[[:blank:]]$' $f; done | grep . >&2"
allow_failure: true
check for dependencies installed:
stage: test
script:
- if [ -d .eggs ]; then echo "$(ls -d .eggs/*/) downloaded by build, update build environment" >&2; fi
allow_failure: true
build documentation:
stage: test
......@@ -54,17 +62,36 @@ build documentation:
- doc/build/html/
expire_in: 1 month
run tests:
.run_tests: &run_tests
cache:
paths:
- .pip_cache
key: pip_cache
stage: test
before_script:
- pip3 install -U cython scipy numpy matplotlib
script:
- JOB_NAME=( $CI_BUILD_NAME )
- export PIP_CACHE_DIR=".pip_cache"
- pip3 install -U ${JOB_NAME[@]:1}
- py.test --cov=kwant --flakes kwant
tests scipy matplotlib==1.5.2: *run_tests # Latest published versions
tests scipy==0.12.1: *run_tests # Oldest available scipy
tests --pre scipy matplotlib:
<<: *run_tests # Bleeding edge
allow_failure: true
check for broken links in doc:
stage: test
script:
- make -C doc linkcheck
allow_failure: true
upload documentation to the test server:
stage: deploy
only:
......@@ -75,6 +102,7 @@ upload documentation to the test server:
- rsync -rlv --delete doc/build/html/* kwant@kwant-project.org:doc/dev
- rm -rf ~/.ssh
upload dev version docs:
stage: deploy
only:
......@@ -85,6 +113,7 @@ upload dev version docs:
- rsync -rlv --delete doc/build/html/* kwant@kwant-project.org:doc/dev
- rm -rf ~/.ssh
upload docs of tagged build:
stage: deploy
only:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment