Skip to content

Commit

Permalink
Test sympy-1.0+ during CI (#56)
Browse files Browse the repository at this point in the history
* Test sympy-1.0+ during CI

* Travis CI / Python 3.7 workaround

* forgot to set executable flag

* Use sympy-1.1.1 instead of sympy-1.1

* Specify --machine on Travis

* Use some bash fu

* explicit sections for releases

* Travis fold

* fix bash syntax

* Better syntax

* fix ci script

* simplify script

* Correctly reference asv 'machine'

* Update Travis deferring pre-1.2 releases
  • Loading branch information
bjodah authored Apr 30, 2019
1 parent d6d8f58 commit a5930b9
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .asv-machine.json → .ci/.asv-machine.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"travis": {
"arch": "x86_64",
"cpu": "Dummy cpu",
"machine": "dummy_hostname",
"machine": "travis_dummy_machine",
"os": "Linux",
"ram": "2049316"
},
Expand Down
8 changes: 8 additions & 0 deletions .ci/run_ci.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/bash -eu
tag=$1
if [[ ${TRAVIS:-} ]]; then echo -en "travis_fold:start:test-${tag}\\r"; fi
python3 -m virtualenv /tmp/venv-${tag}
bash -c "source /tmp/venv-${tag}/bin/activate; pip install pytest https://github.com/sympy/sympy/archive/${tag}.tar.gz && echo \"Running the benchmark test suite for ${tag}...\" && pytest -rs"
echo "Running benchmarks for ${tag}..."
asv run --machine travis --config asv.conf.venv.json --show-stderr "${tag}^!"
if [[ ${TRAVIS:-} ]]; then echo -en "travis_fold:end:test-${tag}\\r"; fi
10 changes: 3 additions & 7 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
*.pyc
*/*.pyc
*/*/*.pyc
__pycache__/
*/__pycache__/
*/*/__pycache__/
.cache/
**.pyc
**/__pycache__/
.cache*/
env/
results/
sympy/
Expand Down
19 changes: 13 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,19 @@
dist: xenial # py37, cf. https://github.com/travis-ci/travis-ci/issues/9815
sudo: yes # py37, cf. https://github.com/travis-ci/travis-ci/issues/9815
language: python
python:
- "2.7"
- "3.7"
install:
- pip install -r requirements.txt
- pip install asv virtualenv
- cp .asv-machine.json ~
- pip install virtualenv https://github.com/airspeed-velocity/asv/archive/master.tar.gz
- cp .ci/.asv-machine.json ~
- git clone --bare git://github.com/sympy/sympy sympy # asv uses --bare
script:
- py.test
- asv run --config asv.conf.venv.json --show-stderr
- .ci/run_ci.sh master || travis_terminate 1;
- .ci/run_ci.sh sympy-1.4 || travis_terminate 1;
- .ci/run_ci.sh sympy-1.3 || travis_terminate 1;
- .ci/run_ci.sh sympy-1.2 || travis_terminate 1;
# TODO: enable for older versions:
# - .ci/run_ci.sh sympy-1.1.1 || travis_terminate 1;
# - .ci/run_ci.sh sympy-1.0 || travis_terminate 1;
notifications:
email: false
1 change: 0 additions & 1 deletion requirements.txt

This file was deleted.

0 comments on commit a5930b9

Please sign in to comment.