1
0
mirror of https://github.com/rcore-os/rCore.git synced 2024-11-22 16:16:16 +04:00
rCore/.travis.yml
Runji Wang 590df849f3 update Rust toolchain and README
NOTE: MIPS is broken due to a Rust compiler bug
2019-09-11 23:58:52 +08:00

70 lines
1.9 KiB
YAML

sudo: false
dist: xenial
language: rust
rust: nightly-2019-09-01
os:
- linux
- osx
cache:
cargo: true
directories:
- $HOME/Library/Caches/Homebrew
- $TRAVIS_BUILD_DIR/qemu-4.1.0
addons:
homebrew:
packages:
- qemu
env:
matrix:
- ARCH="riscv64"
- ARCH="riscv64" OPTS="board=u540"
- ARCH="riscv64" OPTS="board=k210"
- ARCH="riscv64" OPTS="board=rocket_chip"
- ARCH="riscv32"
- ARCH="x86_64"
- ARCH="x86_64" OPTS="board=pc"
- ARCH="aarch64"
- ARCH="mipsel" OPTS="board=malta"
install:
- if [ $TRAVIS_OS_NAME = linux ]; then
wget https://download.qemu.org/qemu-4.1.0.tar.xz && tar xJf qemu-4.1.0.tar.xz > /dev/null && cd qemu-4.1.0 && ./configure --target-list=$ARCH-softmmu && make && cd ..;
export PATH=$PATH:$PWD/qemu-4.1.0/$ARCH-softmmu:$PWD/qemu-4.1.0;
sudo apt update;
sudo apt install device-tree-compiler -y;
fi
- if [ 1 ]; then
[ $ARCH = riscv32 ] && export FILE="riscv32-linux-musl-cross";
[ $ARCH = riscv64 ] && export FILE="riscv64-linux-musl-cross";
[ $ARCH = mipsel ] && export FILE="mipsel-linux-musln32-cross";
[ $ARCH = aarch64 ] && export FILE="aarch64-linux-musl-cross";
[ $ARCH = x86_64 ] && export FILE="x86_64-linux-musl-cross";
if [ $TRAVIS_OS_NAME = linux ]; then
wget https://musl.cc/$FILE.tgz;
elif [ $TRAVIS_OS_NAME = osx ]; then
wget https://mac.musl.cc/$FILE.tgz;
fi;
tar -xf $FILE.tgz;
export PATH=$PATH:$PWD/$FILE/bin;
fi
before_script:
- rustup component add rust-src llvm-tools-preview
- (test -x $HOME/.cargo/bin/cargo-objdump || cargo install cargo-binutils)
- (test -x $HOME/.cargo/bin/cargo-xbuild || cargo install cargo-xbuild)
script:
- cd user && make sfsimg arch=$ARCH && cd ..
- cd kernel && make build arch=$ARCH $OPTS && cd ..
- if [ $ARCH = riscv32 ]; then
cd tests && ./test.sh && cd ..;
fi