Labrador/.travis.yml

90 lines
2.8 KiB
YAML
Raw Normal View History

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
2021-03-05 05:01:55 +00:00
osx_image: xcode11.6
2018-11-07 09:37:17 +00:00
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
- |
# 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
- |
# 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
- |
# 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
2019-08-24 03:09:27 +01:00
sudo ./make_deb
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 05:52:33 +00:00
export UPLOADTOOL_SUFFIX="current macOS release"
2021-03-05 05:36:13 +00:00
export UPLOADTOOL_BODY="EspoTek Labrador software for macOS 10.13 and later."
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 05:52:33 +00:00
export UPLOADTOOL_SUFFIX="current Linux release"
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-03-05 05:28:38 +00:00
export UPLOADTOOL_BODY="EspoTek Labrador software for Linux. Please note that the .deb is unsupported - it's recommended you install the AppImage or build from source (instructions available in main page)."
2018-11-07 09:50:12 +00:00
wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
2019-08-21 02:13:58 +01:00
bash upload.sh EspoTek_Labrador*.AppImage EspoTek_Labrador*.deb
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)/