From 879290aa2b7d52a6cda72c95005d34b23e7dd5cf Mon Sep 17 00:00:00 2001 From: liushuyu Date: Tue, 7 Aug 2018 22:54:57 +0800 Subject: [PATCH] travis: use prebuilt image (#3839) * travis: use prebuilt image * travis: use prebuilt image (MinGW) --- .travis/linux-frozen/build.sh | 4 ++-- .travis/linux-frozen/docker.sh | 17 ----------------- .travis/linux-mingw/build.sh | 2 +- .travis/linux-mingw/deps.sh | 2 +- .travis/linux-mingw/docker.sh | 11 ----------- .travis/linux/build.sh | 2 +- .travis/linux/deps.sh | 2 +- .travis/linux/docker.sh | 3 --- .travis/transifex/build.sh | 2 +- .travis/transifex/deps.sh | 2 +- .travis/transifex/docker.sh | 6 ------ 11 files changed, 8 insertions(+), 45 deletions(-) diff --git a/.travis/linux-frozen/build.sh b/.travis/linux-frozen/build.sh index d849ceaf2..287babcce 100755 --- a/.travis/linux-frozen/build.sh +++ b/.travis/linux-frozen/build.sh @@ -1,4 +1,4 @@ #!/bin/bash -ex mkdir -p "$HOME/.ccache" -docker pull ubuntu:18.04 -docker run --env-file .travis/common/travis-ci.env -v $(pwd):/citra -v "$HOME/.ccache":/root/.ccache ubuntu:18.04 /bin/bash -ex /citra/.travis/linux-frozen/docker.sh +docker pull citraemu/build-environments:linux-frozen +docker run --env-file .travis/common/travis-ci.env -v $(pwd):/citra -v "$HOME/.ccache":/root/.ccache citraemu/build-environments:linux-frozen /bin/bash -ex /citra/.travis/linux-frozen/docker.sh diff --git a/.travis/linux-frozen/docker.sh b/.travis/linux-frozen/docker.sh index 60288e542..fca1419f6 100755 --- a/.travis/linux-frozen/docker.sh +++ b/.travis/linux-frozen/docker.sh @@ -2,23 +2,6 @@ cd /citra -apt-get update -apt-get install -y build-essential wget git python-launchpadlib ccache - -# Install specific versions of packages with their dependencies -# The apt repositories remove older versions regularly, so we can't use -# apt-get and have to pull the packages directly from the archives. -# qt5-qmltooling-plugins and qtdeclarative5-dev are required for qtmultimedia5-dev -/citra/.travis/linux-frozen/install_package.py \ - libsdl2-dev 2.0.7+dfsg1-3ubuntu1 bionic \ - qtbase5-dev 5.9.3+dfsg-0ubuntu2 bionic \ - libqt5opengl5-dev 5.9.3+dfsg-0ubuntu2 bionic \ - qt5-qmltooling-plugins 5.9.3-0ubuntu1 bionic \ - qtdeclarative5-dev 5.9.3-0ubuntu1 bionic \ - qtmultimedia5-dev 5.9.3-0ubuntu3 bionic \ - libicu57 57.1-6ubuntu0.2 bionic \ - cmake 3.10.2-1ubuntu2 bionic - mkdir build && cd build cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON make -j4 diff --git a/.travis/linux-mingw/build.sh b/.travis/linux-mingw/build.sh index 161c244ee..d05cbb888 100755 --- a/.travis/linux-mingw/build.sh +++ b/.travis/linux-mingw/build.sh @@ -1,3 +1,3 @@ #!/bin/bash -ex mkdir "$HOME/.ccache" || true -docker run --env-file .travis/common/travis-ci.env -e ENABLE_COMPATIBILITY_REPORTING -v $(pwd):/citra -v "$HOME/.ccache":/root/.ccache ubuntu:18.04 /bin/bash -ex /citra/.travis/linux-mingw/docker.sh +docker run --env-file .travis/common/travis-ci.env -v $(pwd):/citra -v "$HOME/.ccache":/root/.ccache citraemu/build-environments:linux-mingw /bin/bash -ex /citra/.travis/linux-mingw/docker.sh diff --git a/.travis/linux-mingw/deps.sh b/.travis/linux-mingw/deps.sh index 540bb934a..20eb01fb9 100755 --- a/.travis/linux-mingw/deps.sh +++ b/.travis/linux-mingw/deps.sh @@ -1,3 +1,3 @@ #!/bin/sh -ex -docker pull ubuntu:18.04 +docker pull citraemu/build-environments:linux-mingw diff --git a/.travis/linux-mingw/docker.sh b/.travis/linux-mingw/docker.sh index c7910e9f4..e95db31e6 100755 --- a/.travis/linux-mingw/docker.sh +++ b/.travis/linux-mingw/docker.sh @@ -1,17 +1,6 @@ #!/bin/bash -ex cd /citra -MINGW_PACKAGES="sdl2-mingw-w64 qt5base-mingw-w64 qt5tools-mingw-w64 libsamplerate-mingw-w64 qt5multimedia-mingw-w64" -apt-get update -apt-get install -y gpg wget git python3-pip ccache g++-mingw-w64-x86-64 gcc-mingw-w64-x86-64 mingw-w64-tools cmake -# HACK: the repository does not contain necessary packages for 18.04, we'll use packages for 17.10 for now -echo 'deb http://ppa.launchpad.net/tobydox/mingw-w64/ubuntu artful main ' > /etc/apt/sources.list.d/extras.list -apt-key adv --keyserver keyserver.ubuntu.com --recv '72931B477E22FEFD47F8DECE02FE5F12ADDE29B2' -apt-get update -apt-get install -y ${MINGW_PACKAGES} - -# fix a problem in current MinGW headers -wget -q https://github.com/Alexpux/mingw-w64/raw/d0d7f784833bbb0b2d279310ddc6afb52fe47a46/mingw-w64-headers/crt/errno.h -O /usr/x86_64-w64-mingw32/include/errno.h # override Travis CI unreasonable ccache size echo 'max_size = 3.0G' > "$HOME/.ccache/ccache.conf" diff --git a/.travis/linux/build.sh b/.travis/linux/build.sh index 499d15b1b..72f6f84b2 100755 --- a/.travis/linux/build.sh +++ b/.travis/linux/build.sh @@ -1,3 +1,3 @@ #!/bin/bash -ex mkdir -p "$HOME/.ccache" -docker run --env-file .travis/common/travis-ci.env -v $(pwd):/citra -v "$HOME/.ccache":/root/.ccache ubuntu:18.04 /bin/bash -ex /citra/.travis/linux/docker.sh +docker run --env-file .travis/common/travis-ci.env -v $(pwd):/citra -v "$HOME/.ccache":/root/.ccache citraemu/build-environments:linux-fresh /bin/bash -ex /citra/.travis/linux/docker.sh diff --git a/.travis/linux/deps.sh b/.travis/linux/deps.sh index 540bb934a..1db4ac519 100755 --- a/.travis/linux/deps.sh +++ b/.travis/linux/deps.sh @@ -1,3 +1,3 @@ #!/bin/sh -ex -docker pull ubuntu:18.04 +docker pull citraemu/build-environments:linux-fresh diff --git a/.travis/linux/docker.sh b/.travis/linux/docker.sh index bf96b19e7..7828c2b62 100755 --- a/.travis/linux/docker.sh +++ b/.travis/linux/docker.sh @@ -2,9 +2,6 @@ cd /citra -apt-get update -apt-get install -y build-essential libsdl2-dev qtbase5-dev libqt5opengl5-dev qtmultimedia5-dev qttools5-dev qttools5-dev-tools wget git ccache cmake - mkdir build && cd build cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=/usr/lib/ccache/gcc -DCMAKE_CXX_COMPILER=/usr/lib/ccache/g++ -DENABLE_QT_TRANSLATION=ON -DCITRA_ENABLE_COMPATIBILITY_REPORTING=${ENABLE_COMPATIBILITY_REPORTING:-"OFF"} -DENABLE_COMPATIBILITY_LIST_DOWNLOAD=ON make -j4 diff --git a/.travis/transifex/build.sh b/.travis/transifex/build.sh index 7778e9a91..f2eb544f0 100755 --- a/.travis/transifex/build.sh +++ b/.travis/transifex/build.sh @@ -1,3 +1,3 @@ #!/bin/bash -e -docker run -e TRANSIFEX_API_TOKEN="${TRANSIFEX_API_TOKEN}" -v "$(pwd)":/citra alpine /bin/sh -e /citra/.travis/transifex/docker.sh +docker run -e TRANSIFEX_API_TOKEN="${TRANSIFEX_API_TOKEN}" -v "$(pwd)":/citra citraemu/build-environments:linux-transifex /bin/sh -e /citra/.travis/transifex/docker.sh diff --git a/.travis/transifex/deps.sh b/.travis/transifex/deps.sh index 16991bd3d..5b8f249c5 100755 --- a/.travis/transifex/deps.sh +++ b/.travis/transifex/deps.sh @@ -1,3 +1,3 @@ #!/bin/bash -ex -docker pull alpine:latest +docker pull citraemu/build-environments:linux-transifex diff --git a/.travis/transifex/docker.sh b/.travis/transifex/docker.sh index 88913ba9e..003b298b6 100644 --- a/.travis/transifex/docker.sh +++ b/.travis/transifex/docker.sh @@ -5,12 +5,6 @@ echo $'[https://www.transifex.com]\nhostname = https://www.transifex.com\nuserna set -x -echo -e "\e[1m\e[33mInstalling dependencies...\e[0m" -apk update -apk add build-base cmake python3-dev qt5-qttools-dev qt5-qtmultimedia-dev - -pip3 install --upgrade pip transifex-client - cat << 'EOF' > /usr/bin/tx #!/usr/bin/python3