forked from PySpice-org/PySpice
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
88 lines (79 loc) · 3.17 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
79
80
81
82
83
84
85
86
87
88
####################################################################################################
#
# Windows: shell is Git BASH
#
# if [ "$TRAVIS_OS_NAME" = "linux" ]; then ... ; fi
# if [ "$TRAVIS_OS_NAME" = "osx" ]; then ... ; fi
# if [ "$TRAVIS_OS_NAME" = "windows" ]; then ... ; fi
#
####################################################################################################
# https://docs.travis-ci.com/user/installing-dependencies/#installing-packages-on-standard-infrastructure
dist: bionic # Ubuntu
# language: c
cache:
ccache: true
pip: true
directories:
- ngspice-34
language: python # this works for Linux but is an error on macOS or Windows
# python:
# - 3.7
# - 3.8
jobs:
include:
- name: "Python 3.8.0 on Bionic Ubuntu Linux"
python: 3.8
before_install:
- sudo apt-get -y install ngspice
- sudo apt-get -y install gcc libreadline-dev
# - sudo apt-get -y install libngspice0 # from eoan (19.10)
- name: "Python 3.7.4 on macOS"
os: osx
osx_image: xcode11.2 # Python 3.7.4 running on macOS 10.14.4 Mojave
language: shell
addons:
homebrew:
packages:
- libngspice
- name: "Python 3.8.0 on Windows"
os: windows # Windows 10.0.17134 N/A Build 17134
language: shell
before_install:
- choco install python --version 3.8.0
- python -m pip install --upgrade pip
env: PATH=/c/Python38:/c/Python38/Scripts:$PATH
# 'python' points to Python 2.7 on macOS but points to Python 3.8 on Linux and Windows
# 'python3' is a 'command not found' error on Windows but 'py' works on Windows only
install:
# all three OSes agree about 'pip3'
- pip3 install --upgrade pip
- pip3 install -r requirements.txt
- pip3 install beautifulsoup4 invoke requests
- pip3 install pytest
- pip3 install pyterate
- pip3 install pint
- pip3 install .
# - python3 setup.py -q install
- echo $TRAVIS_BUILD_DIR
# /home/travis/build/FabriceSalvaire/PySpice
- ls $TRAVIS_BUILD_DIR/
- ls $TRAVIS_BUILD_DIR/ngspice-34/
# Note: /bin/mkdir: cannot create directory ‘/usr/local/include/ngspice’: Permission denied
- if [ "$TRAVIS_OS_NAME" = "linux" -a ! -e "ngspice-34/lib" ]; then invoke ngspice.install ; fi
script:
# - echo $TRAVIS_BUILD_DIR # /home/travis/build/FabriceSalvaire/PySpice
# - echo $PWD # same
- pytest unit-test
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then pyspice-post-installation --install-ngspice-dll; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then export LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/ngspice-34/lib ; fi
- pyspice-post-installation --check-install
- if [ "$TRAVIS_OS_NAME" = "windows" ]; then export PYTHONIOENCODING="utf_8"; fi
- invoke test.run-examples
# - setx PySpiceLibraryPath %SRC_DIR%\examples\libraries # [win]
# - pyterate --config=%SRC_DIR%\examples\Settings.py --only-run # [win]
# run on OSX but zmq.error.ZMQError: Too many open files
# run on Windows but
# circuit.R('load', 'output', circuit.gnd, 50@u_Ω)
# SyntaxError: invalid character in identifier
# and ...
# - PySpiceLogLevel=DEBUG PySpiceLibraryPath=$PWD/examples/libraries pyterate --config=./examples/Settings.py --only-run