Upload continuous OSX builds. (#326)

This commit is contained in:
Leonardo Zide 2019-03-11 15:33:43 -07:00 committed by GitHub
parent 586ae0425f
commit 482a51df77
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -32,39 +32,53 @@ matrix:
- QT_BASE=57 - QT_BASE=57
before_install: before_install:
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew update; brew update;
fi fi
install: install:
- if [ "$TRAVIS_OS_NAME" = "osx" ]; then - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
brew install qt5; brew install qt5;
brew link --force qt5; brew link --force qt5;
wget https://github.com/leozide/leocad/releases/download/v0.83.2/Library-Linux-9306.zip -O library.bin; wget https://github.com/leozide/leocad/releases/download/v18.02/Library-Linux-11331.zip -O library.zip;
unzip library.zip;
fi fi
script: 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 if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then
- qmake PREFIX=/usr -v source /opt/qt*/bin/qt*-env.sh
- qmake PREFIX=/usr -r qmake PREFIX=/usr -v
- make -j4 qmake PREFIX=/usr -r
- if [ "$TRAVIS_OS_NAME" != "linux" ] ; then exit 0 ; fi make -j$(nproc)
- make install INSTALL_ROOT=AppDir if [[ "$QT_BASE" != "510" ]]; then exit 0; fi
- wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" make install INSTALL_ROOT=AppDir
- chmod a+x linuxdeployqt*.AppImage wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
- unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH chmod a+x linuxdeployqt*.AppImage
- export VERSION=$(git rev-parse --short HEAD) unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH
- ./linuxdeployqt*.AppImage ./AppDir/usr/share/applications/*.desktop -bundle-non-qt-libs export VERSION=$(git rev-parse --short HEAD)
- ./linuxdeployqt*.AppImage --appimage-extract ./linuxdeployqt*.AppImage ./AppDir/usr/share/applications/*.desktop -bundle-non-qt-libs
- export PATH=$(readlink -f ./squashfs-root/usr/bin/):$PATH ./linuxdeployqt*.AppImage --appimage-extract
- ./squashfs-root/usr/bin/appimagetool AppDir/ export PATH=$(readlink -f ./squashfs-root/usr/bin/):$PATH
./squashfs-root/usr/bin/appimagetool AppDir/
mv ./LeoCAD-$VERSION-x86_64.AppImage ./LeoCAD-Linux-$VERSION-x86_64.AppImage
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
qmake PREFIX=/usr -v
qmake PREFIX=/usr -r
make -j$(sysctl -n hw.ncpu)
cd build/release
macdeployqt LeoCAD.app -dmg
mv LeoCAD.dmg LeoCAD-macOS-$(git rev-parse --short HEAD).dmg
fi
after_success: after_success:
- | - |
if [[ "$QT_BASE" = "510" && "$TRAVIS_OS_NAME" = "linux" ]]; then if [[ "$QT_BASE" = "510" && "$TRAVIS_OS_NAME" = "linux" ]]; then
wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
bash upload.sh LeoCAD*.AppImage* bash upload.sh LeoCAD*.AppImage*
elif [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
bash upload.sh LeoCAD*.dmg*
fi fi
branches: branches: