mirror of
https://github.com/leozide/leocad
synced 2025-01-29 20:34:50 +01:00
Merge branch 'travis'
This commit is contained in:
commit
016fdc3ea6
1 changed files with 28 additions and 54 deletions
82
.travis.yml
82
.travis.yml
|
@ -4,87 +4,61 @@ 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=57
|
||||
- QT_BASE=510
|
||||
- os: osx
|
||||
compiler: clang
|
||||
env:
|
||||
- QT_BASE=57
|
||||
|
||||
before_install:
|
||||
- if [[ "$QT_BASE" = "48" && "$TRAVIS_OS_NAME" = "linux" ]]; then sudo add-apt-repository ppa:beineri/opt-qt487-trusty -y; fi
|
||||
- if [[ "$QT_BASE" = "51" && "$TRAVIS_OS_NAME" = "linux" ]]; then sudo add-apt-repository ppa:beineri/opt-qt511-trusty -y; fi
|
||||
- if [[ "$QT_BASE" = "52" && "$TRAVIS_OS_NAME" = "linux" ]]; then sudo add-apt-repository ppa:beineri/opt-qt521-trusty -y; fi
|
||||
- if [[ "$QT_BASE" = "53" && "$TRAVIS_OS_NAME" = "linux" ]]; then sudo add-apt-repository ppa:beineri/opt-qt532-trusty -y; fi
|
||||
- if [[ "$QT_BASE" = "54" && "$TRAVIS_OS_NAME" = "linux" ]]; then sudo add-apt-repository ppa:beineri/opt-qt542-trusty -y; fi
|
||||
- if [[ "$QT_BASE" = "55" && "$TRAVIS_OS_NAME" = "linux" ]]; then sudo add-apt-repository ppa:beineri/opt-qt551-trusty -y; fi
|
||||
- if [[ "$QT_BASE" = "56" && "$TRAVIS_OS_NAME" = "linux" ]]; then sudo add-apt-repository ppa:beineri/opt-qt562-trusty -y; fi
|
||||
- if [[ "$QT_BASE" = "57" && "$TRAVIS_OS_NAME" = "linux" ]]; then sudo add-apt-repository ppa:beineri/opt-qt571-trusty -y; fi
|
||||
- if [[ "$QT_BASE" = "58" && "$TRAVIS_OS_NAME" = "linux" ]]; then sudo add-apt-repository ppa:beineri/opt-qt58-trusty -y; fi
|
||||
- if [[ "$QT_BASE" = "59" && "$TRAVIS_OS_NAME" = "linux" ]]; then sudo add-apt-repository ppa:beineri/opt-qt596-trusty -y; fi
|
||||
- if [[ "$QT_BASE" = "510" && "$TRAVIS_OS_NAME" = "linux" ]]; then sudo add-apt-repository ppa:beineri/opt-qt-5.10.1-trusty -y; fi
|
||||
- if [ "$TRAVIS_OS_NAME" = "linux" ]; then
|
||||
sudo apt-get update -qq;
|
||||
else
|
||||
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then
|
||||
brew update;
|
||||
fi
|
||||
|
||||
install:
|
||||
- if [ "$QT_BASE" = "48" ]; then sudo apt-get --allow-unauthenticated install -qq opt-qt4-qmake opt-qt4-dev-tools; source /opt/qt-4.8/bin/qt-4.8-env.sh; fi
|
||||
- if [ "$QT_BASE" = "51" ]; then sudo apt-get install -qq qt51base; source /opt/qt51/bin/qt51-env.sh; fi
|
||||
- if [ "$QT_BASE" = "52" ]; then sudo apt-get install -qq qt52base; source /opt/qt52/bin/qt52-env.sh; fi
|
||||
- if [ "$QT_BASE" = "53" ]; then sudo apt-get install -qq qt53base; source /opt/qt53/bin/qt53-env.sh; fi
|
||||
- if [ "$QT_BASE" = "54" ]; then sudo apt-get install -qq qt54base; source /opt/qt54/bin/qt54-env.sh; fi
|
||||
- if [ "$QT_BASE" = "55" ]; then
|
||||
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
|
||||
sudo apt-get install -qq qt55base; source /opt/qt55/bin/qt55-env.sh;
|
||||
else
|
||||
brew install qt55;
|
||||
brew link --force qt55;
|
||||
fi
|
||||
fi
|
||||
- if [ "$QT_BASE" = "56" ]; then sudo apt-get install -qq qt56base; source /opt/qt56/bin/qt56-env.sh; fi
|
||||
- if [ "$QT_BASE" = "57" ]; then
|
||||
if [ "$TRAVIS_OS_NAME" = "linux" ]; then
|
||||
sudo apt-get --allow-unauthenticated install -qq qt57base libqt5opengl5-dev; source /opt/qt57/bin/qt57-env.sh;
|
||||
else
|
||||
brew install qt5;
|
||||
brew link --force qt5;
|
||||
fi
|
||||
fi
|
||||
- if [ "$QT_BASE" = "58" ]; then sudo apt-get install -qq qt58base; source /opt/qt58/bin/qt58-env.sh; fi
|
||||
- if [ "$QT_BASE" = "59" ]; then sudo apt-get install -qq qt59base; source /opt/qt59/bin/qt59-env.sh; fi
|
||||
- if [ "$QT_BASE" = "510" ]; then sudo apt-get install -qq qt510base; source /opt/qt510/bin/qt510-env.sh; fi
|
||||
- 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
|
||||
- sudo apt-get -y install checkinstall
|
||||
- rm ./*.spec # Otherwise the next line fails
|
||||
- sudo checkinstall --pkgname=app --pkgversion="1" --pkgrelease="1" --backup=no --fstrans=no --default --deldoc
|
||||
- mkdir appdir ; cd appdir
|
||||
- dpkg -x ../app_1-1_amd64.deb . ; find .
|
||||
- cp ../qt/leocad.desktop .
|
||||
- sed -i -e 's|\.svg||g' leocad.desktop # Workaround
|
||||
- cp ../resources/leocad.png .
|
||||
- cd ..
|
||||
- wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
|
||||
- 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
|
||||
- ./linuxdeployqt*.AppImage ./appdir/usr/bin/leocad -bundle-non-qt-libs -verbose=2
|
||||
- ./linuxdeployqt*.AppImage ./appdir/usr/bin/leocad -appimage -verbose=2
|
||||
- curl --upload-file ./LeoCAD-*.AppImage https://transfer.sh/LeoCAD-git.$(git rev-parse --short HEAD).qt$QT_BASE-x86_64.AppImage
|
||||
|
||||
- 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
|
||||
|
|
Loading…
Add table
Reference in a new issue