blob: b62d24c3e5c396b7f1a4e63a5720709d12c19ea8 [file] [log] [blame]
Cristy17f8c722016-01-31 09:42:56 -05001sudo: required # needed for trusty beta
2dist: trusty # needed for HarfBuzz
3
cristyc09aa1f2015-06-05 22:37:37 +00004language: c
5
cristyc09aa1f2015-06-05 22:37:37 +00006compiler:
7 - clang
8 - gcc
9
10before_script:
Cristy17f8c722016-01-31 09:42:56 -050011 - sudo add-apt-repository -y ppa:as-bahanta/raqm
cristyc09aa1f2015-06-05 22:37:37 +000012 - sudo add-apt-repository ppa:dns/gnu -y
dirk6f921d62016-02-01 19:22:54 +010013 - sudo apt-key update -q
cristyc09aa1f2015-06-05 22:37:37 +000014 - sudo apt-get update -q
15 - sudo apt-get install --only-upgrade autoconf
Cristy17f8c722016-01-31 09:42:56 -050016 - sudo apt-get install -y libraqm-dev libfreetype6-dev libharfbuzz-dev libfribidi-dev
cristyc09aa1f2015-06-05 22:37:37 +000017
Paul Kehrer84687172018-01-15 15:10:59 -060018script: |
19 set -e
20 set -x
Paul Kehrer84687172018-01-15 15:10:59 -060021 export CFLAGS="-Wno-deprecated-declarations -Wdeclaration-after-statement -Wno-error=unused-variable"
Dirk Lemstra3ed16f02020-01-06 18:27:32 +010022 if [ "$TRAVIS_COMPILER" == "gcc" ] ; then
Dirk Lemstra65337792020-01-06 18:23:58 +010023 ./configure --with-quantum-depth=16 --enable-hdri=no --without-perl --prefix=/usr
24 else
25 ./configure --disable-openmp --with-quantum-depth=16 --enable-hdri=no --without-perl --prefix=/usr
26 fi
Paul Kehrer84687172018-01-15 15:10:59 -060027 make
28 make install DESTDIR=$(readlink -f appdir)
29 # Build the fuzzers
30 ./.travis/build_fuzzers.sh
31 # Generate AppImage
32 mkdir -p appdir/usr/share/applications/ ; cp imagemagick.desktop appdir/usr/share/applications/
33 mkdir -p appdir/usr/share/icons/hicolor/128x128/apps/ ; touch appdir/usr/share/icons/hicolor/128x128/apps/imagemagick.png # FIXME
34 wget -c "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage"
35 chmod a+x linuxdeployqt*.AppImage
36 unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH
37 export VERSION=$(git rev-parse --short HEAD)-$CC
38 ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/imagemagick.desktop -bundle-non-qt-libs
39 ./linuxdeployqt*.AppImage --appimage-extract
40 rm ./appdir/AppRun ; cp AppRun appdir/ ; chmod a+x ./appdir/AppRun # Replace symlink with custom script
41 PATH=./squashfs-root/usr/bin:$PATH ./squashfs-root/usr/bin/appimagetool -g ./appdir/
probonopd4b458302017-11-09 19:32:56 +010042
43after_success:
44 - find ./appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq
Dirk Lemstra9161ef32018-01-09 21:06:36 +010045 - if [ "$TRAVIS_BRANCH" == "$TRAVIS_TAG" ] ; then wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh ; bash upload.sh ImageMagick*AppImage* ; fi
46 - if [ "$TRAVIS_BRANCH" != "$TRAVIS_TAG" ] ; then curl --upload-file ./ImageMagick*.AppImage https://transfer.sh/ImageMagick-git.$(git rev-parse --short HEAD)-x86_64.AppImage ; fi