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 #!/bin/sh
set -ev 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 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 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.xz
7z x ffmpeg-release-32bit-static.tar 7z x ffmpeg-release-32bit-static.tar
chmod +x ./ffmpeg-2.6.3-32bit-static/ffmpeg 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 ./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 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 if [ -n "$VALGRIND_TEST" ]; then
cd src 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 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 elif [ -n "$EXPECTED_STATUS" ]; then
cd src cd src
make make -e
set +e set +e
./kvazaar $PARAMS ./kvazaar $PARAMS
EXIT_STATUS=$? EXIT_STATUS=$?
@ -15,6 +15,6 @@ elif [ -n "$EXPECTED_STATUS" ]; then
[ "$EXIT_STATUS" = "$EXPECTED_STATUS" ] [ "$EXIT_STATUS" = "$EXPECTED_STATUS" ]
else else
cd src cd src
make make -e
make tests make -e tests
fi fi

View file

@ -1,20 +1,13 @@
language: c language: c
#os:
# - linux
# - osx
compiler:
- gcc
env: env:
global: global:
- USE_YASM=1 - AS=nasm
- TEST_FRAMES=10
- TEST_DIM=264x130
- KVZ_DISABLE_AVX2=1 - KVZ_DISABLE_AVX2=1
- TEST_DIM=264x130
- TEST_FRAMES=10
sudo: required sudo: false
matrix: matrix:
fast_finish: true fast_finish: true
@ -22,7 +15,8 @@ matrix:
include: include:
- compiler: clang - compiler: clang
env: KVZ_DISABLE_AVX2="" 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 # 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.
@ -56,9 +50,17 @@ matrix:
# Tests trying to use invalid input dimensions # Tests trying to use invalid input dimensions
- env: EXPECTED_STATUS=1 PARAMS="-i kvazaar --input-res=1x65 -o /dev/null" - env: EXPECTED_STATUS=1 PARAMS="-i kvazaar --input-res=1x65 -o /dev/null"
before_install: addons:
# Work around a weird bug in Travis-ci, where compiler is set wrong. apt:
- if [ "$CC" = "[gcc]" ]; then export CC=gcc; gcc --version; fi sources:
- ubuntu-toolchain-r-test
packages:
- gcc
- gcc-4.8
- nasm
- p7zip-full
- valgrind
install: install:
- source .travis-install.sh - source .travis-install.sh