-
Notifications
You must be signed in to change notification settings - Fork 28
/
.travis.yml
98 lines (83 loc) · 4.16 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
language: cpp
sudo: required
cache:
ccache: true
directories:
- .ccache
python:
- "3.5"
matrix:
fast_finish: true
include:
- compiler: "gcc"
os: linux
dist: xenial
- os: linux
dist: bionic
- compiler: "clang"
os: osx
osx_image: xcode10.1
- compiler: "clang"
os: osx
osx_image: xcode11.3
- compiler: "clang"
os: osx
osx_image: xcode12
before_install:
- if [[ ${TRAVIS_OS_NAME} == linux ]]; then sudo apt-get update ; fi
- if [[ ${TRAVIS_OS_NAME} == linux ]]; then sudo apt-get install libudev-dev libusb-1.0-0-dev libboost-all-dev ; fi
- if [[ ${TRAVIS_OS_NAME} == osx ]]; then brew update 2>&1 > /dev/null ; fi
#- if [[ ${TRAVIS_OS_NAME} == osx ]]; then brew unlink libusb ; fi
#- if [[ ${TRAVIS_OS_NAME} == osx ]]; then brew install https://raw.githubusercontent.com/Homebrew/homebrew-core/cb21e9ac30e47e3ea161c4247a6397967f83c83f/Formula/libusb.rb --universal; fi
#- if [[ ${TRAVIS_OS_NAME} == osx ]]; then brew unlink qt ; fi
#- if [[ ${TRAVIS_OS_NAME} == osx ]]; then brew install --force https://raw.githubusercontent.com/Homebrew/homebrew-core/8846805afc0cb8e5d114d5e222af1de3b35289df/Formula/qt.rb ; fi
- if [[ ${TRAVIS_OS_NAME} == osx ]]; then brew install libusb qt; fi
- if [[ ${TRAVIS_OS_NAME} == osx ]]; then brew upgrade qt; fi
- if [[ ${TRAVIS_OS_NAME} == osx ]]; then brew link libusb ; fi
- if [[ ${TRAVIS_OS_NAME} == osx ]]; then brew link qt ; fi
- if [[ ${TRAVIS_OS_NAME} == osx ]]; then export PATH=/usr/local/opt/qt/bin:$PATH ; fi
install:
- if [[ ${TRAVIS_OS_NAME} == linux ]]; then sudo apt-get install -y qt5-default qttools5-dev qtdeclarative5-dev libqt5svg5-dev libqt5opengl5-dev cmake ; fi
#- if [[ ${TRAVIS_OS_NAME} == linux ]]; then sudo apt-get -y install qt55d qt55base qt55connectivity qt55declarative qt55graphicaleffects qt55imageformats qt55quick1 qt55quickcontrols qt55script qt55tools ;fi
before_script:
- git clone https://github.com/analogdevicesinc/libsmu.git
- cd libsmu
- mkdir build && cd build && cmake -DBUILD_PYTHON=OFF -DCMAKE_INSTALL_PREFIX=/usr/local/ ..
- make
- sudo make install
- cd ../..
- mkdir build && cd build && cmake .. && make
- cd ..
- sudo chmod +x CI/travis/lib.sh
- . CI/travis/lib.sh
- export LDIST="-$(get_ldist)"
- echo $LDIST
script:
- if [[ ${TRAVIS_OS_NAME} == osx ]]; then cd build; fi
- if [[ ${TRAVIS_OS_NAME} == osx ]]; then /usr/local/opt/qt5/bin/macdeployqt pixelpulse2.app -always-overwrite -verbose=2 -qmldir=../qml ;fi
- if [[ ${TRAVIS_OS_NAME} == osx ]]; then cd ..; fi
- |
if [[ ${TRAVIS_OS_NAME} == osx ]]; then
libsmupath="$(otool -L ./build/pixelpulse2.app/Contents/MacOS/pixelpulse2 | grep libsmu | cut -d " " -f 1)"
libsmuid="$(echo ${libsmupath} | rev | cut -d "/" -f 1 | rev)"
fi
- if [[ ${TRAVIS_OS_NAME} == osx ]]; then cp libsmu/build/src/${libsmuid} build/pixelpulse2.app/Contents/Frameworks/ ;fi
- if [[ ${TRAVIS_OS_NAME} == osx ]]; then otool -L libsmu/build/src/${libsmuid} ;fi
- if [[ ${TRAVIS_OS_NAME} == osx ]]; then sudo install_name_tool -id @executable_path/../Frameworks/${libsmuid} build/pixelpulse2.app/Contents/Frameworks/${libsmuid} ;fi
- if [[ ${TRAVIS_OS_NAME} == osx ]]; then sudo install_name_tool -change ${libsmupath} @executable_path/../Frameworks/${libsmuid} build/pixelpulse2.app/Contents/MacOS/Pixelpulse2 ;fi
- if [[ ${TRAVIS_OS_NAME} == osx ]]; then otool -L build/pixelpulse2.app/Contents/MacOS/Pixelpulse2 ;fi
- if [[ ${TRAVIS_OS_NAME} == osx ]]; then cd build; fi
- if [[ ${TRAVIS_OS_NAME} == osx ]]; then /usr/local/opt/qt5/bin/macdeployqt pixelpulse2.app -dmg -no-plugins ;fi
- if [[ ${TRAVIS_OS_NAME} == osx ]]; then for x in *.dmg ; do mv $x ${x%.dmg}${LDIST}.dmg ; done ; fi
- if [[ ${TRAVIS_OS_NAME} == osx ]]; then cd ..; fi
deploy:
provider: releases
api_key:
secure: gjhjymTOZHb+J6h4wPkZBjgP2wYGhhRBiLGadKfiq8mherF+XRTZyVHMeRmBaJI963OkrIMP9lt2H131Iv5dsHXmxokosxQ2xO/gJA2ft4P23vpjC4KNhdOI65G0agr+cixSfANOQPswCETu/L5k5Q79RN+VnilUaYka2UiGqK8=
file_glob: true
file: "build/*.dmg"
skip_cleanup: true
on:
condition: "${TRAVIS_OS_NAME} == osx"
repo: analogdevicesinc/Pixelpulse2
tags: true