1
0
mirror of https://github.com/rcore-os/rCore.git synced 2024-11-26 09:53:28 +04:00
rCore/.travis.yml

90 lines
2.8 KiB
YAML
Raw Normal View History

2018-12-01 14:21:15 +04:00
sudo: false
2017-04-19 14:53:28 +04:00
2019-01-03 17:50:48 +04:00
dist: xenial
2018-07-06 19:23:02 +04:00
language: rust
2017-04-19 14:53:28 +04:00
2019-08-07 12:35:38 +04:00
rust: nightly-2019-06-15
2018-07-16 10:44:21 +04:00
2018-12-01 14:21:15 +04:00
os:
- linux
# - osx # too slow and hard to fix, skip it for now
2018-12-01 14:21:15 +04:00
2018-07-16 10:44:21 +04:00
cache:
cargo: true
2018-12-01 14:21:15 +04:00
directories:
- $HOME/Library/Caches/Homebrew
2019-08-07 12:35:38 +04:00
- $TRAVIS_BUILD_DIR/qemu-4.0.0
2018-07-16 10:44:21 +04:00
addons:
2018-12-01 14:21:15 +04:00
homebrew:
packages:
- qemu
2018-07-16 10:44:21 +04:00
env:
matrix:
2018-12-28 18:20:21 +04:00
- ARCH="riscv64"
2019-02-15 12:10:12 +04:00
- ARCH="riscv64" OPTS="board=u540"
2018-07-16 10:44:21 +04:00
- ARCH="riscv32"
- ARCH="x86_64"
2018-11-19 21:33:21 +04:00
- ARCH="aarch64"
- ARCH="mipsel" OPTS="board=malta"
2017-04-19 14:53:28 +04:00
matrix:
allow_failures:
2019-03-26 04:28:10 +04:00
- os: osx
2018-08-04 20:37:36 +04:00
install:
2018-12-28 18:20:21 +04:00
- if [ $ARCH = riscv32 ] || [ $ARCH = riscv64 ]; then
2019-08-07 12:35:38 +04:00
[ $TRAVIS_OS_NAME = linux ] && export FILE="riscv64-unknown-elf-gcc-8.2.0-2019.05.3-x86_64-linux-ubuntu14";
[ $TRAVIS_OS_NAME = osx ] && export FILE="riscv64-unknown-elf-gcc-8.2.0-2019.05.3-x86_64-apple-darwin";
2018-12-01 14:21:15 +04:00
wget https://static.dev.sifive.com/dev-tools/$FILE.tar.gz;
tar xf $FILE.tar.gz;
export PATH=$PATH:$PWD/$FILE/bin;
2018-07-17 08:40:34 +04:00
fi
2018-11-19 21:33:21 +04:00
- if [ $ARCH = aarch64 ]; then
2018-12-01 14:21:15 +04:00
if [ $TRAVIS_OS_NAME = linux ]; then
2019-02-15 12:10:12 +04:00
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 -xf $FILE.tar.xz;
2019-02-15 12:10:12 +04:00
export PATH=$PATH:$PWD/$FILE/bin;
2018-12-01 14:21:15 +04:00
elif [ $TRAVIS_OS_NAME = osx ]; then
brew tap SergioBenitez/osxct;
brew install aarch64-none-elf;
fi;
2018-11-19 21:33:21 +04:00
fi
2019-01-03 17:50:48 +04:00
- if [ $TRAVIS_OS_NAME = linux ]; then
2019-08-07 12:35:38 +04:00
wget https://download.qemu.org/qemu-4.0.0.tar.xz && tar xJf qemu-4.0.0.tar.xz > /dev/null && cd qemu-4.0.0 && ./configure --target-list=$ARCH-softmmu && make && cd ..;
export PATH=$PATH:$PWD/qemu-4.0.0/$ARCH-softmmu:$PWD/qemu-4.0.0;
2019-03-25 17:30:11 +04:00
sudo apt update;
2019-08-07 12:35:38 +04:00
sudo apt install device-tree-compiler -y;
fi
2019-08-07 12:35:38 +04:00
- if [ $TRAVIS_OS_NAME = linux ]; 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";
sudo apt update;
sudo apt install linux-headers-$(uname -r);
2019-08-07 12:35:38 +04:00
wget https://musl.cc/$FILE.tgz;
tar -xf $FILE.tgz;
export PATH=$PATH:$PWD/$FILE/bin;
fi
2018-08-04 20:37:36 +04:00
before_script:
- rustup component add rust-src llvm-tools-preview
- (test -x $HOME/.cargo/bin/cargo-objdump || cargo install cargo-binutils)
2018-08-04 20:37:36 +04:00
- (test -x $HOME/.cargo/bin/cargo-xbuild || cargo install cargo-xbuild)
2019-01-03 15:37:04 +04:00
- if [ $ARCH = x86_64 ]; then
2019-08-07 12:35:38 +04:00
(test -x $HOME/.cargo/bin/bootimage || cargo install bootimage --version 0.6.6);
2019-01-03 15:37:04 +04:00
fi
2018-08-04 20:37:36 +04:00
2017-04-19 14:53:28 +04:00
script:
- cd user && make sfsimg arch=$ARCH && cd ..
2018-12-01 13:47:02 +04:00
- cd kernel && make build arch=$ARCH $OPTS && cd ..
- if [ $ARCH = riscv32 ]; then
cd tests && ./test.sh && cd ..;
fi