mirror of
https://github.com/openhwgroup/cva6.git
synced 2025-04-22 13:17:41 -04:00
Bump GCC version to 7.2 in CI flows
This commit is contained in:
parent
bedff11a6c
commit
670495ba76
10 changed files with 104 additions and 44 deletions
|
@ -1,17 +1,18 @@
|
|||
before_script:
|
||||
- export CXX=g++-4.8.3 CC=gcc-4.8.3
|
||||
# paths to local or network installation (the riscv toolchain and
|
||||
# verilator are not built in a ci job in this case)
|
||||
- export QUESTASIM_HOME=/scratch/$USER/questasim
|
||||
- export CXX=g++-7 CC=gcc-7
|
||||
# paths to local or network installations (the riscv toolchain and
|
||||
# verilator are not built in the ci job as in travis)
|
||||
- export QUESTASIM_HOME=
|
||||
- export QUESTASIM_VERSION=
|
||||
- export RISCV=/scratch/$USER/riscv_install
|
||||
- export VERILATOR_ROOT=/scratch/$USER/verilator-3.924
|
||||
- export QUESTASIM_FLAGS=
|
||||
- export RISCV=/scratch/$USER/projects/riscv_install
|
||||
- export VERILATOR_ROOT=/scratch/$USER/projects/verilator-3.924
|
||||
# setup dependent paths
|
||||
- export PATH=${RISCV}/bin:$VERILATOR_ROOT/bin:${PATH}
|
||||
- export LIBRARY_PATH=$CI_PROJECT_DIR/tmp/lib
|
||||
- export LD_LIBRARY_PATH=$CI_PROJECT_DIR/tmp/lib
|
||||
- export C_INCLUDE_PATH=$CI_PROJECT_DIR/tmp/include:$VERILATOR_ROOT/include
|
||||
- export CPLUS_INCLUDE_PATH=$CI_PROJECT_DIR/tmp/include:$VERILATOR_ROOT/include
|
||||
- export LIBRARY_PATH=$RISCV/lib
|
||||
- export LD_LIBRARY_PATH=$RISCV/lib
|
||||
- export C_INCLUDE_PATH=$RISCV/include:$VERILATOR_ROOT/include
|
||||
- export CPLUS_INCLUDE_PATH=$RISCV/include:$VERILATOR_ROOT/include
|
||||
# number of parallel jobs to use for make commands and simulation
|
||||
- export NUM_JOBS=4
|
||||
- ci/make-tmp.sh
|
||||
|
@ -27,7 +28,6 @@ stages:
|
|||
build:
|
||||
stage: build
|
||||
script:
|
||||
- ci/install-fesvr.sh
|
||||
- ci/build-riscv-tests.sh
|
||||
- make clean
|
||||
- make build questa_version=$QUESTASIM_VERSION
|
||||
|
|
24
.travis.yml
24
.travis.yml
|
@ -13,8 +13,8 @@ addons:
|
|||
sources:
|
||||
- ubuntu-toolchain-r-test
|
||||
packages:
|
||||
- gcc-4.8
|
||||
- g++-4.8
|
||||
- gcc-7
|
||||
- g++-7
|
||||
- gperf
|
||||
- autoconf
|
||||
- automake
|
||||
|
@ -29,7 +29,6 @@ addons:
|
|||
- texinfo
|
||||
- python-pexpect
|
||||
- libusb-1.0-0-dev
|
||||
- device-tree-compiler
|
||||
env:
|
||||
global:
|
||||
- RISCV="/home/travis/riscv_install"
|
||||
|
@ -41,13 +40,13 @@ branches:
|
|||
- ariane_next
|
||||
|
||||
before_install:
|
||||
- export CXX=g++-4.8 CC=gcc-4.8
|
||||
- export CXX=g++-7 CC=gcc-7
|
||||
# setup dependent paths
|
||||
- export PATH=$RISCV/bin:$VERILATOR_ROOT/bin:$PATH
|
||||
- export LIBRARY_PATH=$TRAVIS_BUILD_DIR/tmp/lib
|
||||
- export LD_LIBRARY_PATH=$TRAVIS_BUILD_DIR/tmp/lib
|
||||
- export C_INCLUDE_PATH=$TRAVIS_BUILD_DIR/tmp/include:$VERILATOR_ROOT/include
|
||||
- export CPLUS_INCLUDE_PATH=$TRAVIS_BUILD_DIR/tmp/include:$VERILATOR_ROOT/include
|
||||
- export LIBRARY_PATH=$RISCV/lib
|
||||
- export LD_LIBRARY_PATH=$RISCV/lib
|
||||
- export C_INCLUDE_PATH=$RISCV/include:$VERILATOR_ROOT/include
|
||||
- export CPLUS_INCLUDE_PATH=$RISCV/include:$VERILATOR_ROOT/include
|
||||
# number of parallel jobs to use for make commands and simulation
|
||||
- export NUM_JOBS=4
|
||||
- ci/make-tmp.sh
|
||||
|
@ -64,24 +63,23 @@ jobs:
|
|||
script:
|
||||
- ci/build-riscv-gcc.sh
|
||||
- ci/install-verilator.sh
|
||||
- ci/install-fesvr.sh
|
||||
- ci/install-dtc.sh
|
||||
- stage: test
|
||||
name: run riscv benchmarks
|
||||
script:
|
||||
- ci/install-fesvr.sh
|
||||
- ci/build-riscv-tests.sh
|
||||
- make -j${NUM_JOBS} run-benchmarks-verilator verilator=$VERILATOR_ROOT/bin/verilator
|
||||
# rv64ui-p-* tests
|
||||
- stage: test
|
||||
name: run rv64ui-p-* asm tests
|
||||
name: run asm tests1
|
||||
script:
|
||||
- ci/install-fesvr.sh
|
||||
- ci/build-riscv-tests.sh
|
||||
- make -j${NUM_JOBS} run-asm-tests1-verilator verilator=$VERILATOR_ROOT/bin/verilator
|
||||
# rv64ui-v-* tests
|
||||
- stage: test
|
||||
name: run rv64ui-v-* asm tests
|
||||
name: run asm tests2
|
||||
script:
|
||||
- ci/install-fesvr.sh
|
||||
- ci/build-riscv-tests.sh
|
||||
- make -j${NUM_JOBS} run-asm-tests2-verilator verilator=$VERILATOR_ROOT/bin/verilator
|
||||
|
||||
|
|
2
Makefile
2
Makefile
|
@ -112,7 +112,7 @@ work/%.o: tb/dpi/%.cc $(dpi_hdr)
|
|||
|
||||
$(library)/ariane_dpi.so: $(dpi)
|
||||
# Compile C-code and generate .so file
|
||||
g++ -shared -m64 -o $(library)/ariane_dpi.so $? -lfesvr
|
||||
$(CXX) -shared -m64 -o $(library)/ariane_dpi.so $? -lfesvr
|
||||
|
||||
$(library):
|
||||
# Create the library
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
|
||||
VERSION="691e4e826251c7ec59f883cab18440c87baf45e7"
|
||||
cd $ROOT/tmp
|
||||
|
||||
if [ -z ${NUM_JOBS} ]; then
|
||||
|
@ -10,7 +11,7 @@ fi
|
|||
if ! [ -e $RISCV/bin ]; then
|
||||
[ -d $ROOT/tmp/riscv-gnu-toolchain ] || git clone https://github.com/riscv/riscv-gnu-toolchain.git
|
||||
cd riscv-gnu-toolchain
|
||||
git checkout 691e4e826251c7ec59f883cab18440c87baf45e7
|
||||
git checkout $VERSION
|
||||
git submodule update --init --recursive
|
||||
|
||||
mkdir -p $RISCV
|
||||
|
|
|
@ -1,6 +1,8 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
|
||||
VERSION="294bfce8a1ca2fc501b8939292146e44f813a2b8"
|
||||
|
||||
cd $ROOT/tmp
|
||||
|
||||
if [ -z ${NUM_JOBS} ]; then
|
||||
|
@ -9,7 +11,7 @@ fi
|
|||
|
||||
[ -d $ROOT/tmp/riscv-tests ] || git clone https://github.com/riscv/riscv-tests.git
|
||||
cd riscv-tests
|
||||
git checkout 294bfce8a1ca2fc501b8939292146e44f813a2b8
|
||||
git checkout $VERSION
|
||||
git submodule update --init --recursive
|
||||
autoconf
|
||||
mkdir -p build
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
# source this with a bash shell in the project root
|
||||
# comment out next command if you don't want to use sudo
|
||||
sudo apt install \
|
||||
gcc-4.8 \
|
||||
g++-4.8 \
|
||||
gcc-7 \
|
||||
g++-7 \
|
||||
gperf \
|
||||
autoconf \
|
||||
automake \
|
||||
|
@ -18,8 +18,7 @@ sudo apt install \
|
|||
flex \
|
||||
texinfo \
|
||||
python-pexpect \
|
||||
libusb-1.0-0-dev \
|
||||
device-tree-compiler
|
||||
libusb-1.0-0-dev
|
||||
|
||||
# customize your paths here
|
||||
source ci/path-setup.sh
|
||||
|
@ -30,6 +29,8 @@ ci/build-riscv-gcc.sh
|
|||
ci/install-fesvr.sh
|
||||
ci/install-verilator.sh
|
||||
ci/build-riscv-tests.sh
|
||||
ci/install-dtc.sh
|
||||
ci/install-spike.sh
|
||||
make clean
|
||||
|
||||
# run asm tests on verilator
|
||||
|
|
22
ci/install-dtc.sh
Executable file
22
ci/install-dtc.sh
Executable file
|
@ -0,0 +1,22 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
|
||||
VERSION="b94c056b137e59deefc62fbfe0cd3a23edfcc07c"
|
||||
|
||||
cd $ROOT/tmp
|
||||
|
||||
if [ -z ${NUM_JOBS} ]; then
|
||||
NUM_JOBS=1
|
||||
fi
|
||||
|
||||
if [ ! -e "$RISCV/dtc/dtc" ]; then
|
||||
echo "Installing DTC"
|
||||
git clone https://git.kernel.org/pub/scm/utils/dtc/dtc.git
|
||||
cd dtc
|
||||
git checkout $VERSION
|
||||
make -j${NUM_JOBS} PREFIX=$RISCV/ NO_PYTHON=1
|
||||
make -j${NUM_JOBS} check NO_PYTHON=1
|
||||
make -j${NUM_JOBS} install PREFIX=$RISCV/ NO_PYTHON=1
|
||||
else
|
||||
echo "Using DTC from cached directory."
|
||||
fi
|
|
@ -1,19 +1,27 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
|
||||
VERSION=30e85ce253788b29bd4ac0b5e5c23a077d96dc24
|
||||
|
||||
cd $ROOT/tmp
|
||||
RELEASE=0.1.0
|
||||
|
||||
if [ -z ${NUM_JOBS} ]; then
|
||||
NUM_JOBS=1
|
||||
fi
|
||||
|
||||
if ! [ -e $ROOT/tmp/riscv-fesvr ]; then
|
||||
if [ ! -e "${RISCV}/lib/libfesvr.so" ]; then
|
||||
echo "Installing RISCV FESVR"
|
||||
git clone https://github.com/riscv/riscv-fesvr.git
|
||||
cd riscv-fesvr
|
||||
git checkout $VERSION
|
||||
mkdir -p build
|
||||
cd build
|
||||
../configure --prefix="$RISCV/"
|
||||
make -j${NUM_JOBS}
|
||||
make install
|
||||
else
|
||||
echo "Using RISCV FESVR from cached directory."
|
||||
fi
|
||||
cd $ROOT/tmp/riscv-fesvr
|
||||
mkdir -p build
|
||||
cd build
|
||||
../configure --prefix="$ROOT/tmp"
|
||||
make -j${NUM_JOBS}
|
||||
make install
|
||||
|
||||
|
||||
|
||||
|
|
27
ci/install-spike.sh
Executable file
27
ci/install-spike.sh
Executable file
|
@ -0,0 +1,27 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
|
||||
VERSION="def4c5b104efd382e633d5fdca49508757bb5e23"
|
||||
|
||||
cd $ROOT/tmp
|
||||
|
||||
if [ -z ${NUM_JOBS} ]; then
|
||||
NUM_JOBS=1
|
||||
fi
|
||||
|
||||
if [ ! -e "${RISCV}/bin/spike" ]; then
|
||||
echo "Installing Spike"
|
||||
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 -j${NUM_JOBS}
|
||||
make install
|
||||
else
|
||||
echo "Using Spike from cached directory."
|
||||
fi
|
||||
|
||||
|
||||
|
|
@ -5,17 +5,18 @@ export CI_BUILD_DIR=$TOP/ariane-repo
|
|||
#customize this to your setup
|
||||
export QUESTASIM_HOME=
|
||||
export QUESTASIM_VERSION=
|
||||
export CXX=g++-4.8 CC=gcc-4.8
|
||||
export QUESTASIM_FLAGS=
|
||||
export CXX=g++-7 CC=gcc-7
|
||||
|
||||
# where to install the tools
|
||||
export RISCV=$TOP/riscv_install
|
||||
export VERILATOR_ROOT=$TOP/verilator-3.924/
|
||||
|
||||
export PATH=$RISCV/bin:$VERILATOR_ROOT/bin:$PATH
|
||||
export LIBRARY_PATH=$CI_BUILD_DIR/tmp/lib
|
||||
export LD_LIBRARY_PATH=$CI_BUILD_DIR/tmp/lib
|
||||
export C_INCLUDE_PATH=$CI_BUILD_DIR/tmp/include:$VERILATOR_ROOT/include
|
||||
export CPLUS_INCLUDE_PATH=$CI_BUILD_DIR/tmp/include:$VERILATOR_ROOT/include
|
||||
export LIBRARY_PATH=$RISCV/lib
|
||||
export LD_LIBRARY_PATH=$RISCV/lib
|
||||
export C_INCLUDE_PATH=$RISCV/include:$VERILATOR_ROOT/include
|
||||
export CPLUS_INCLUDE_PATH=$RISCV/include:$VERILATOR_ROOT/include
|
||||
|
||||
# number of parallel jobs to use for make commands and simulation
|
||||
export NUM_JOBS=8
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue