2018-12-28 03:15:02 +00:00
|
|
|
language: cpp
|
|
|
|
|
2018-11-07 09:37:17 +00:00
|
|
|
matrix:
|
|
|
|
include:
|
|
|
|
- os: linux
|
|
|
|
dist: trusty
|
|
|
|
sudo: required
|
|
|
|
compiler: gcc
|
2018-12-27 22:26:49 +00:00
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
sources:
|
|
|
|
- ubuntu-toolchain-r-test
|
|
|
|
packages:
|
|
|
|
- g++-7
|
2018-12-28 03:15:02 +00:00
|
|
|
- gcc-7
|
2018-12-27 22:26:49 +00:00
|
|
|
env:
|
2018-12-28 03:15:45 +00:00
|
|
|
- MATRIX_EVAL="CC=gcc-7 && CXX=g++-7"
|
2018-11-07 09:37:17 +00:00
|
|
|
- os: osx
|
|
|
|
osx_image: xcode7.2
|
|
|
|
compiler: clang
|
2018-02-17 09:19:38 +00:00
|
|
|
|
|
|
|
before_install:
|
2018-12-27 22:26:49 +00:00
|
|
|
- eval "${MATRIX_EVAL}"
|
2018-11-07 09:50:12 +00:00
|
|
|
- |
|
2018-11-07 10:22:28 +00:00
|
|
|
# OSX
|
2018-11-07 09:50:12 +00:00
|
|
|
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
|
|
|
brew update
|
2018-11-07 09:37:17 +00:00
|
|
|
# Linux
|
|
|
|
elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
2018-11-07 09:50:12 +00:00
|
|
|
sudo add-apt-repository ppa:beineri/opt-qt593-trusty -y
|
|
|
|
sudo apt-get update -qq
|
2018-11-07 09:37:17 +00:00
|
|
|
fi
|
2018-02-17 09:19:38 +00:00
|
|
|
|
|
|
|
install:
|
2018-11-07 09:50:12 +00:00
|
|
|
- |
|
2018-11-07 10:22:28 +00:00
|
|
|
# OSX
|
2018-11-07 09:50:12 +00:00
|
|
|
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
|
|
|
brew install qt5
|
|
|
|
brew link qt5 --force
|
2018-12-11 09:38:31 +00:00
|
|
|
#brew install libusb
|
|
|
|
#brew install wget
|
2018-11-07 09:37:17 +00:00
|
|
|
# Linux
|
|
|
|
elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
2018-11-07 09:50:12 +00:00
|
|
|
sudo apt-get -y install qt59base libusb-1.0-0-dev
|
|
|
|
source /opt/qt*/bin/qt*-env.sh
|
2018-11-07 09:37:17 +00:00
|
|
|
fi
|
2018-02-17 09:19:38 +00:00
|
|
|
|
|
|
|
script:
|
2018-11-07 09:50:12 +00:00
|
|
|
- |
|
2018-11-07 10:22:28 +00:00
|
|
|
# OSX
|
2018-11-07 09:50:12 +00:00
|
|
|
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
|
|
|
cd Desktop_Interface
|
2019-04-01 10:26:36 +01:00
|
|
|
qmake CONFIG+=release PREFIX=/usr DEFINES+="GIT_HASH_SHORT=\"$(git rev-parse --short HEAD)\""
|
2018-11-07 09:50:12 +00:00
|
|
|
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 ../build_scripts/osx/iconfile.icns bin/Labrador.app/Contents/Resources
|
|
|
|
cp ../build_scripts/osx/Info.plist bin/Labrador.app/Contents
|
|
|
|
macdeployqt bin/Labrador.app -dmg -libpath=build_mac/libdfuprog/lib/
|
2018-11-07 10:22:28 +00:00
|
|
|
#Linux
|
2018-11-07 09:37:17 +00:00
|
|
|
elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
2018-11-07 09:50:12 +00:00
|
|
|
cd Desktop_Interface
|
2019-04-01 10:26:36 +01:00
|
|
|
qmake CONFIG+=release PREFIX=/usr DEFINES+="GIT_HASH_SHORT=\"$(git rev-parse --short HEAD)\""
|
2018-12-28 03:22:21 +00:00
|
|
|
make -j$(nproc) CXX=${CXX} CC=${CC} LINK=${CXX}
|
2018-11-07 10:22:28 +00:00
|
|
|
# - make INSTALL_ROOT=appdir -j$(nproc) install ; find appdir/
|
|
|
|
# NOTE: The following 5 lines should not be needed if "make install" would be made work for Labrador; see
|
|
|
|
# https://github.com/probonopd/linuxdeployqt#using-linuxdeployqt-with-travis-ci
|
2018-11-07 09:50:12 +00:00
|
|
|
sudo cp ./build_linux/libdfuprog/lib/x64/libdfuprog-*.so /usr/lib/x86_64-linux-gnu/
|
|
|
|
mkdir -p appdir/usr/bin/ ; ldd bin/Labrador ; strip bin/Labrador ; cp bin/Labrador appdir/usr/bin/
|
|
|
|
cp -r bin/{waveforms,firmware} appdir/usr/bin/
|
|
|
|
mkdir -p appdir/usr/share/applications ; cp build_linux/labrador.desktop appdir/usr/share/applications
|
|
|
|
mkdir -p appdir/usr/share/icons/hicolor/256x256/apps/ ; cp '../build_scripts/linux_deploy_labra_64-bit/labradeb/usr/share/app-install/icons/espotek-labrador.png' appdir/usr/share/icons/hicolor/256x256/apps/
|
|
|
|
wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
|
|
|
|
chmod a+x linuxdeployqt-continuous-x86_64.AppImage
|
|
|
|
unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH
|
|
|
|
export VERSION=$(git rev-parse --short HEAD)
|
|
|
|
./linuxdeployqt-continuous-x86_64.AppImage appdir/usr/share/applications/*.desktop -bundle-non-qt-libs -verbose=2
|
|
|
|
./linuxdeployqt*.AppImage --appimage-extract
|
|
|
|
rm ./appdir/AppRun ; cp ./build_linux/AppRun appdir/ ; chmod a+x ./appdir/AppRun
|
|
|
|
PATH=./squashfs-root/usr/bin:$PATH ./squashfs-root/usr/bin/appimagetool -g ./appdir/
|
2018-11-07 09:37:17 +00:00
|
|
|
fi
|
2018-02-17 09:19:38 +00:00
|
|
|
|
|
|
|
after_success:
|
2018-11-07 09:50:12 +00:00
|
|
|
- |
|
2018-11-07 10:22:28 +00:00
|
|
|
# OSX
|
2018-11-07 09:50:12 +00:00
|
|
|
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
2018-11-26 04:42:54 +00:00
|
|
|
export UPLOADTOOL_SUFFIX=osx-dmg
|
2018-11-07 09:50:12 +00:00
|
|
|
wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
|
2018-11-07 10:42:04 +00:00
|
|
|
bash upload.sh bin/Labrador.dmg
|
2018-11-07 09:37:17 +00:00
|
|
|
# Linux
|
|
|
|
elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
|
2018-11-26 04:42:54 +00:00
|
|
|
export UPLOADTOOL_SUFFIX=linux-appimage
|
2018-11-07 09:50:12 +00:00
|
|
|
find appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq
|
2018-11-07 10:22:28 +00:00
|
|
|
# curl --upload-file EspoTek_Labrador*.AppImage https://transfer.sh/EspoTek_Labrador-git.$(git rev-parse --short HEAD)-x86_64.AppImage
|
2018-11-07 09:50:12 +00:00
|
|
|
wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
|
|
|
|
bash upload.sh EspoTek_Labrador*.AppImage*
|
2018-11-07 09:37:17 +00:00
|
|
|
fi
|
2018-02-17 09:19:38 +00:00
|
|
|
|
|
|
|
branches:
|
|
|
|
except:
|
|
|
|
- # Do not build tags that we create when we upload to GitHub Releases
|
2018-11-26 04:42:54 +00:00
|
|
|
- /^(?i:continuous)/
|