rv: Add PicoRV32 initial firmware environment #4
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: P*icoRV32 firmware build tests | |
on: | |
pull_request: | |
paths: | |
- "software/rv/**" | |
branches: [ "v2" ] | |
push: | |
paths: | |
- "software/rv/**" | |
branches: [ "v2" ] | |
workflow_dispatch: | |
env: | |
RV_TOOLS_ROOT: "/opt/riscv" | |
RV_TOOLS_BRANCH: "2024.04.12" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Update install | |
run: | |
sudo apt-get update | |
timeout-minutes: 5 | |
- name: Install toolchain | |
run: | | |
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 | |
git clone --branch $RV_TOOLS_BRANCH https://github.com/riscv/riscv-gnu-toolchain | |
cd riscv-gnu-toolchain | |
mkdir build | |
cd build | |
../configure --prefix=$RV_TOOLS_ROOT --enable-multilib | |
make -j$(nproc) | |
- name: Install build dependencies | |
run: | | |
# Install armmem | |
wget https://github.com/vankxr/armmem/releases/download/1.0-1/armmem_1.0-1_amd64.deb | |
sudo dpkg -i armmem_1.0-1_amd64.deb | |
timeout-minutes: 5 | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
clean: true | |
- name: Build PicoRV32 firmware | |
run: | | |
export PATH="$RV_TOOLS_ROOT/bin:$PATH" | |
cd ${{github.workspace}}/software/rv | |
make BUILD_TYPE=release | |
- name: Upload results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: rv_firmware | |
path: ${{github.workspace}}/software/rv/bin/v* | |
retention-days: 30 |