diff --git a/.travis.yml b/.travis.yml index e03fe5e..9c5a117 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,10 +1,5 @@ dist: trusty sudo: required -language: rust -rust: - - stable - - nightly - - 1.27.0 addons: apt: packages: @@ -16,17 +11,39 @@ addons: - pkg-config - yasm matrix: + include: + - language: rust + rust: stable + env: FFMPEG_VERSION=3.4.4 + install: + - ci/install-ffmpeg.sh + script: + - ci/script-rust.sh + - language: rust + rust: nightly + env: FFMPEG_VERSION=3.4.4 + install: + - ci/install-ffmpeg.sh + script: + - ci/script-rust.sh + - language: rust + rust: 1.27.0 + env: FFMPEG_VERSION=3.4.4 + install: + - ci/install-ffmpeg.sh + script: + - ci/script-rust.sh + - language: node_js + node_js: "8" + script: + - yarn + - yarn build + - node_modules/eslint/bin/eslint.js ui-src allow_failures: - rust: nightly cache: cargo: true + yarn: true directories: - ffmpeg-3.4.4 timeout: 600 -install: - - test -f ffmpeg-3.4.4/configure || (wget https://ffmpeg.org/releases/ffmpeg-3.4.4.tar.xz && tar xf ffmpeg-3.4.4.tar.xz) - - pushd ffmpeg-3.4.4 && ./configure --enable-shared && make --jobs=2 && sudo make install --jobs=2&& sudo ldconfig && rm -f ffbuild/config.log && popd -script: - - cargo build --all - - cargo test --all - - 'if [ $TRAVIS_RUST_VERSION = nightly ]; then cargo bench --all; fi' diff --git a/ci/install-ffmpeg.sh b/ci/install-ffmpeg.sh new file mode 100755 index 0000000..591438a --- /dev/null +++ b/ci/install-ffmpeg.sh @@ -0,0 +1,13 @@ +#!/bin/bash -e +if [ ! -f ffmpeg-${FFMPEG_VERSION}/configure ]; then + wget https://ffmpeg.org/releases/ffmpeg-${FFMPEG_VERSION}.tar.xz + tar xf ffmpeg-${FFMPEG_VERSION}.tar.xz +fi +cd ffmpeg-${FFMPEG_VERSION} +./configure --enable-shared +make --jobs=2 +sudo make install --jobs=2 +sudo ldconfig + +# The build log varies with each invocation; remove it to improve cachability. +rm -f ffbuild/config.log diff --git a/ci/script-rust.sh b/ci/script-rust.sh new file mode 100755 index 0000000..6582551 --- /dev/null +++ b/ci/script-rust.sh @@ -0,0 +1,6 @@ +#!/bin/bash -e +cargo build --all +cargo test --all +if [ "$TRAVIS_RUST_VERSION" = nightly ]; then + cargo bench --all +fi