Merge pull request #147 from ngc7331/fix-btbhit #114
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push or pull request events but only for the master branch | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
test-nutshell: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Prepare environment | |
run: | | |
cd $GITHUB_WORKSPACE/.. | |
git config --global url."https://github.com/".insteadOf [email protected]: | |
git config --global url."https://".insteadOf git:// | |
git clone https://github.com/OpenXiangShan/xs-env | |
cd $GITHUB_WORKSPACE/../xs-env | |
sudo -s ./setup-tools.sh | |
source ./setup.sh | |
rm -r $GITHUB_WORKSPACE/../xs-env/NutShell | |
cp -r $GITHUB_WORKSPACE $GITHUB_WORKSPACE/../xs-env | |
cd $GITHUB_WORKSPACE/../xs-env | |
source ./env.sh | |
wget https://github.com/llvm/circt/releases/download/firtool-1.56.1/firrtl-bin-linux-x64.tar.gz | |
tar -xzf firrtl-bin-linux-x64.tar.gz | |
echo "FIRTOOL_BIN=$(pwd)/firtool-1.56.1/bin/firtool" >> $GITHUB_ENV | |
cd $GITHUB_WORKSPACE/../xs-env/NutShell | |
source ./env.sh | |
make init | |
- name: Generate Verilog | |
run: | | |
cd $GITHUB_WORKSPACE/../xs-env | |
source ./env.sh | |
cd $GITHUB_WORKSPACE/../xs-env/NutShell | |
source ./env.sh | |
make clean | |
make verilog | |
- name: Generate Verilog(MFC=1) | |
run: | | |
cd $GITHUB_WORKSPACE/../xs-env | |
source ./env.sh | |
cd $GITHUB_WORKSPACE/../xs-env/NutShell | |
source ./env.sh | |
make clean | |
make verilog MFC=1 FIRTOOL=${FIRTOOL_BIN} | |
- name: Microbench - Nutshell | |
run: | | |
cd $GITHUB_WORKSPACE/../xs-env | |
source ./env.sh | |
cd $GITHUB_WORKSPACE/../xs-env/NutShell | |
source ./env.sh | |
make clean | |
make emu | |
./build/emu -b 0 -e 0 -i ./ready-to-run/microbench.bin --diff ./ready-to-run/riscv64-nemu-interpreter-so | |
- name: Linux - Nutshell | |
run: | | |
cd $GITHUB_WORKSPACE/../xs-env | |
source ./env.sh | |
cd $GITHUB_WORKSPACE/../xs-env/NutShell | |
source ./env.sh | |
make clean | |
make emu | |
./build/emu -b 0 -e 0 -i ./ready-to-run/linux.bin -C 200000000 --diff ./ready-to-run/riscv64-nemu-interpreter-so | |
- name: Linux - Nutshell(MFC=1) | |
run: | | |
cd $GITHUB_WORKSPACE/../xs-env | |
source ./env.sh | |
cd $GITHUB_WORKSPACE/../xs-env/NutShell | |
source ./env.sh | |
make clean | |
make emu MFC=1 FIRTOOL=${FIRTOOL_BIN} | |
./build/emu -b 0 -e 0 -i ./ready-to-run/linux.bin -C 200000000 --diff ./ready-to-run/riscv64-nemu-interpreter-so | |
# - name: Microbench - Argo | |
# run: | | |
# cd $GITHUB_WORKSPACE/../xs-env | |
# source ./env.sh | |
# cd $GITHUB_WORKSPACE/../xs-env/NutShell | |
# source ./env.sh | |
# make clean | |
# make emu CORE=ooo EMU_CXX_EXTRA_FLAGS="-DFIRST_INST_ADDRESS=0x80000000" | |
# ./build/emu -b 0 -e 0 -i ./ready-to-run/microbench.bin |