-
Notifications
You must be signed in to change notification settings - Fork 119
/
.travis.yml
99 lines (91 loc) · 3.03 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
language: cpp
branches:
only:
- master
matrix:
include:
- os: linux
dist: xenial
sudo: required
compiler: gcc
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- g++-7
- gcc-7
- libfftw3-dev
- qt5-default
- libusb-1.0-0-dev
env:
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
- os: osx
osx_image: xcode11.6
compiler: clang
before_install:
- eval "${MATRIX_EVAL}"
- |
# OSX
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update
brew remove --force $(brew list --formula)
# Linux
elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo add-apt-repository ppa:beineri/opt-qt-5.12.9-xenial -y
sudo apt-get update -qq
fi
install:
- |
# OSX
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew install fftw
brew install libomp
brew install qt5
brew link qt5 --force
brew install libusb
brew install wget
# Linux
elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
sudo apt-get -y install qt512base
source /opt/qt*/bin/qt*-env.sh
fi
script:
- |
# OSX
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
cd Desktop_Interface
qmake CONFIG+=release PREFIX=/usr DEFINES+=GIT_HASH_SHORT=$(git rev-parse --short HEAD)
make -j$(sysctl -n hw.ncpu)
mkdir -p bin/Labrador.app/Contents/MacOS/Resources
mkdir -p bin/Labrador.app/Contents/Frameworks
cp -r bin/firmware bin/Labrador.app/Contents/MacOS
cp -r bin/waveforms bin/Labrador.app/Contents/MacOS
cp resources/iconfile.icns bin/Labrador.app/Contents/Resources
cp resources/Info.plist bin/Labrador.app/Contents
macdeployqt bin/Labrador.app -dmg -libpath=build_mac/libdfuprog/lib/
#Linux
elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
cd Desktop_Interface
./make_appimage
fi
after_success:
- |
# OSX
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
export UPLOADTOOL_SUFFIX="macOS"
export UPLOADTOOL_BODY="EspoTek Labrador software for macOS 10.13 and later. If you are running an older version of macOS, please use the macOS Legacy build below."
wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
bash upload.sh bin/Labrador.dmg
# Linux
elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
export UPLOADTOOL_SUFFIX="Linux"
find appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq
export UPLOADTOOL_BODY="EspoTek Labrador software for Linux. This should be compatible with all modern 64-bit distros. If you're running 32-bit Linux, please see the wiki for build instructions. https://github.com/EspoTek/Labrador/wiki/Building-for-32-bit-Linux"
wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
bash upload.sh EspoTek_Labrador*.AppImage
fi
branches:
except:
- # Do not build tags that we create when we upload to GitHub Releases
- /^(?i:continuous)/