forked from analogdevicesinc/libsmu
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
153 lines (135 loc) · 6.71 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
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
env:
global:
# coverity token
- secure: UP0F0/tspgDnPsxZ4uCdRUcfhBrmHKtdWZ7fhGuTq4rHBeC9CxwqVB//JKEr0XTqzDHhQ2J53S7j7XY90h9P+9kQoTmkuOxLs1FNYXg011/rVkwEwu0427M+Oye2CbENWgaf4OycPgkbZR2USKwKg53oGniAyyz6/xm8IlAZRng=
# GITHUB_DOC_TOKEN
- secure: XaFrbDbgsUb5ZKjHYsjFDHWEScquJxqMhxL/jZtHCAVO/btQgY5MrSjI8VFG1SS9sq2zo5ZGQ6Z6t3itbZQgX9wfcssJjOT3/4w38m47wAcAqZQLaQQocmPNtc6bFukcL9tUTf6V/6v0ujBdnahc5gH6GYJ9Dg6Thv4Kuvln3vQ=
cache:
directories:
- ${TRAVIS_BUILD_DIR}/deps
matrix:
fast_finish: true
include:
- os: linux
sudo: required
dist: bionic
language: python
python: 3.6
env: PYTHON=python PIP=pip
cache: pip
- os: linux
sudo: required
dist: xenial
language: python
python: 3.5
env: PYTHON=python PIP=pip
cache: pip
- os: linux
sudo: required
dist: focal
language: python
python: 3.8
env: PYTHON=python PIP=pip
cache: pip
- os: osx
osx_image: xcode10.1
env: PYTHON=python3 PIP=pip3
cache: "$HOME/Library/Caches/pip"
- os: osx
osx_image: xcode11
env: PYTHON=python3 PIP=pip3
cache: "$HOME/Library/Caches/pip"
- os: osx
osx_image: xcode12
env: PYTHON=python3 PIP=pip3
cache: "$HOME/Library/Caches/pip"
- os: linux
dist: bionic
env:
- OS_TYPE=doxygen
addons:
apt:
packages:
- libusb-1.0-0-dev
- libboost-all-dev
coverity_scan:
project:
name: analogdevicesinc/libsmu
description: Software abstractions for the analog signal exploration tools (ADALM1000)
notification_email: alexandra.trifan@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:
- export DEPS_DIR="${TRAVIS_BUILD_DIR}/deps"
- mkdir -p ${DEPS_DIR}
# Configure git user for Travis CI to push doc
- git config --global user.name "Travis Bot"
- git config --global user.email "<>"
- if [[ ${TRAVIS_OS_NAME} == osx ]]; then brew update; fi
- if [[ ${TRAVIS_OS_NAME} == linux ]]; then sudo apt-get 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
- if [[ ${OS_TYPE} != "doxygen" ]]; then ${PIP} install --only-binary ":all:" --disable-pip-version-check --upgrade pip; fi
- if [[ ${TRAVIS_OS_NAME} == osx ]]; then sudo ${PIP} install --only-binary ":all:" wheel cython ; fi
- if [[ ${TRAVIS_OS_NAME} == linux && ${OS_TYPE} != "doxygen" ]]; then ${PYTHON} -m pip install --upgrade pip stdeb stdeb3 setuptools cython ; fi
- if [[ ${TRAVIS_OS_NAME} == linux && ${OS_TYPE} != "doxygen" ]]; then ${PYTHON} -m pip install setuptools wheel stdeb ; fi
- if [[ ${TRAVIS_OS_NAME} == linux ]]; then sudo apt-get install devscripts cython3 python3-setuptools python3-stdeb fakeroot dh-python python3-all debhelper python3-dev python3-all-dev python3-wheel ; fi
script:
# build tar containg python files
- if [[ ${TRAVIS_OS_NAME} == linux && ${OS_TYPE} != "doxygen" ]]; then mkdir -p build_tar && cd build_tar; fi
- if [[ ${TRAVIS_OS_NAME} == linux && ${OS_TYPE} != "doxygen" ]]; then cmake -DDEB_DETECT_DEPENDENCIES=ON -DENABLE_PACKAGING=ON -DUSE_PYTHON2=OFF -DBUILD_PYTHON=ON ..; make package; rm *.deb; cd .. ; fi
- mkdir -p build && cd build
- if [[ ${TRAVIS_OS_NAME} == linux ]]; then cmake -DDEB_DETECT_DEPENDENCIES=ON -DENABLE_PACKAGING=ON -DUSE_PYTHON2=OFF -DBUILD_PYTHON=OFF ..; make package; rm *.tar.gz; fi
- if [[ ${TRAVIS_OS_NAME} == "linux" && ${OS_TYPE} == "doxygen" ]]; then "${TRAVIS_BUILD_DIR}/CI/travis/build_deploy_doc.sh"; fi
# Build tar.gz for OSX (contains libraries and smu)
- if [[ ${TRAVIS_OS_NAME} == osx ]]; then cmake -DENABLE_PACKAGING=ON -DBUILD_PYTHON=OFF ..; make package; fi
# Build pkg for OSX (contains libsmu.framework - only base library)
- if [[ ${TRAVIS_OS_NAME} == osx ]]; then cmake -DOSX_PACKAGE=ON -DENABLE_PACKAGING=OFF -DUSE_PYTHON2=OFF .. ; fi
- if [[ ${OS_TYPE} != "doxygen" ]]; then make && sudo make install ; fi
- if [[ ${OS_TYPE} != "doxygen" ]]; then cd "${TRAVIS_BUILD_DIR}"/bindings/python; fi
- if [[ ${OS_TYPE} != "doxygen" ]]; then ${PYTHON} --version; fi
- if [[ ${OS_TYPE} != "doxygen" ]]; then ${PYTHON} -c "import struct; print(struct.calcsize('P') * 8)"; fi
- if [[ ${OS_TYPE} != "doxygen" ]]; then ${PYTHON} setup.py build_ext -L "${TRAVIS_BUILD_DIR}"/build/src; fi
- if [[ ${OS_TYPE} != "doxygen" ]]; then ${PYTHON} setup.py build; fi
- if [[ ${TRAVIS_OS_NAME} == linux && ${OS_TYPE} != "doxygen" ]]; then ${PYTHON} -c "from Cython.Build import cythonize" ; fi
- if [[ ${OS_TYPE} != "doxygen" ]]; then ${PYTHON} setup.py bdist_wheel --skip-build; fi
- if [[ ${TRAVIS_OS_NAME} == linux && ${OS_TYPE} != "doxygen" ]]; then sudo sed -i 's/my\ \$ignore_missing_info\ =\ 0;/my\ \$ignore_missing_info\ =\ 1;/' /usr/bin/dpkg-shlibdeps ; fi
- if [[ ${TRAVIS_OS_NAME} == linux && ${OS_TYPE} != "doxygen" ]]; then ${PYTHON} setup.py --command-packages=stdeb.command sdist_dsc ; fi
- if [[ ${TRAVIS_OS_NAME} == linux && ${OS_TYPE} != "doxygen" ]]; then cd "$(find . -type d -name "debian" | head -n 1)"/.. ; fi
- if [[ ${TRAVIS_OS_NAME} == linux && ${OS_TYPE} != "doxygen" ]]; then debuild -us -uc ; fi
- if [[ ${TRAVIS_OS_NAME} == linux && ${OS_TYPE} != "doxygen" ]]; then cp ${TRAVIS_BUILD_DIR}/bindings/python/deb_dist/*.deb ${TRAVIS_BUILD_DIR}/bindings/python ; fi
before_deploy:
- if [[ ${OS_TYPE} != "doxygen" ]]; then . ${TRAVIS_BUILD_DIR}/CI/travis/before_deploy; fi
deploy:
- provider: releases
api_key:
secure: LW6KL6nixaLLEkZKE/knz9qGtbUmJU3G3F1Rexo8xMEQyUOePS99OTNANjI38zlOWP3Cbcrrl2Palz7B9ZXkFYnT9NjRNB15ox1LOEeZTGKT65+N11Te8WpHHcQVXFc5e3BupmYdwv7vMh+a4RTbq/nRF0X/OzbV/Nyxlzlw6fA=
file:
- "${RELEASE_PKG_FILE_DEB}"
- "${RELEASE_PKG_FILE_TGZ}"
- "${RELEASE_PY_FILE_DEB}"
skip_cleanup: true
on:
repo: analogdevicesinc/libsmu
tags: true
condition: "($TRAVIS_OS_NAME = linux) && ($OS_TYPE != doxygen)"
- provider: releases
api_key:
secure: LW6KL6nixaLLEkZKE/knz9qGtbUmJU3G3F1Rexo8xMEQyUOePS99OTNANjI38zlOWP3Cbcrrl2Palz7B9ZXkFYnT9NjRNB15ox1LOEeZTGKT65+N11Te8WpHHcQVXFc5e3BupmYdwv7vMh+a4RTbq/nRF0X/OzbV/Nyxlzlw6fA=
file:
- "${RELEASE_PKG_FILE_PKG}"
- "${RELEASE_PKG_FILE_TGZ}"
skip_cleanup: true
on:
repo: analogdevicesinc/libsmu
tags: true
condition: "$TRAVIS_OS_NAME = osx"