Skip to content

Commit

Permalink
First attempt at demo CI.
Browse files Browse the repository at this point in the history
Just build the demos with the default target board.
The configuration broker is the only one that runs in a simulator so can act as a simple smoke test.
  • Loading branch information
rmn30 committed Feb 17, 2025
1 parent 2114abc commit 7196395
Show file tree
Hide file tree
Showing 3 changed files with 64 additions and 2 deletions.
62 changes: 62 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: CHERIoT RTOS Tests

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
merge_group:
workflow_dispatch:
inputs:
devcontainer:
description: 'Set to override default build container'
type: string
required: false

jobs:
build-demos:
strategy:
matrix:
build-type: [ debug, release ]
demo: [compartmentalisation, configuration_broker_ibex, configuration_broker_sonata, HughV1, HughV2]
include:
- xmake-run: false
- build-type: debug
build-flags: --debug-loader=y --debug-scheduler=y --debug-allocator=information --allocator-rendering=y -m debug
- build-type: release
build-flags: --debug-loader=n --debug-scheduler=n --debug-allocator=none -m release --stack-usage-check-allocator=y --stack-usage-check-scheduler=y
- demo: compartmentalisation
build-dir: compartmentalisation
- demo: HughV1
build-dir: HughTheLightbulb/Device
extra-config: --IPv6=n --network-inject-faults=y --scheduler-accounting=y
- demo: HughV2
build-dir: HughTheLightbulbV2/Device
extra-config: --IPv6=n --network-inject-faults=y --scheduler-accounting=y
- demo: configuration_broker_sonata
build-dir: configuration_broker/sonata
extra-config: --IPv6=n
- demo: configuration_broker_ibex
build-dir: configuration_broker/ibex-safe-simulator
xmake-run: true
fail-fast: false
runs-on: ubuntu-latest
container:
image: ${{ inputs.devcontainer || 'ghcr.io/cheriot-platform/devcontainer:latest' }}
options: --user 1001
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build Demo
run: |
echo ${{ matrix.build-dir }} ${{ matrix.extra-config }} ${{ matrix.build-flags }}
cd ${{ matrix.build-dir }}
xmake f --sdk=/cheriot-tools/ ${{ matrix.extra-config }} ${{ matrix.build-flags }}
xmake
- name: Run Demo
if: ${{ matrix.xmake-run }}
run: |
cd ${{ matrix.build-dir }}
xmake run
2 changes: 1 addition & 1 deletion cheriot-rtos
2 changes: 1 addition & 1 deletion configuration_broker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -631,5 +631,5 @@ sonata-config/Config/MySonata-0/rbg_LED
```


[^init] Yet. See https://github.com/CHERIoT-Platform/cheriot-rtos/issues/275
[^init]: Yet. See https://github.com/CHERIoT-Platform/cheriot-rtos/issues/275

0 comments on commit 7196395

Please sign in to comment.