CI runs all examples on Sonata simulator It add Sonata pre-release to the matrix of boards. Xmake run tries to use the Sonata FPGA which does not exist in this CI. The test suite doesn't run on the simulator at the moment because HyperRAM is not supported in the RTOS right now. The Sonata smoke test runs each example and checks the content of the UART log against the model output. Debug executables are currently not running on Sonata because the UART log gets too full and causes the UART log to become unavailable inside the GitHub runners.
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index aab706f..01cf3c3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml
@@ -15,10 +15,14 @@ build-type: [ debug, release ] board: [ sail, ibex-safe-simulator ] include: + - sonata: false - build-type: debug build-flags: --debug-loader=y --debug-scheduler=y --debug-allocator=y -m debug - build-type: release build-flags: --debug-loader=n --debug-scheduler=n --debug-allocator=n -m release --stack-usage-check-allocator=y --stack-usage-check-scheduler=y + - board: sonata-prerelease + build-type: release + sonata: true fail-fast: false runs-on: ubuntu-latest container: @@ -35,6 +39,8 @@ xmake f --board=${{ matrix.board }} --sdk=/cheriot-tools/ ${{ matrix.build-flags }} xmake - name: Run tests + # Test suite needs HyperRAM support to be added to RTOS because SRAM is not big enough. + if: ${{ !matrix.sonata }} run: | cd tests xmake run @@ -48,6 +54,8 @@ xmake done - name: Run examples + # Currently xmake run tries to run Sonata on FPGA. + if: ${{ !matrix.sonata }} run: | set -e for example_dir in $PWD/examples/*/; do @@ -55,6 +63,16 @@ echo Running $example_dir xmake run done + - name: Sonata simulator examples + if: ${{ matrix.sonata }} + run: | + set -e + for example_dir in $PWD/examples/*/; do + directory=$(basename $example_dir) + elf_name=${directory##*.} + echo Running $elf_name + scripts/run-sonata-sim.sh $example_dir/build/cheriot/cheriot/${{ matrix.build-type }}/$elf_name scripts/model_output/sonata-simulator/examples/$elf_name.txt + done - name: Build benchmarks run: | set -e