CI test #660
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
# This is a basic workflow to help you get started with Actions | |
name: CI test | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on pull request events but only for the main & dev branch | |
pull_request: | |
branches: [ '**' ] | |
# Triggers the workflow on push events | |
push: | |
branches: [ '**' ] | |
# Allows you to run this workflow Actions manually | |
workflow_dispatch: | |
# Triggers the action 2am every day | |
schedule: | |
- cron: "0 2 * * *" | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
ACT-sail-spike: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
isa_group: | |
- RVIMAFDCZicsr_Zifencei | |
steps: | |
- name: Checkout source | |
uses: actions/checkout@v4 | |
- name: Install Dependencies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y python3 python3-pip python3-venv | |
sudo apt-get install -y gcc git autoconf automake libtool curl make unzip | |
sudo apt-get install autoconf automake autotools-dev curl python3 python3-pip libmpc-dev libmpfr-dev libgmp-dev gawk build-essential bison flex texinfo gperf libtool patchutils bc zlib1g-dev libexpat-dev ninja-build git cmake libglib2.0-dev libslirp-dev pkg-config | |
pip3 install git+https://github.com/riscv/riscof.git | |
- name: Build RISCV-GNU Toolchain (32 bit) | |
run: | | |
wget -c https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2024.09.03/riscv32-elf-ubuntu-20.04-gcc-nightly-2024.09.03-nightly.tar.gz | |
tar -xzf riscv32-elf-ubuntu-20.04-gcc-nightly-2024.09.03-nightly.tar.gz | |
mv riscv riscv32 | |
echo $GITHUB_WORKSPACE/riscv32/bin >> $GITHUB_PATH | |
- name: Build RISCV-GNU Toolchain (64 bit) | |
run: | | |
wget -c https://github.com/riscv-collab/riscv-gnu-toolchain/releases/download/2024.09.03/riscv64-elf-ubuntu-20.04-gcc-nightly-2024.09.03-nightly.tar.gz | |
tar -xzf riscv64-elf-ubuntu-20.04-gcc-nightly-2024.09.03-nightly.tar.gz | |
mv riscv riscv64 | |
echo $GITHUB_WORKSPACE/riscv64/bin >> $GITHUB_PATH | |
- name: Install riscv-isac | |
run: | | |
cd riscv-isac | |
pip3 install --editable . | |
- name: Install riscv-ctg | |
run: | | |
cd riscv-ctg | |
pip3 install --editable . | |
- name: Install Spike | |
run: | | |
git clone https://github.com/riscv/riscv-isa-sim.git | |
sudo apt-get install device-tree-compiler libboost-regex-dev libboost-system-dev | |
cd riscv-isa-sim | |
mkdir build | |
cd build | |
../configure --prefix=$GITHUB_WORKSPACE/riscv64 | |
make -j$(nproc) | |
sudo make install | |
echo $GITHUB_WORKSPACE/riscv64/bin >> $GITHUB_PATH | |
- name: Install Sail | |
run: | | |
sudo mkdir -p /usr/local | |
curl --location https://github.com/rems-project/sail/releases/download/0.18-linux-binary/sail.tar.gz | sudo tar xvz --directory=/usr/local --strip-components=1 | |
git clone https://github.com/riscv/sail-riscv.git | |
cd sail-riscv | |
ARCH=RV32 make | |
ARCH=RV64 make | |
echo $PWD/c_emulator >> $GITHUB_PATH | |
- name: Config and run riscof for RV32 | |
run: | | |
cd riscof-plugins/rv32 | |
riscof run --config config.ini --suite ../../riscv-test-suite/rv32i_m/ --env ../../riscv-test-suite/env | |
- name: Config and run riscof for RV64 | |
run: | | |
cd riscof-plugins/rv64 | |
riscof run --config config.ini --suite ../../riscv-test-suite/rv64i_m/ --env ../../riscv-test-suite/env |