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

119 lines
3.6 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-03-25 17:30:11 +04:00
rust: nightly-2019-03-05
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-01-03 17:50:48 +04:00
- $TRAVIS_BUILD_DIR/qemu-3.1.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
[ $TRAVIS_OS_NAME = linux ] && export FILE="riscv64-unknown-elf-gcc-8.2.0-2019.02.0-x86_64-linux-ubuntu14";
[ $TRAVIS_OS_NAME = osx ] && export FILE="riscv64-unknown-elf-gcc-8.2.0-2019.02.0-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;
2019-03-26 04:28:10 +04:00
wget https://musl.cc/aarch64-linux-musl-cross.tgz;
tar -xf aarch64-linux-musl-cross.tgz;
2019-03-26 04:28:10 +04:00
export PATH=$PATH:$PWD/aarch64-linux-musl-cross/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-03-26 04:28:10 +04:00
- 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 -xf x86_64-linux-musl-cross.tgz;
2019-03-26 04:28:10 +04:00
export PATH=$PATH:$PWD/x86_64-linux-musl-cross/bin;
fi;
fi
2019-01-03 17:50:48 +04:00
- if [ $TRAVIS_OS_NAME = linux ]; then
wget https://download.qemu.org/qemu-3.1.0.tar.xz && tar xJf qemu-3.1.0.tar.xz > /dev/null && cd qemu-3.1.0 && ./configure --target-list=$ARCH-softmmu && make && cd ..;
2019-03-25 18:03:50 +04:00
export PATH=$PATH:$PWD/qemu-3.1.0/$ARCH-softmmu:$PWD/qemu-3.1.0;
2019-03-25 17:30:11 +04:00
sudo apt update;
sudo apt install libfuse-dev device-tree-compiler -y;
2019-01-03 17:50:48 +04:00
fi
2018-04-09 17:20:47 +04:00
- 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 -xf 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 -xf riscv64-linux-musl-cross.tgz;
export PATH=$PATH:$PWD/riscv64-linux-musl-cross/bin;
fi;
fi
- if [ $ARCH = mipsel ]; then
if [ $TRAVIS_OS_NAME = linux ]; then
sudo apt update;
sudo apt install linux-headers-$(uname -r);
wget https://musl.cc/mipsel-linux-musln32-cross.tgz;
tar -xf mipsel-linux-musln32-cross.tgz;
export PATH=$PATH:$PWD/mipsel-linux-musln32-cross/bin;
fi;
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
(test -x $HOME/.cargo/bin/bootimage || cargo install bootimage);
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