This repository has been archived by the owner on Apr 30, 2021. It is now read-only.
forked from audacity/audacity
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
77 lines (71 loc) · 5.39 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
65
66
67
68
69
70
71
72
73
74
75
76
77
language: cpp
compiler: gcc
sudo: require
dist: trusty
env:
# JACK=yes FFMPEG=yes FLAC=no
# JACK=no FFMPEG=yes FLAC=no
# JACK=yes FFMPEG=no FLAC=no
# JACK=no FFMPEG=no FLAC=no
# JACK=yes FFMPEG=yes FLAC=yes
# JACK=no FFMPEG=yes FLAC=yes
- JACK=yes FFMPEG=no FLAC=yes
- JACK=no FFMPEG=no FLAC=yes
before_install:
- git clone https://github.com/audacity/audacity --depth 1 --shallow-submodules
- cd audacity
- cp ../000* .
- if [ "$JACK" == "yes" ] ; then patch -p1 < 0001-Fix-building-against-the-system-portaudio-library.patch ; fi # To be able to use --with-portaudio=system which is needed to pull in libjack.so.1
- sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test
- sudo add-apt-repository -y ppa:jonathonf/ffmpeg-3
- sudo apt-get update -qq
- sudo apt-get install -y autogen libasound2-dev libavcodec-dev libexpat1-dev libflac++-dev libid3tag0-dev libjack-dev liblilv-dev libmad0-dev libmp3lame-dev libogg-dev libportsmf-dev libsbsms-dev libsndfile1-dev libsoundtouch-dev libsoxr-dev libsuil-dev libtwolame-dev libvorbis-dev lv2-dev portaudio19-dev vamp-plugin-sdk libavcodec-dev libavformat-dev libswscale-dev libavutil-dev libswresample-dev libwxgtk3.0-dev libgtk2.0-dev gettext libasound2-dev alsa-utils alsa-oss gcc-4.9 g++-4.9 cpp-4.9
- git show -s --format="#define REV_LONG \"%H\"%n#define REV_TIME \"%cd\"%n" | tee ./src/RevisionIdent.h
- export CXX="g++-4.9" CC="gcc-4.9"
- FLAGS="-w -std=gnu++11"
- export CFLAGS="$CFLAGS $FLAGS"
- export CXXFLAGS="$CXXFLAGS $FLAGS"
- g++-4.9 --version
script:
- # Despite libsbsms-dev, getting:
- # configure: error: You requested using the system libraries for LIBSBSMS but they are not available
- # when using --with-sbsms=system
- # similarly, despite lv2-dev, getting:
- # configure: error: You requested using the system libraries for LV2 but they are not available
- # when using --with-lv2=system
- if [ "$JACK" == "yes" ] ; then PORTAUDIO="--with-portaudio=system" ; else PORTAUDIO="--with-portaudio=local" ; fi
- if [ "$FFMPEG" == "yes" ] ; then FFM="--with-ffmpeg=system" ; else FFM="--with-ffmpeg=local" ; fi
- if [ "$FLAC" == "yes" ] ; then FLACS="--with-libflac=system" ; fi
- if [ "$JACK" == "yes" ] || [ "$FFMPEG" == "yes" ] || [ "$FLAC" == "yes" ] ; then DYLD="--disable-dynamic-loading" ; fi
- time ./configure --prefix=/usr $DYLD --with-lib-preference="local system" $FFM $PORTAUDIO $FLACS --with-soundtouch=system # --with-expat=system --with-lame=system --with-libid3tag=system --with-libmad=system --with-libsndfile=system --with-libsoxr=system --with-libtwolame=system --with-libvamp=system --with-libvorbis=system --with-portsmf=system
- time make -j$(nproc)
- make install DESTDIR=$(readlink -f appdir) ; find appdir/
- strip appdir/usr/bin/audacity # FIXME: "make install" should do this automatically
- cp LICENSE.txt appdir/
- ( cd appdir/usr/share/audacity ; wget "https://github.com/probonopd/audacity/releases/download/manual/audacity-manual-2.2.1.zip" ; unzip *.zip ; rm *.zip )
- sed -i -e 's|^Exec=.*|Exec=audacity|g' appdir/usr/share/applications/audacity.desktop
- wget -c -q "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 uses this for naming the file
- if [ "$FFMPEG" == "yes" ] ; then sed -i -e 's|^Name=.*|& with FFMPEG|g' appdir/usr/share/applications/audacity.desktop ; fi
- if [ "$FLAC" == "yes" ] ; then sed -i -e 's|^Name=.*|& with FLAC|g' appdir/usr/share/applications/audacity.desktop ; fi
- if [ "$JACK" == "yes" ] ; then sed -i -e 's|^Name=.*|& for JACK|g' appdir/usr/share/applications/audacity.desktop ; fi
- ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -bundle-non-qt-libs
# Workaround to increase compatibility with older systems; see https://github.com/darealshinji/AppImageKit-checkrt for details
- mkdir -p appdir/usr/optional/ ; wget -c https://github.com/darealshinji/AppImageKit-checkrt/releases/download/continuous/exec-x86_64.so -O ./appdir/usr/optional/exec.so
- mkdir -p appdir/usr/optional/libstdc++/ ; cp /usr/lib/x86_64-linux-gnu/libstdc++.so.6 ./appdir/usr/optional/libstdc++/
- ( cd appdir/usr/ ; ln -s share/audacity/* . ) # Audacity loads e.g., nyquist/ from cwd # FIXME; https://sourceforge.net/p/audacity/mailman/message/36304847/
- ( cd appdir ; rm AppRun ; wget -c https://github.com/darealshinji/AppImageKit-checkrt/releases/download/continuous/AppRun-patched-x86_64 -O AppRun ; chmod a+x AppRun)
- if [ "$JACK" == "yes" ] ; then find ./appdir/ -ipath '*libjack*' -delete ; fi # The bundled libjack.so.1 refuses to work with the JACK on Ubuntu 17.10
- NAME=$(grep '^Name=.*' appdir/usr/share/applications/audacity.desktop | cut -d "=" -f 2 | sed -e 's|\ |_|g')
- ./linuxdeployqt*.AppImage ./appdir/usr/share/applications/*.desktop -appimage
after_success:
- find ./appdir -executable -type f -exec ldd {} \; | grep " => /usr" | cut -d " " -f 2-3 | sort | uniq
- # curl --upload-file ./APPNAME*.AppImage https://transfer.sh/APPNAME-git.$(git rev-parse --short HEAD)-x86_64.AppImage
- wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh
- bash upload.sh ./Audacity*.AppImage*
branches:
except:
- # Do not build tags that we create when we upload to GitHub Releases
- /^(?i:continuous)$/