ci: Fix caching (#609)

Signed-off-by: Florian Zaruba <florian@openhwgroup.org>
This commit is contained in:
Florian Zaruba 2021-02-08 15:28:43 +01:00 committed by GitHub
parent 1a4f9ba7fd
commit bb68496ce3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 10 deletions

View file

@ -57,22 +57,16 @@ before_install:
- export NUM_JOBS=4
- ci/make-tmp.sh
- git submodule update --init --recursive
- mkdir -p $RISCV
- wget https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.3.0-2020.04.0-x86_64-linux-ubuntu14.tar.gz
- tar -x -f riscv64-unknown-elf-gcc-8.3.0-2020.04.0-x86_64-linux-ubuntu14.tar.gz --strip-components=1 -C $RISCV
- ci/install-fesvr.sh
stages:
- sw_build
- test
jobs:
include:
- stage: sw_build
name: build software
script:
# Obtain pre-built toolchain.
- mkdir -p $RISCV
- wget https://static.dev.sifive.com/dev-tools/riscv64-unknown-elf-gcc-8.3.0-2020.04.0-x86_64-linux-ubuntu14.tar.gz
- tar -x -f riscv64-unknown-elf-gcc-8.3.0-2020.04.0-x86_64-linux-ubuntu14.tar.gz --strip-components=1 -C $RISCV
- ci/install-spike.sh
- stage: test
name: run riscv benchmarks (Write-Back Cache)
script:

28
ci/install-fesvr.sh Executable file
View file

@ -0,0 +1,28 @@
#!/bin/bash
set -e
ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
VERSION="35d50bc40e59ea1d5566fbd3d9226023821b1bb6"
cd $ROOT/tmp
if [ -z ${NUM_JOBS} ]; then
NUM_JOBS=1
fi
if [ ! -e "${RISCV}/bin/spike" ]; then
echo "Installing fesvr"
git clone https://github.com/riscv/riscv-isa-sim.git
cd riscv-isa-sim
git checkout $VERSION
mkdir -p build
cd build
../configure --prefix="$RISCV/"
make install-config-hdrs install-hdrs libfesvr.a
mkdir -p $RISCV/lib
cp libfesvr.a $RISCV/lib
else
echo "Using fesvr from cached directory."
fi