forked from AMICI-dev/AMICI
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
49 lines (46 loc) · 2.18 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
branches:
only:
- master
- develop
# Release branches, otherwise they cannot be merged into protected master
- /^release.*/
# Version tags
- /^v\d+\.\d+(\.\d+)?(-\S*)?$/
matrix:
fast_finish: true
include:
- os: windows
# language python currently not supported on Windows
language: cpp
compiler: msvc
git:
# clone after enabled symlinks below
clone: false
env: PATH=/c/Python37:/c/Python37/Scripts:$PATH
before_install:
- export -f travis_fold travis_nanoseconds travis_time_start travis_time_finish
# allow PowerShell to run scripts
- powershell -Command Set-ExecutionPolicy Unrestricted -Force
# Enable Windows developer mode to support symlinks
- powershell -Command New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\AppModelUnlock" -Name AllowDevelopmentWithoutDevLicense -Value 1 -PropertyType DWord
# stick to python 3.7 until there is a 3.8 wheel for windows
# as installation from sdist fails because of reasons...
- choco install python --version 3.7.5
- choco install -y swig --version=4.0.1
- python -m pip install --upgrade pip
- git clone -c core.symlinks=true https://github.com/AMICI-dev/AMICI.git && cd AMICI
- if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then git checkout -qf $TRAVIS_COMMIT; elif [[ "$TRAVIS_PULL_REQUEST" != "false" ]]; then git fetch --update-head-ok origin pull/$TRAVIS_PULL_REQUEST/head:$TRAVIS_BRANCH && git checkout $TRAVIS_BRANCH; fi
# run BLAS installation script
- powershell -File 'C:\Users\travis\build\AMICI\scripts\installOpenBLAS.ps1'
- export BLAS_LIBS='/LIBPATH:C:\\BLAS\\lib openblas.lib' BLAS_CFLAGS='-IC:\\BLAS\\OpenBLAS-v0.3.10\\OpenBLAS-0.3.10'
- export PATH=${PATH}:C:\\BLAS\\bin
install:
- export BASE_DIR=`pwd`
- cd python/sdist && python setup.py sdist
- pip install -v $(ls -t dist/amici-*.tar.gz | head -1)
script:
- export FOLD=$BASE_DIR/scripts/travis_wrap.sh
- cd $BASE_DIR
- export AMICI_SKIP_CMAKE_TESTS=TRUE
- pip install pytest petab
- python -m pytest --ignore-glob=*petab* ./python/tests