language: cpp matrix: include: - os: linux dist: trusty addons: apt: sources: - sourceline: "ppa:beineri/opt-qt487-trusty" packages: - opt-qt4-qmake opt-qt4-dev-tools opt-libqt4-dev opt-libqt4-dev-bin opt-libqt4-opengl-dev sudo: required compiler: gcc env: - QT_BASE=48 - os: linux dist: trusty addons: apt: sources: - sourceline: "ppa:beineri/opt-qt-5.10.1-trusty" packages: - qt510base sudo: required compiler: gcc env: - QT_BASE=510 - os: osx compiler: clang env: - QT_BASE=57 before_install: - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew update; fi install: - if [ "$TRAVIS_OS_NAME" = "osx" ]; then brew install qt5; brew link --force qt5; wget https://github.com/leozide/leocad/releases/download/v0.83.2/Library-Linux-9306.zip -O library.bin; fi script: - if [[ "$QT_BASE" = "48" && "$TRAVIS_OS_NAME" = "linux" ]]; then source /opt/qt-4.8/bin/qt-4.8-env.sh; fi - if [[ "$QT_BASE" = "510" && "$TRAVIS_OS_NAME" = "linux" ]]; then source /opt/qt510/bin/qt510-env.sh; fi - qmake PREFIX=/usr -v - qmake PREFIX=/usr -r - make -j4 - if [ "$TRAVIS_OS_NAME" != "linux" ] ; then exit 0 ; fi - make install INSTALL_ROOT=AppDir - sed -i -e 's|.svg||g' AppDir/usr/share/applications/leocad.desktop # FIXME; .svg should not be in the desktop file to begin with - wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" - chmod a+x linuxdeployqt*.AppImage - unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH - export VERSION=$(git rev-parse --short HEAD) - ./linuxdeployqt*.AppImage ./AppDir/usr/share/applications/*.desktop -bundle-non-qt-libs - ./linuxdeployqt*.AppImage --appimage-extract - export PATH=$(readlink -f ./squashfs-root/usr/bin/):$PATH - ./squashfs-root/usr/bin/appimagetool AppDir/ - curl --upload-file ./LeoCAD-*.AppImage https://transfer.sh/LeoCAD-git.$VERSION.qt$QT_BASE-x86_64.AppImage - echo AppImage uploaded to https://transfer.sh/LeoCAD-git.$VERSION.qt$QT_BASE-x86_64.AppImage