all repos — mgba @ 5874235c2d7a2cfb11320a8fee575cc1be7506f3

mGBA Game Boy Advance Emulator

Travis: Use docker containers for applicable builds
Vicki Pfau vi@endrift.com
Thu, 05 Jul 2018 20:50:56 -0700
commit

5874235c2d7a2cfb11320a8fee575cc1be7506f3

parent

cc0d582b38119d195b3e23a348562c812f76fd9a

2 files changed, 23 insertions(+), 22 deletions(-)

jump to
M .travis-deps.sh.travis-deps.sh

@@ -2,19 +2,4 @@ #!/bin/sh

if [ $TRAVIS_OS_NAME = "osx" ]; then brew update brew install qt5 ffmpeg imagemagick sdl2 libedit libelf libpng libzip -else - sudo apt-get clean - sudo add-apt-repository -y ppa:beineri/opt-qt542-trusty - sudo add-apt-repository -y ppa:george-edison55/cmake-3.x - sudo add-apt-repository -y ppa:ubuntu-toolchain-r/test - sudo apt-get update - sudo apt-get install -y -q cmake libedit-dev libelf-dev libmagickwand-dev \ - libpng-dev libsdl2-dev libzip-dev qt54base qt54multimedia \ - libavcodec-dev libavutil-dev libavformat-dev libavresample-dev \ - libswscale-dev - if [ "$CC" == "gcc" ]; then - sudo apt-get install -y -q gcc-5 g++-5 - export CC=gcc-5 - export CXX=g++-5 - fi fi
M .travis.yml.travis.yml

@@ -1,14 +1,30 @@

+if: type = pull_request OR NOT branch =~ /^(master$|optimization)/ OR fork language: c sudo: required +services: +- docker +os: linux +env: +- DOCKER_TAG=ubuntu:xenial +- DOCKER_TAG=ubuntu:artful +- DOCKER_TAG=ubuntu:bionic +- DOCKER_TAG=3ds +- DOCKER_TAG=wii +- DOCKER_TAG=vita +- DOCKER_TAG=windows:w32 +- DOCKER_TAG=windows:w64 + matrix: include: - - os: linux - dist: trusty - compiler: gcc - - os: osx - compiler: clang + - os: osx + compiler: clang + env: DOCKER_TAG= before_install: - - source ./.travis-deps.sh +- '[ -z "$DOCKER_TAG" ] || docker pull mgba/$DOCKER_TAG' +- '[ "$TRAVIS_OS_NAME" != "osx" ] || . ./.travis-deps.sh' +- 'mkdir build && chmod 777 build' -script: mkdir build && cd build && cmake -DCMAKE_PREFIX_PATH='/usr/local/opt/qt5;/opt/qt54' .. && make -j2 +script: +- '[ -z "$DOCKER_TAG" ] || docker run -e BUILD_DIR=build -e MAKEFLAGS=-j2 -v $PWD:/home/mgba/src mgba/$DOCKER_TAG' +- '[ "$TRAVIS_OS_NAME" != "osx" ] || (cd build && cmake -DCMAKE_PREFIX_PATH="/usr/local/opt/qt5" .. && make -j2)'