-
Notifications
You must be signed in to change notification settings - Fork 19
/
.travis.yml
executable file
·78 lines (64 loc) · 2.8 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
#dist: bionic
#dist: xenial is not supported before Nov 2018, python2 is the default for trusty
#dist: bionic is now available
# https://blog.travis-ci.com/2018-11-08-xenial-release
# docker is another way to test out this FenicsSolver
sudo: required
language: python
jobs:
include:
- os: linux
dist: bionic
python: 3.6
env: TOXENV=DOLFIN
- os: linux
dist: xenial
python: 2.7 #
env: TOXENV=DOLFIN # later using python 3.7 for dolfinX
#services:
# - docker
#branches:
# only:
# - master
# To add unlisted APT sources, follow instructions in https://docs.travis-ci.com/user/installing-dependencies#Installing-Packages-with-the-APT-Addon
before_install:
- sudo add-apt-repository -y ppa:fenics-packages/fenics
- sudo apt-get -q update
# shared by all env matrix
install:
- sudo apt-get update -q
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then travis_retry sudo apt-get install
-y python-matplotlib python-numpy git doxygen python-dolfin fenics; fi
- if [[ $TRAVIS_PYTHON_VERSION == '3.6' ]]; then travis_retry sudo apt-get install
-y python3-matplotlib python3-numpy git doxygen python3-dolfin fenics; fi
- echo "current working dir during install stage is $(pwd)" && ls
# already git clone this repo: git clone --depth=50 --branch=master https://github.com/qingfengxia/FenicsSolver.git qingfengxia/FenicsSolver
# cd into this repo
# Use the YAML block scalar header (|) to allow easier multiline script coding.
# #docker services
#- docker pull quay.io/fenicsproject/stable:current
#- docker run -v $(pwd):/home/fenics/shared -w /home/fenics/shared quay.io/fenicsproject/stable:current /bin/bash -c "echo $(pwd) && export BATCH && export PYTHONPATH=$(pwd):$PYTHONPATH && cd examples && python3 run_all_tests.py"
## output of docker, show the log
#- docker logs
# in travis, python will be set to version you specified above
script:
# test the installed fenics packages
- if [ ${TOXENV} = 'DOLFIN' ]; then python -c 'import dolfin; print("Fenics version", dolfin.__version__)'; fi
- if [ ${TOXENV} = 'DOLFINX' ]; then python -c 'import dolfin; print("Fenics version", dolfin.__version__)'; fi
- echo "current working dir is $(pwd)"
# test without installation
- export PYTHONPATH=$(pwd):$PYTHONPATH
- if [ -d 'examples' ] ; then cd examples && python run_all_tests.py && cd .. ; fi
- if [ -d 'data' ] ; then cd data && python -m FenicsSolver TestHeatTransfer.json && cd .. ; fi
#- doxygen Doxyfile
# build the wheel, skip_cleanup: true
- python setup.py bdist_wheel
# TODO: github can host package
# deploy to multiple providers are possible, make a list
#~ deploy:
#~ - provider: pages
#~ skip_cleanup: true
#~ local_dir: docs/html
#~ github_token: $GH_REPO_TOKEN
#~ on:
#~ branch: hg_pages