Labrador/.travis.yml

100 lines
3.0 KiB
YAML
Raw Normal View History

2018-12-28 03:15:02 +00:00
language: cpp
2021-09-03 08:32:46 +01:00
branches:
only:
- master
2018-11-07 09:37:17 +00:00
matrix:
include:
- os: linux
2021-10-28 05:42:48 +01:00
dist: xenial
2018-11-07 09:37:17 +00:00
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
2021-10-28 05:42:48 +01:00
- libfftw3-dev
- qt5-default
- libusb-1.0-0-dev
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"
2021-10-28 03:53:38 +01:00
- os: osx
osx_image: xcode11.6
compiler: clang
2021-09-03 08:32:46 +01:00
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
- |
2021-10-28 02:47:10 +01:00
# OSX
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update
2021-10-28 06:03:56 +01:00
brew remove --force $(brew list --formula)
2021-10-28 02:47:10 +01:00
# Linux
elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
2021-10-28 05:42:48 +01:00
sudo add-apt-repository ppa:beineri/opt-qt-5.12.9-xenial -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
- |
2021-10-28 02:47:10 +01:00
# OSX
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
2021-10-28 05:44:28 +01:00
brew install fftw
brew install libomp
2021-10-28 05:24:27 +01:00
brew install qt5
brew link qt5 --force
2021-10-28 06:26:35 +01:00
brew install libusb
brew install wget
2021-10-28 05:24:27 +01:00
# Linux
2021-10-28 05:08:47 +01:00
elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
2021-10-28 05:42:48 +01:00
sudo apt-get -y install qt512base
2021-10-28 05:24:27 +01:00
source /opt/qt*/bin/qt*-env.sh
2021-10-18 11:43:24 +01:00
fi
2021-10-28 05:24:27 +01:00
2018-02-17 09:19:38 +00:00
script:
2018-11-07 09:50:12 +00:00
- |
# OSX
2018-11-07 09:50:12 +00:00
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
cd Desktop_Interface
2019-04-01 11:29:55 +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
2019-04-24 10:35:15 +01:00
cp resources/iconfile.icns bin/Labrador.app/Contents/Resources
cp resources/Info.plist bin/Labrador.app/Contents
2018-11-07 09:50:12 +00:00
macdeployqt bin/Labrador.app -dmg -libpath=build_mac/libdfuprog/lib/
#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-06-23 05:48:16 +01:00
./make_appimage
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
- |
# OSX
2018-11-07 09:50:12 +00:00
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
2021-03-05 06:01:53 +00:00
export UPLOADTOOL_SUFFIX="macOS"
2021-08-18 05:56:34 +01:00
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."
2018-11-07 09:50:12 +00:00
wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
bash upload.sh bin/Labrador.dmg
2018-11-07 09:37:17 +00:00
# Linux
elif [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
2021-03-05 06:01:53 +00:00
export UPLOADTOOL_SUFFIX="Linux"
2018-11-07 09:50:12 +00:00
find appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq
2021-08-18 05:54:39 +01:00
export UPLOADTOOL_BODY="EspoTek Labrador software for Linux. This should be compatible with all modern 64-bit distros. If you need help building it on an older or 32-bit system, please contact admin@espotek.com"
2018-11-07 09:50:12 +00:00
wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
2021-10-28 05:42:48 +01:00
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)/