Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
64 changes: 46 additions & 18 deletions .github/workflows/build_pico_examples.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Renode RP2040 - Build Pico Examples
name: Renode RP2040 - Build Pico Examples

on:
push:
Expand All @@ -10,43 +10,68 @@ jobs:
build_pico_examples:
name: "Renode Build Pico Examples"
runs-on: ubuntu-latest
container:
image: ghcr.io/matgla/yasldtoolchain:0.4.1
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Ubuntu dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y \
binutils-arm-none-eabi \
cmake \
gcc-arm-none-eabi \
libnewlib-arm-none-eabi \
libstdc++-arm-none-eabi-newlib \
ninja-build \
python3-pip
- name: Validate PioSim
run: |
pip3 install --break-system-packages requests
python3 piosim/fetch_piosim.py --verify
pip3 install --break-system-packages requests
python3 piosim/fetch_piosim.py --verify
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Create GIT Identity
shell: bash
run: |
shell: bash
run: |
git config --global user.email "you@example.com" && git config --global user.name "Your Name"

- name: Configure cache for Pico Examples
- name: Download Renode
shell: bash
run: |
wget https://github.com/renode/renode/releases/download/v1.16.1/renode-1.16.1.linux-dotnet.tar.gz
mkdir -p renode
tar -xzf renode-1.16.1.linux-dotnet.tar.gz -C renode --strip-components=1
- name: Build RP2040 peripherals DLL
shell: bash
run: |
dotnet build ./emulation/Peripherals.csproj -c Release /p:RenodePath="$PWD/renode/bin"

- name: Configure cache for Pico Examples
id: pico-examples-cache
uses: actions/cache@v4
with:
path: pico-examples
key: pico-examples-key-${{ hashFiles('tests/pico_examples_revision')}}-${{ hashFiles('pico_example_patches/**.patch')}}
with:
path: tests/pico-examples/build
key: pico-examples-build-${{ hashFiles('tests/pico_examples_revision', 'tests/pico_examples_patches/*.patch', 'tests/build_pico_examples.sh') }}

- name: Build Pico Examples
shell: bash
if: steps.pico-examples-cache.outputs.cache-hit != 'true'
run: |
pacman -Sy --noconfirm ninja
cd tests && ./build_pico_examples.sh

- uses: actions/upload-artifact@v4
with:
name: pico-examples
name: pico-examples
path: tests/pico-examples/build


- uses: actions/upload-artifact@v4
with:
name: peripherals-dll
path: emulation/bin/Release/netstandard2.1/Peripherals.dll

