diff --git a/sys/.travis.yml b/sys/.travis.yml index 978c7d1..c7e14d5 100644 --- a/sys/.travis.yml +++ b/sys/.travis.yml @@ -1,39 +1,33 @@ -sudo: required -dist: trusty - -language: rust -rust: - - stable - - beta - - nightly -matrix: - allow_failures: - - rust: nightly -addons: - apt: - packages: - - build-essential -before_install: - - sudo apt-get update -q - # From https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu - - sudo apt-get -y --force-yes install autoconf automake build-essential libass-dev libfreetype6-dev libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev pkg-config texinfo zlib1g-dev - - sudo apt-get install yasm - - pushd ~ - - git clone https://github.com/FFmpeg/FFmpeg.git - - cd FFmpeg - - git checkout release/3.2 - - mkdir ~/FFmpeg-build - - cd ~/FFmpeg-build - - ../FFmpeg/configure --disable-ffprobe --disable-ffserver --disable-doc --enable-avresample - - make -j - - sudo make install - - make distclean - - popd - -script: | - # Current Travis Ubuntu version uses libav which doesn't come with libswresample - cargo build --verbose --no-default-features --features "avcodec avfilter avformat avresample swscale" && - cargo test --verbose --no-default-features --features "avcodec avfilter avformat avresample swscale" - -after_failure: - - find /usr -type f 2>/dev/null | grep -E 'lib(avcodec/version|avcodec/avcodec).h$' | xargs -I THEFILE -- sh -c 'echo "=== THEFILE ==="; cat THEFILE' +sudo: required +language: rust +rust: + - stable + - beta + - nightly +os: + - linux + - osx +matrix: + allow_failures: + - rust: nightly +addons: + apt: + packages: + - build-essential +before_install: + - if [[ $TRAVIS_OS_NAME == 'linux' ]]; then ./.travis/install_linux.sh; fi + - if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew update; fi + - if [[ $TRAVIS_OS_NAME == 'osx' ]]; then brew install yasm; fi + +script: | + if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then + # Current Travis Ubuntu version uses libav which doesn't come with libswresample + cargo build --verbose --no-default-features --features "avcodec avfilter avformat avresample swscale" && + cargo test --verbose --no-default-features --features "avcodec avfilter avformat avresample swscale" + else + travis_wait cargo build --verbose --features "build" + cargo test --verbose --features "build" + fi + +after_failure: + - find /usr -type f 2>/dev/null | grep -E 'lib(avcodec/version|avcodec/avcodec).h$' | xargs -I THEFILE -- sh -c 'echo "=== THEFILE ==="; cat THEFILE' diff --git a/sys/.travis/install_linux.sh b/sys/.travis/install_linux.sh new file mode 100644 index 0000000..96dc5ec --- /dev/null +++ b/sys/.travis/install_linux.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +sudo apt-get update -q +# From https://trac.ffmpeg.org/wiki/CompilationGuide/Ubuntu +sudo apt-get -y --force-yes install autoconf automake build-essential libass-dev libfreetype6-dev libsdl1.2-dev libtheora-dev libtool libva-dev libvdpau-dev libvorbis-dev libxcb1-dev libxcb-shm0-dev libxcb-xfixes0-dev pkg-config texinfo zlib1g-dev +sudo apt-get install yasm +pushd ~ +git clone https://github.com/FFmpeg/FFmpeg.git +cd FFmpeg +git checkout release/3.2 +mkdir ~/FFmpeg-build +cd ~/FFmpeg-build +../FFmpeg/configure --disable-ffprobe --disable-ffserver --disable-doc --enable-avresample +make -j +sudo make install +make distclean +popd