Skip to content

sbt: update version to 1.9.6 #460

sbt: update version to 1.9.6

sbt: update version to 1.9.6 #460

Workflow file for this run

name: Test
on: [push, pull_request, workflow_dispatch]
jobs:
test-windows:
name: Test on Windows
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Mkdir Ccache
run: 'New-Item -Path D:\ccache -ItemType Directory -Force'
- name: Cache verilator build
id: cache-verilator-build
uses: actions/cache@v3
with:
path: 'D:\ccache'
key: verilator-build-cache
- name: Setup Verilator
run: C:\msys64\usr\bin\bash.exe -l -c "pacman -Sy --noconfirm --needed base-devel mingw-w64-x86_64-ccache mingw-w64-x86_64-toolchain git flex mingw-w64-x86_64-cmake mingw-w64-x86_64-autotools mingw-w64-x86_64-python3 && export PATH=/mingw64/bin:/usr/local/bin:/usr/bin:/usr/bin/core_perl && export CCACHE_DIR=/d/ccache && cd ~ && git clone --depth 1 -b v4.228 https://github.com/verilator/verilator && cd verilator && autoconf && (./configure --prefix=/mingw64 || cat config.log) && cp /usr/include/FlexLexer.h /mingw64/include && make -j$(nproc) && make install"
- run: echo 'C:\msys64\usr\bin' | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- run: echo 'C:\msys64\mingw64\bin' | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append
- name: Setup Developer Command
uses: ilammy/msvc-dev-cmd@v1
- name: Compile executables for testing
run: cd csrc; .\build.bat
- name: SBT Test
run: sbt test
test-macos:
name: Test on macOS
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup Clang
run: brew install llvm && echo "$(brew --prefix llvm)/bin" >> $GITHUB_PATH
- name: Setup Verilator
run: brew install verilator
- name: Compile executables for testing
run: cd csrc && ./build.sh
- name: SBT Test
run: sbt test
test-linux:
name: Test on Linux
runs-on: ubuntu-latest
steps:
- name: Setup Clang
run: sudo apt-get update && sudo apt-get install -y clang-15 lldb-15 lld-15 clangd-15 clang-tidy-15 clang-format-15 clang-tools-15 llvm-15-dev lld-15 lldb-15 llvm-15-tools libomp-15-dev libc++-15-dev libc++abi-15-dev libclang-common-15-dev libclang-15-dev libclang-cpp15-dev libunwind-15-dev
- name: Update Clang Version
run: curl -LO https://gist.githubusercontent.com/howardlau1999/7ea2cffedc0491c46fa14e1f2355a9a8/raw/7886c0344e8f010a9d515a3de20983e604ae5a0a/update-alternatives-clang.sh && sudo bash update-alternatives-clang.sh 15 100
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Setup Verilator
run: sudo apt install -y verilator
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '19'
- name: Cache Scala
uses: coursier/cache-action@v6
- name: Compile executables for testing
run: cd csrc && ./build.sh
- name: SBT Test
run: sbt test
test-in-docker:
name: Test in Devcontainer Docker image
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- uses: docker/setup-buildx-action@v2
- uses: docker/build-push-action@v4
with:
context: .devcontainer
cache-from: type=gha
cache-to: type=gha,mode=max
push: false
load: true
tags: howardlau1999/yatcpu:latest
- name: Run test in Docker
run: docker run --user $(id -u) --rm -v $PWD:/yatcpu -w /yatcpu howardlau1999/yatcpu bash -c "cd csrc && ./build.sh && cd .. && sbt test"
old-riscv-compliance-test:
name: Run old RISC-V compliance test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: yatcpu
- name: Checkout RISC-V compliance test
uses: actions/checkout@v3
with:
repository: "riscv-non-isa/riscv-arch-test"
path: riscv-arch-test
ref: 2.6.1
- name: Setup Toolchain
run: sudo apt-get update && sudo apt-get install -y verilator binutils-riscv64-unknown-elf gcc-riscv64-unknown-elf
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '19'
- name: Set up GCC
uses: egor-tensin/setup-gcc@v1
with:
version: 11
- name: Cache Scala
uses: coursier/cache-action@v6
- name: Generate Verilog
run: cd yatcpu && sbt "runMain board.verilator.VerilogGenerator"
- name: Compile Verilated model
run: cd yatcpu/verilog/verilator && verilator --exe --cc --trace Top.v sim_main.cpp && make -C obj_dir -f VTop.mk
- name: Run RISC-V compliance test
run: cd riscv-arch-test && make VERBOSE=1
env:
RISCV_TARGET_FLAGS: "-memory 1048576"
TARGET_SIM: ${{ github.workspace }}/yatcpu/verilog/verilator/obj_dir/VTop
RISCV_TARGET: yatcpu
TARGETDIR: ${{ github.workspace }}/yatcpu/riscv-target
new-riscv-compilance-test-riscof:
name: Run new RISC-V compliance test
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: yatcpu
- name: Setup Toolchain
run: sudo apt-get update && sudo apt-get install -y verilator binutils-riscv64-unknown-elf gcc-riscv64-unknown-elf
- name: Setup ccache
uses: hendrikmuhs/[email protected]
with:
append-timestamp: false
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '19'
- name: Set up GCC
uses: egor-tensin/setup-gcc@v1
with:
version: 11
- name: Cache Scala
uses: coursier/cache-action@v6
- name: Generate Verilog
run: cd yatcpu && sbt "runMain board.verilator.VerilogGenerator"
- name: Compile Verilated model
run: |
cd yatcpu/verilog/verilator
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
verilator --exe --cc --trace Top.v sim_main.cpp
make -C obj_dir -f VTop.mk
- name: Setup RISCOF
run: |
pip3 install git+https://github.com/riscv/riscof.git
- name: Setup spike
run: |
export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
sudo apt-get install device-tree-compiler
cd ${{ github.workspace }}
git clone https://github.com/riscv-software-src/riscv-isa-sim.git
cd riscv-isa-sim
mkdir build
cd build
../configure --prefix=/usr
make -j$(nproc)
sudo make install
- name: Setup test suite
run: |
cd ${{ github.workspace }}
riscof --verbose info arch-test --clone
- name: Run RISCOF compliance test
run: |
cd ${{ github.workspace }}/yatcpu/riscof-target
riscof run --config=config.ini --no-browser --no-clean --suite=${{ github.workspace }}/riscv-arch-test/riscv-test-suite/ --env=${{ github.workspace }}/riscv-arch-test/riscv-test-suite/env