代码拉取完成,页面将自动刷新
####################################################################################################
#
# 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
#
####################################################################################################
dist: bionic # Ubuntu
# language: c
cache:
ccache: true
pip: true
directories:
- ngspice-32
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-32/
# Note: /bin/mkdir: cannot create directory ‘/usr/local/include/ngspice’: Permission denied
- if [ "$TRAVIS_OS_NAME" = "linux" -a ! -e "ngspice-32/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-32/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
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。