Skip to content

Clarify that FD are supported #6

Clarify that FD are supported

Clarify that FD are supported #6

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
lint:
runs-on: ubuntu-22.04
steps:
- name: Checkout Muntjac
uses: actions/checkout@v4
- name: Install Verilator
run: |
VERILATOR_VERSION=v4.210
wget https://storage.googleapis.com/verilator-builds/verilator-"$VERILATOR_VERSION".tar.gz
sudo mkdir -p /tools/verilator
sudo chmod 777 /tools/verilator
sudo tar -C /tools/verilator -xvzf verilator-"$VERILATOR_VERSION".tar.gz
echo "/tools/verilator/$VERILATOR_VERSION/bin" >> $GITHUB_PATH
- name: Install Python dependencies
run: pip3 install setuptools wheel
- name: Install FuseSoC
run: pip3 install -r python-requirements.txt
- name: Run lint
run: make lint
simulator-build:
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- name: pipeline
sim: muntjac_pipeline
- name: core
sim: muntjac_core
steps:
- name: Checkout Muntjac
uses: actions/checkout@v4
- name: Install Verilator
run: |
VERILATOR_VERSION=v4.210
wget https://storage.googleapis.com/verilator-builds/verilator-"$VERILATOR_VERSION".tar.gz
sudo mkdir -p /tools/verilator
sudo chmod 777 /tools/verilator
sudo tar -C /tools/verilator -xvzf verilator-"$VERILATOR_VERSION".tar.gz
echo "/tools/verilator/$VERILATOR_VERSION/bin" >> $GITHUB_PATH
- name: Install Python dependencies
run: pip3 install setuptools wheel
- name: Install FuseSoC
run: pip3 install -r python-requirements.txt
- name: Run build
run: make sim-${{ matrix.name }}
- name: Upload simulator
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.sim }}
path: bin/${{ matrix.sim }}
if-no-files-found: error
riscv-tests-build:
runs-on: ubuntu-22.04
steps:
- name: Checkout Muntjac
uses: actions/checkout@v4
- name: Checkout riscv-tests
uses: actions/checkout@v4
with:
repository: riscv/riscv-tests
ref: c4217d88bce9f805a81f42e86ff56ed363931d69
submodules: recursive
path: riscv-tests
- name: Override with custom link.ld
run: |
cp flows/link.ld riscv-tests/env/p/link.ld
- name: Download compiler toolchain
uses: i3h/download-release-asset@v1
with:
owner: lowRISC
repo: lowrisc-toolchains
tag: 20230427-1
file: lowrisc-toolchain-gcc-rv64imac-20230427-1.tar.xz
# Also add the tools to PATH for next step.
- name: Extract compiler toolchain
run: |
tar -xf lowrisc-toolchain-gcc-rv64imac-20230427-1.tar.xz
echo "`pwd`/lowrisc-toolchain-gcc-rv64imac-20230427-1/bin" >> $GITHUB_PATH
# All tests except breakpoint - it is not part of the core specification.
- name: Build ISA tests
run: |
cd riscv-tests/isa
make -j$(nproc)
rm *.dump
rm rv64mi-p-breakpoint
tar -cjf ~/riscv-isa-tests.tar.xz *
- name: Upload test binaries
uses: actions/upload-artifact@v4
with:
name: riscv-isa-tests
path: ~/riscv-isa-tests.tar.xz
if-no-files-found: error
riscv-tests-run:
runs-on: ubuntu-22.04
needs: [simulator-build, riscv-tests-build]
strategy:
matrix:
include:
- name: pipeline
sim: muntjac_pipeline
- name: core
sim: muntjac_core
steps:
- name: Checkout Muntjac
uses: actions/checkout@v4
- name: Get simulator
uses: actions/download-artifact@v4
with:
name: ${{ matrix.sim }}
- name: Get tests
uses: actions/download-artifact@v4
with:
name: riscv-isa-tests
- name: Unpack tests
run: |
mkdir tests
tar -xf riscv-isa-tests.tar.xz -C tests
# Create a summary of each test outcome in the JUnit XML format.
- name: Run tests
run: |
chmod +x ${{ matrix.sim }}
make -f test/riscv-tests/Makefile results.xml -j$(nproc) TEST_DIR=tests MUNTJAC_SIM=./${{ matrix.sim }}
- name: Upload test report
uses: actions/upload-artifact@v4
with:
name: riscv-tests-${{ matrix.name }}
path: results.xml
if-no-files-found: error