You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
109 lines
3.2 KiB
109 lines
3.2 KiB
sudo: false
|
|
|
|
dist: xenial
|
|
|
|
language: rust
|
|
|
|
rust: nightly-2019-03-05
|
|
|
|
os:
|
|
- linux
|
|
# - osx # too slow and hard to fix, skip it for now
|
|
|
|
cache:
|
|
cargo: true
|
|
directories:
|
|
- $HOME/Library/Caches/Homebrew
|
|
- $TRAVIS_BUILD_DIR/qemu-3.1.0
|
|
|
|
addons:
|
|
homebrew:
|
|
packages:
|
|
- qemu
|
|
|
|
env:
|
|
matrix:
|
|
- ARCH="riscv64"
|
|
- ARCH="riscv64" OPTS="board=u540"
|
|
- ARCH="riscv32"
|
|
- ARCH="x86_64"
|
|
- ARCH="aarch64"
|
|
|
|
matrix:
|
|
allow_failures:
|
|
- env: ARCH="aarch64"
|
|
- os: osx
|
|
|
|
install:
|
|
- if [ $ARCH = riscv32 ] || [ $ARCH = riscv64 ]; then
|
|
[ $TRAVIS_OS_NAME = linux ] && export FILE="riscv64-unknown-elf-gcc-8.1.0-2019.01.0-x86_64-linux-ubuntu14";
|
|
[ $TRAVIS_OS_NAME = osx ] && export FILE="riscv64-unknown-elf-gcc-8.1.0-2019.01.0-x86_64-apple-darwin";
|
|
wget https://static.dev.sifive.com/dev-tools/$FILE.tar.gz;
|
|
tar xf $FILE.tar.gz;
|
|
export PATH=$PATH:$PWD/$FILE/bin;
|
|
fi
|
|
- if [ $ARCH = aarch64 ]; then
|
|
if [ $TRAVIS_OS_NAME = linux ]; then
|
|
export FILE="gcc-arm-8.2-2018.11-x86_64-aarch64-elf";
|
|
wget https://developer.arm.com/-/media/Files/downloads/gnu-a/8.2-2018.11/$FILE.tar.xz;
|
|
tar -xvf $FILE.tar.xz;
|
|
export PATH=$PATH:$PWD/$FILE/bin;
|
|
wget https://musl.cc/aarch64-linux-musl-cross.tgz;
|
|
tar -xvf aarch64-linux-musl-cross.tgz;
|
|
export PATH=$PATH:$PWD/aarch64-linux-musl-cross/bin;
|
|
elif [ $TRAVIS_OS_NAME = osx ]; then
|
|
brew tap SergioBenitez/osxct;
|
|
brew install aarch64-none-elf;
|
|
fi;
|
|
fi
|
|
- if [ $ARCH = x86_64 ]; then
|
|
if [ $TRAVIS_OS_NAME = linux ]; then
|
|
sudo apt update;
|
|
sudo apt install linux-headers-$(uname -r);
|
|
wget https://musl.cc/x86_64-linux-musl-cross.tgz;
|
|
tar -xvf x86_64-linux-musl-cross.tgz;
|
|
export PATH=$PATH:$PWD/x86_64-linux-musl-cross/bin;
|
|
fi;
|
|
fi
|
|
|
|
- if [ $TRAVIS_OS_NAME = linux ]; then
|
|
wget https://download.qemu.org/qemu-3.1.0.tar.xz && tar xvJf qemu-3.1.0.tar.xz > /dev/null && cd qemu-3.1.0 && ./configure --target-list=$ARCH-softmmu && make && cd ..;
|
|
export PATH=$PATH:$PWD/qemu-3.1.0/$ARCH-softmmu:$PWD/qemu-3.1.0;
|
|
sudo apt update;
|
|
sudo apt install libfuse-dev;
|
|
fi
|
|
|
|
- if [ $ARCH = riscv32 ]; then
|
|
if [ $TRAVIS_OS_NAME = linux ]; then
|
|
sudo apt update;
|
|
sudo apt install linux-headers-$(uname -r);
|
|
wget https://musl.cc/riscv32-linux-musl-cross.tgz;
|
|
tar -xvf riscv32-linux-musl-cross.tgz;
|
|
export PATH=$PATH:$PWD/riscv32-linux-musl-cross/bin;
|
|
fi;
|
|
fi
|
|
- if [ $ARCH = riscv64 ]; then
|
|
if [ $TRAVIS_OS_NAME = linux ]; then
|
|
sudo apt update;
|
|
sudo apt install linux-headers-$(uname -r);
|
|
wget https://musl.cc/riscv64-linux-musl-cross.tgz;
|
|
tar -xvf riscv64-linux-musl-cross.tgz;
|
|
export PATH=$PATH:$PWD/riscv64-linux-musl-cross/bin;
|
|
fi;
|
|
fi
|
|
|
|
|
|
before_script:
|
|
- rustup component add rust-src
|
|
- (test -x $HOME/.cargo/bin/cargo-xbuild || cargo install cargo-xbuild)
|
|
- if [ $ARCH = x86_64 ]; then
|
|
(test -x $HOME/.cargo/bin/bootimage || cargo install bootimage);
|
|
fi
|
|
|
|
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
|