From 8ff174b42d001c021cbc3beb663d4230c0daf13d Mon Sep 17 00:00:00 2001 From: Nolan Lawson Date: Sun, 11 Nov 2018 21:34:59 -0800 Subject: [PATCH] chore(travis): download ffmpeg static file (#636) --- .travis.yml | 1 + bin/setup-mastodon-in-travis.sh | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index e10664a..a9e0ec0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -67,3 +67,4 @@ cache: bundler: true directories: - /home/travis/.rvm/ + - /home/travis/ffmpeg-static/ diff --git a/bin/setup-mastodon-in-travis.sh b/bin/setup-mastodon-in-travis.sh index dee2b2a..bb3b26c 100755 --- a/bin/setup-mastodon-in-travis.sh +++ b/bin/setup-mastodon-in-travis.sh @@ -18,10 +18,18 @@ sudo mv redis.conf /etc/redis sudo service redis-server start echo PING | nc localhost 6379 # check redis running -# install ffmpeg from PPA because it's not in Trusty -sudo -E add-apt-repository -y ppa:mc3man/trusty-media -sudo -E apt-get update -sudo -E apt-get install -yq --no-install-suggests --no-install-recommends ffmpeg +# install ffmpeg because it's not in Trusty +if [ ! -f /home/travis/ffmpeg-static/ffmpeg ]; then + rm -fr /home/travis/ffmpeg-static + mkdir -p /home/travis/ffmpeg-static + curl -sL \ + -A 'https://github.com/nolanlawson/pinafore' \ + -o ffmpeg.tar.xz \ + 'https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-64bit-static.tar.xz' + tar -x -C /home/travis/ffmpeg-static --strip-components 1 -f ffmpeg.tar.xz --wildcards '*/ffmpeg' --wildcards '*/ffprobe' +fi +sudo ln -s /home/travis/ffmpeg-static/ffmpeg /usr/local/bin/ffmpeg +sudo ln -s /home/travis/ffmpeg-static/ffprobe /usr/local/bin/ffprobe # check versions ruby --version