Migrate to container-based travis infrastructure.

- Moves travis package installations to addons.apt.packages.
- Disables sudo in travis configuration.
- Substitutes nasm for yasm in travis builds since yasm is not available
  on travis.
This commit is contained in:
Arttu Ylä-Outinen 2015-07-17 14:12:50 +03:00
parent 59f95b8e73
commit 7a12f6c8d4
3 changed files with 22 additions and 35 deletions

View file

@ -1,25 +1,10 @@
#!/bin/sh
set -ev
if [ -n "$USE_NEW_GCC" ]; then
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y > /dev/null
sudo apt-get update -qq
sudo apt-get install -qq gcc-4.8
export CC=gcc-4.8
else
sudo apt-get update -qq
fi
if [ -n "$VALGRIND_TEST" ]; then
sudo apt-get install -qq valgrind
sudo apt-get install -qq p7zip-full
wget http://ultravideo.cs.tut.fi/ffmpeg-release-32bit-static.tar.xz
7z x ffmpeg-release-32bit-static.tar.xz
7z x ffmpeg-release-32bit-static.tar
chmod +x ./ffmpeg-2.6.3-32bit-static/ffmpeg
./ffmpeg-2.6.3-32bit-static/ffmpeg -f lavfi -i "mandelbrot=size=${TEST_DIM}:end_pts=10" -vframes $TEST_FRAMES -pix_fmt yuv420p mandelbrot_${TEST_DIM}.yuv
fi
if [ -n "$USE_YASM" ]; then
sudo apt-get install -qq yasm
fi

View file

@ -3,11 +3,11 @@ set -ev
if [ -n "$VALGRIND_TEST" ]; then
cd src
make debug
make -e debug
valgrind --leak-check=full --error-exitcode=1 ./kvazaar_debug -i ../mandelbrot_${TEST_DIM}.yuv --input-res=${TEST_DIM} -o /dev/null $VALGRIND_TEST
elif [ -n "$EXPECTED_STATUS" ]; then
cd src
make
make -e
set +e
./kvazaar $PARAMS
EXIT_STATUS=$?
@ -15,6 +15,6 @@ elif [ -n "$EXPECTED_STATUS" ]; then
[ "$EXIT_STATUS" = "$EXPECTED_STATUS" ]
else
cd src
make
make tests
make -e
make -e tests
fi

View file

@ -1,20 +1,13 @@
language: c
#os:
# - linux
# - osx
compiler:
- gcc
env:
global:
- USE_YASM=1
- TEST_FRAMES=10
- TEST_DIM=264x130
- AS=nasm
- KVZ_DISABLE_AVX2=1
- TEST_DIM=264x130
- TEST_FRAMES=10
sudo: required
sudo: false
matrix:
fast_finish: true
@ -22,10 +15,11 @@ matrix:
include:
- compiler: clang
env: KVZ_DISABLE_AVX2=""
- env: USE_NEW_GCC=1 KVZ_DISABLE_AVX2=""
- compiler: gcc-4.8
env: KVZ_DISABLE_AVX2=""
# These valgrind tests are slow, so they are performed with the minimum
# number of small frames and fast settings.
# number of small frames and fast settings.
# Tests for owf, wpp and tiles. There is lots of separate branches of
# code related to owf=0 and owf!=0, which is why all permutations are
@ -56,9 +50,17 @@ matrix:
# Tests trying to use invalid input dimensions
- env: EXPECTED_STATUS=1 PARAMS="-i kvazaar --input-res=1x65 -o /dev/null"
before_install:
# Work around a weird bug in Travis-ci, where compiler is set wrong.
- if [ "$CC" = "[gcc]" ]; then export CC=gcc; gcc --version; fi
addons:
apt:
sources:
- ubuntu-toolchain-r-test
packages:
- gcc
- gcc-4.8
- nasm
- p7zip-full
- valgrind
install:
- source .travis-install.sh