From f7e6ffcbda088ec3ec7941d4c3ed520df049160a Mon Sep 17 00:00:00 2001 From: WangRunji Date: Mon, 16 Jul 2018 14:44:21 +0800 Subject: [PATCH] Try to fix travis for both arch --- .travis.yml | 38 ++++++++++++++++++++++++++++++++------ 1 file changed, 32 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index a2fef9e..504bf3e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,13 +2,39 @@ sudo: required language: rust -services: - - docker +rust: nightly-2018-06-25 + +cache: + cargo: true + +services: docker + +addons: + apt: + packages: + - nasm + - qemu + +env: + matrix: + - ARCH="riscv32" + - ARCH="x86_64" before_install: - - docker pull wangrunji0408/riscv-rust - - docker run -d -v $(pwd):$(pwd) -w $(pwd) wangrunji0408/riscv-rust \ - /bin/sh -c "make build arch=riscv32" + - if [ $ARCH = riscv32 ]; then + docker pull wangrunji0408/riscv-rust; + fi + +before_script: + - rustup component add rust-src + - (test -x $HOME/.cargo/bin/cargo-install-update || cargo install cargo-update) + - (test -x $HOME/.cargo/bin/xargo || cargo install xargo) + - cargo install-update -a script: -- bundle exec rake test + - if [ $ARCH = riscv32 ]; then + docker run -v $(pwd):$(pwd) -w $(pwd) wangrunji0408/riscv-rust + bash -c "cd kernel && make patch-core && make build arch=riscv32"; + elif [ $ARCH = x86_64 ]; then + cd kernel && make build arch=x86_64; + fi