From 1be7b49668a7c287192cf298198711dfc25d54e6 Mon Sep 17 00:00:00 2001 From: Jiajie Chen Date: Tue, 26 Mar 2019 15:10:47 +0800 Subject: [PATCH] Install riscv linux musl toolchain in travis ci --- .travis.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.travis.yml b/.travis.yml index 6bd591a..098388b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -81,6 +81,25 @@ install: travis_wait brew install x64-elf-gcc; fi; 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