Skip to content

Commit

Permalink
CI: add test memory maps weekly
Browse files Browse the repository at this point in the history
  • Loading branch information
hegza committed Jul 30, 2024
1 parent 64f66fb commit f4a509e
Showing 1 changed file with 70 additions and 0 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/test_mmaps.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Test memory maps

on:
schedule:
- cron: "14 3 * * 5" # every friday at 03:14

env:
CI: 1
CARGO_TERM_COLOR: always
RENODE_DIR: /opt/renode/
# Used by renode-test to generate snapshots of failed tests
RENODE_CI_MODE: YES
BIN: test_memory_maps

jobs:
build-mmap-tests:
runs-on: ubuntu-latest

strategy:
matrix:
device: [
C2C_config, C2C_serial, DLA, DMA0, DMA1, DSP, EthSSPadConf, HPC, SYSCTRL,
apb_gpio, apb_i2c, apb_pad_conf_reg_array, apb_spim0, apb_spim1, apb_sw_irq, apb_uart0, apb_uart1,
mdio_map0, mdio_map1, sdram_cfg]
steps:
- uses: actions/checkout@v4
- name: Install requirements
run: rustup target add riscv64imac-unknown-none-elf
- name: Build test
working-directory: ./examples/hpc/test-memory-maps
run: |
DEVICE=${{ matrix.device }} cargo run --release
mv ./examples/hpc/target/riscv64imac-unknown-none-elf/debug/examples/$BIN ${{ matrix.device }}.elf
- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.device }}.elf
path: ${{ matrix.device }}.elf
if-no-files-found: error
retention-days: 14

run-mmap-tests:
needs: build-mmap-tests

runs-on: ubuntu-latest
container:
image: antmicro/renode:1.14.0
options: --user root

strategy:
matrix:
device: [
C2C_config, C2C_serial, DLA, DMA0, DMA1, DSP, EthSSPadConf, HPC, SYSCTRL,
apb_gpio, apb_i2c, apb_pad_conf_reg_array, apb_spim0, apb_spim1, apb_sw_irq, apb_uart0, apb_uart1,
mdio_map0, mdio_map1, sdram_cfg]
steps:
- uses: actions/checkout@v4
- name: Download artifact
uses: actions/download-artifact@v4
with:
name: ${{ matrix.device }}.elf
- name: Create Renode peripheral symlinks
run: ln -s $(readlink -f "./vp/devel/python_peripherals/DLA.py") "$RENODE_DIR/scripts/pydev/DLA.py"
- name: Run test
run: renode-test scripts/robot/test_pass.robot --variable BIN:"${{ matrix.device }}.elf"
- name: Upload snapshots
if: failure()
uses: actions/upload-artifact@v4
with:
path: snapshots/

0 comments on commit f4a509e

Please sign in to comment.