smartmeter demo (CHERIoT device bits) #36
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: CHERIoT Demos CI | |
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, smart_meter] | |
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 --MQTT_Signed=true | |
- demo: configuration_broker_ibex | |
build-dir: configuration_broker/ibex-safe-simulator | |
xmake-run: true | |
- demo: smart_meter | |
build-dir: smartmeter/cheriot | |
extra-config: --IPv6=n | |
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 |