run in xenial (docker)

This commit is contained in:
Jorge Aparicio 2016-08-08 20:37:04 -05:00
parent 6c835ef73e
commit 8f85ab545d
4 changed files with 32 additions and 8 deletions

View File

@ -63,6 +63,7 @@ matrix:
- env: TARGET=powerpc64le-unknown-linux-gnu - env: TARGET=powerpc64le-unknown-linux-gnu
os: linux os: linux
dist: trusty dist: trusty
services: docker
sudo: required sudo: required
addons: addons:
apt: apt:

View File

@ -29,6 +29,7 @@ case $TARGET in
export QEMU_LD_PREFIX=/usr/powerpc-linux-gnu export QEMU_LD_PREFIX=/usr/powerpc-linux-gnu
;; ;;
powerpc64le-unknown-linux-gnu) powerpc64le-unknown-linux-gnu)
export DOCKER=y
export PREFIX=powerpc64le-linux-gnu- export PREFIX=powerpc64le-linux-gnu-
export QEMU=qemu-ppc64le export QEMU=qemu-ppc64le
export QEMU_LD_PREFIX=/usr/powerpc64le-linux-gnu export QEMU_LD_PREFIX=/usr/powerpc64le-linux-gnu

View File

@ -2,6 +2,15 @@ set -ex
. $(dirname $0)/env.sh . $(dirname $0)/env.sh
install_qemu() {
case $TARGET in
powerpc64-unknown-linux-gnu)
sudo apt-get install -y --no-install-recommends \
qemu-user
;;
esac
}
install_binutils() { install_binutils() {
case $TRAVIS_OS_NAME in case $TRAVIS_OS_NAME in
osx) osx)
@ -49,11 +58,14 @@ EOF
} }
main() { main() {
if [[ -z $DOCKER ]]; then
install_qemu
install_binutils install_binutils
install_c_toolchain install_c_toolchain
install_rust install_rust
add_rustup_target add_rustup_target
configure_cargo configure_cargo
fi
} }
main main

View File

@ -32,9 +32,19 @@ inspect() {
} }
main() { main() {
if [[ $DOCKER ]]; then
docker run \
-e TARGET=$TARGET \
-e TRAVIS_OS_NAME=$TRAVIS_OS_NAME \
-v $(pwd)/ci:/mnt \
ubuntu:16.04 \
sh -c "bash /mnt/install.sh; bash /mnt/script.sh"
else
build build
run_tests run_tests
inspect inspect
fi
} }
main main