forked from IENT/YUView
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
65 lines (57 loc) · 2.75 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
language: cpp
os:
- linux
- osx
dist:
# Request Ubuntu 14 as linux
- trusty
compiler:
- gcc
branches:
except:
- gh-pages
before_install:
- eval "${MATRIX_EVAL}"
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo add-apt-repository ppa:forkotov02/opt-qt-5.11.1-trusty -y; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get update -qq; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi
# On linux also get a newer g++. The old one won't work.
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get update -qq; fi
# On linux, also get the linuxdeployqt tool to build the Appimage
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then wget https://github.com/probonopd/linuxdeployqt/releases/download/6/linuxdeployqt-6-x86_64.AppImage; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then chmod a+x linuxdeployqt-6-x86_64.AppImage; fi
install:
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install qt5; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew link --force qt5; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get install -qq qt511base; source /opt/qt511/bin/qt511-env.sh; fi
# On linux, install the new g++ version
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo apt-get install -qq g++-8; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-8 90; fi
script:
# Run qmake and make
- qmake -config release
- make
# Just for debugging
- ls -alh
- ls -alh build
- ls -alh build/release
after_success:
# Mac: build an "app" file
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then /usr/local/opt/qt5/bin/macdeployqt build/release/YUView.app -always-overwrite -verbose=2; fi
# check what YUView is linking against
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then otool -L build/release/YUView.app/Contents/MacOs/YUView; fi
# copy the libde265 library
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then cp libde265/libde265-internals.dylib build/release/YUView.app/Contents/MacOS/.; fi
# prepare zip package
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then cd build/release; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then zip -r ../../YUView-MacOs.zip YUView.app; fi
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then cd ../..; fi
- if [ "$TRAVIS_OS_NAME" = "osx" AND ${TRAVIS_BRANCH} = "master" ]; then ./deployment/deploy_to_github.sh; fi
# Linux: Build the Appimage
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then make INSTALL_ROOT=appdir install; fi
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then ./linuxdeployqt-6-x86_64.AppImage appdir/usr/local/share/applications/de.rwth_aachen.ient.YUView.desktop -appimage; fi
before_deploy:
# not needed?
deploy:
# we could also put the package somewhere else