diff --git a/.travis.yml b/.travis.yml index 37f8ad4..77db788 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,19 +1,18 @@ language: go -install: +cache: + directories: + - $HOME/opus + +before_script: - export PATH=$PATH:~/bin/ - - wget http://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz - - tar -xvf ffmpeg-release-64bit-static.tar.xz --strip 1 --no-anchored ffmpeg ffprobe - - chmod a+rx ffmpeg - - chmod a+rx ffprobe - - mv ffmpeg ~/bin/ffmpeg - - mv ffprobe ~/bin/ffprobe - - wget http://downloads.xiph.org/releases/opus/opus-1.0.3.tar.gz - - tar xzvf opus-1.0.3.tar.gz - - cd opus-1.0.3 - - ./configure - - make - - make install - - cd .. + - wget http://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz -O /tmp/ffmpeg.tar.xz + - tar -xvf /tmp/ffmpeg.tar.xz --strip 1 --no-anchored ffmpeg ffprobe + - chmod a+rx ffmpeg ffprobe + - mv ff* ~/bin - curl https://yt-dl.org/downloads/2015.07.28/youtube-dl -o ~/bin/youtube-dl - - chmod a+rx ~/bin/youtube-dl \ No newline at end of file + - chmod a+rx ~/bin/youtube-dl + - bash install-opus.sh + +install: + - ls -R $HOME/opus diff --git a/install-opus.sh b/install-opus.sh new file mode 100644 index 0000000..cf818c4 --- /dev/null +++ b/install-opus.sh @@ -0,0 +1,10 @@ +#!/bin/sh +set -e +# check to see if opus folder is empty +if [ ! -d "$HOME/opus/lib" ]; then + wget http://downloads.xiph.org/releases/opus/opus-1.0.3.tar.gz + tar xzvf opus-1.0.3.tar.gz + cd opus-1.0.3 && ./configure --prefix=$HOME/opus && make && make install +else + echo 'Using cached directory.'; +fi \ No newline at end of file