forked from analogdevicesinc/libsmu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
102 lines (92 loc) · 3.04 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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
env:
global:
# coverity token
- secure: "UP0F0/tspgDnPsxZ4uCdRUcfhBrmHKtdWZ7fhGuTq4rHBeC9CxwqVB//JKEr0XTqzDHhQ2J53S7j7XY90h9P+9kQoTmkuOxLs1FNYXg011/rVkwEwu0427M+Oye2CbENWgaf4OycPgkbZR2USKwKg53oGniAyyz6/xm8IlAZRng="
matrix:
fast_finish: true
include:
- os: linux
sudo: required
dist: trusty
language: python
python: 2.7
env: PYTHON=python PIP=pip
cache: pip
- os: linux
sudo: required
dist: trusty
language: python
python: 3.4
env: PYTHON=python PIP=pip
cache: pip
- os: linux
sudo: required
dist: trusty
language: python
python: 3.5
env: PYTHON=python PIP=pip
cache: pip
- os: osx
osx_image: xcode61
env: PYTHON=python PIP=pip
cache: $HOME/Library/Caches/pip
- os: osx
osx_image: xcode61
env: PYTHON=python3 PIP=pip3
cache: $HOME/Library/Caches/pip
allow_failures:
- os: osx
osx_image: xcode61
env: PYTHON=python PIP=pip
cache: $HOME/Library/Caches/pip
- os: osx
osx_image: xcode61
env: PYTHON=python3 PIP=pip3
cache: $HOME/Library/Caches/pip
addons:
apt:
packages:
- libusb-1.0
- libboost-all-dev
coverity_scan:
project:
name: analogdevicesinc/libsmu
version: 0.9.0
description: "Software abstractions for the analog signal exploration tools (ADALM1000)"
notification_email: timothy.harder@analog.com
build_command_prepend: "mkdir -p build && cd build && cmake -DBUILD_PYTHON=OFF .."
build_command: make
branch_pattern: coverity_scan
# build from all branches except appveyor (windows builds)
branches:
except:
- appveyor
before_install:
- if [[ ${TRAVIS_OS_NAME} == osx ]]; then brew update; fi
install:
- if [[ ${TRAVIS_OS_NAME} == osx ]]; then brew install libusb; fi
- if [[ ${TRAVIS_OS_NAME} == osx ]]; then brew install ${PYTHON} || true; fi
- if [[ ${TRAVIS_OS_NAME} == osx ]]; then brew upgrade cmake || true; fi
# for python bindings
- if [[ ${TRAVIS_OS_NAME} == osx ]]; then sudo easy_install pip; fi
- ${PIP} install --only-binary ":all:" --disable-pip-version-check --upgrade pip
- if [[ ${TRAVIS_OS_NAME} == osx ]]; then sudo ${PIP} install --only-binary ":all:" wheel cython ; fi
- if [[ ${TRAVIS_OS_NAME} == linux ]]; then ${PIP} install --only-binary ":all:" wheel cython ; fi
script:
- mkdir -p build && cd build
- cmake -DBUILD_PYTHON=OFF ..
- make
# create generic binary shell-based installer/tarball
- make package
# build OS X installer
- if [[ ${TRAVIS_OS_NAME} == osx ]]; then chmod +x build-osx-pkg.sh; fi
- if [[ ${TRAVIS_OS_NAME} == osx ]]; then ./build-osx-pkg.sh; fi
# build python bindings
- cd "${TRAVIS_BUILD_DIR}"/bindings/python
# check python info
- ${PYTHON} --version
- ${PYTHON} -c "import struct; print(struct.calcsize('P') * 8)"
# build extension linking to previously built library
- ${PYTHON} setup.py build_ext -L "${TRAVIS_BUILD_DIR}"/build/src
- ${PYTHON} setup.py build
- ${PYTHON} setup.py bdist_wheel --skip-build