run_linux_tests:
name: Renode Linux Tests
needs: [build_pico_examples]
Expand All @@ -71,3 +96,6 @@ jobs:
- uses: GeekyEggo/delete-artifact@v5.1.0
with:
name: pico-examples
- uses: GeekyEggo/delete-artifact@v5.1.0
with:
name: peripherals-dll
51 changes: 41 additions & 10 deletions .github/workflows/rp2040_renode_linux_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,58 @@ jobs:
build_pico_examples:
name: "Renode Linux"
runs-on: ubuntu-latest
container:
image: ghcr.io/matgla/yasldtoolchain:0.4.1
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Install Ubuntu dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y \
binutils-arm-none-eabi \
gcc-arm-none-eabi \
libnewlib-arm-none-eabi \
libstdc++-arm-none-eabi-newlib \
ninja-build \
python3-pip \
wget
- name: Create GIT Identity
shell: bash
run: |
shell: bash
run: |
git config --global user.email "you@example.com" && git config --global user.name "Your Name"
- uses: actions/download-artifact@v4
with:
name: pico-examples
name: pico-examples
path: tests/pico-examples/build
- uses: actions/download-artifact@v4
with:
name: peripherals-dll
path: emulation/bin/Release/netstandard2.1
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- name: Download Renode
shell: bash
run: |
# Match the local working setup more closely: Renode 1.16.1 running on
# the host .NET runtime instead of a bundled portable runtime.
wget https://github.com/renode/renode/releases/download/v1.16.1/renode-1.16.1.linux-dotnet.tar.gz
mkdir -p renode
tar -xzf renode-1.16.1.linux-dotnet.tar.gz -C renode --strip-components=1
- name: Install Renode Test Requirements
shell: bash
run: |
pip3 install -r tests/requirements.txt
- name: Build & Execute Tests
shell: bash
run: |
./tests/run_tests.py -r 3 -f tests/tests.yaml
dotnet --info
export PATH=$PATH:$PWD/renode:$PWD/renode/tests
# Set PYTHONPATH so Renode can find installed Python packages
export PYTHONPATH=$(python3 -c "import site; print(site.getsitepackages()[0])")
python3 ./tests/run_tests.py -r 3 -f tests/tests.yaml -j 0
- uses: actions/upload-artifact@v4
with:
name: run_artifacts
Expand All @@ -36,5 +67,5 @@ jobs:
path: |
logs/*
snapshots/*


39 changes: 24 additions & 15 deletions .github/workflows/rp2040_renode_osx_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,48 @@ on:
jobs:
osx_rp2040_tests:
name: "Renode MacOS"
runs-on: macos-15
runs-on: macos-15
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Create GIT Identity
shell: bash
run: |
shell: bash
run: |
git config --global user.email "you@example.com" && git config --global user.name "Your Name"
- name: Install Renode
shell: bash
- name: Install Renode
shell: bash
run: |
wget https://github.com/renode/renode/releases/download/v1.15.3/renode_1.15.3.dmg
hdiutil attach renode_1.15.3.dmg
cp -r /Volumes/renode_1.15.3/Renode.app /Applications
hdiutil detach /Volumes/renode_1.15.3
- name: Install Renode Test
wget https://github.com/renode/renode/releases/download/v1.16.1/renode_1.16.1.dmg
hdiutil attach renode_1.16.1.dmg
cp -r /Volumes/renode_1.16.1/Renode.app /Applications
hdiutil detach /Volumes/renode_1.16.1
- name: Install Renode Test
shell: bash
run: |
pip3 install --break-system-packages -r /Applications/Renode.app/Contents/MacOS/tests/requirements.txt
- name: Install MacOS mono
pip3 install --break-system-packages -r tests/requirements.txt
- name: Install MacOS mono
shell: bash
run: |
brew install mono-mdk
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '10.0.x'
- uses: actions/download-artifact@v4
with:
name: pico-examples
name: pico-examples
path: tests/pico-examples/build
- uses: actions/download-artifact@v4
with:
name: peripherals-dll
path: emulation/bin/Release/netstandard2.1
- name: Run tests
shell: bash
run: |
export PATH=$PATH:/Applications/Renode.app/Contents/MacOS/tests
pip3 install psutil --break-system-packages
# Set PYTHONPATH so Renode can find installed Python packages
export PYTHONPATH=$(python3 -c "import site; print(site.getsitepackages()[0])")
python3 ./tests/run_tests.py -r 3 -f tests/tests.yaml -j 0
- uses: actions/upload-artifact@v4
if: always()
Expand All @@ -49,4 +58,4 @@ jobs:
logs/*
snapshots/*


42 changes: 26 additions & 16 deletions .github/workflows/rp2040_renode_windows_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,39 +9,49 @@ jobs:
runs-on: windows-2022
steps:
- uses: actions/checkout@v4

- name: Create GIT Identity
shell: cmd
run: |
git config --global user.email "you@example.com"
shell: cmd
run: |
git config --global user.email "you@example.com"
git config --global user.name "Your Name"

- name: Print Environment
run: |
echo github.event.action: ${{ github.event.action }}
echo github.event_name: ${{ github.event_name }}

- name: Download Renode
shell: pwsh
run: |
run: |
choco install wget
wget https://github.com/renode/renode/releases/download/v1.15.3/renode_1.15.3.zip
Expand-Archive '.\renode_1.15.3.zip' -DestinationPath .
wget https://github.com/renode/renode/releases/download/v1.16.1/renode-1.16.1.windows-portable-dotnet.zip
Expand-Archive '.\renode-1.16.1.windows-portable-dotnet.zip' -DestinationPath .

- uses: actions/download-artifact@v4
with:
name: pico-examples
name: pico-examples
path: tests/pico-examples/build
- name: Execute Tests
- uses: actions/download-artifact@v4
with:
name: peripherals-dll
path: emulation/bin/Release/netstandard2.1
- name: Execute Tests
uses: actions/setup-python@v5
with:
python-version: '3.13'
cache: 'pip' # caching pip dependencies
- run: |
pip install psutil
pip install -r renode_1.15.3/tests/requirements.txt
$env:PATH += ";" + (Get-Item .).FullName + "\renode_1.15.3\bin"
python3 tests/run_tests.py -r 3 -f tests/tests.yaml -j 0
- shell: pwsh
run: |
# `renode-test.bat` uses `py -3` internally on Windows, so install and
# query packages with the same interpreter to avoid site-packages mismatches.
py -3 -m pip install -r tests/requirements.txt
$RENODE_DIR = (Get-Item .).FullName + "\renode_1.16.1-dotnet_portable"
# Get Python site-packages path and set PYTHONPATH for Renode to find modules
$SITE_PACKAGES = py -3 -c "import site; print(site.getsitepackages()[0])"
$env:PYTHONPATH = "$SITE_PACKAGES"
py -3 -c "import sys, psutil; print(sys.executable); print(psutil.__file__)"
py -3 tests/run_tests.py -r 3 -f tests/tests.yaml -j 0 -e "$RENODE_DIR\renode-test.bat"
- uses: actions/upload-artifact@v4
if: always()
with:
Expand Down
9 changes: 9 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,12 @@ mono_crash*
.DS_Store
venv
obj/
__pycache__/
output.xml
test_output.log

# Test output directory
output/
emulation/bin
tmp/
profiling/
Loading
Loading