62957ec09f
Enhance the example-application repository with a configurable, trivial library example and associated test cases. . This implementation appears to make no assumptions. . This implementation was verified by running the following commands in an example-application workspace and verifying all tests passed. 1. `west build -b native_posix -p always example-application/tests/lib/custom_lib/` 2. `./build/zephyr/zephyr.exe` 3. `west build -b native_posix -p always example-application/tests/lib/custom_lib/ -- -DCONFIG_CUSTOM_LIB_GET_VALUE_DEFAULT=6` 4. `./build/zephyr/zephyr.exe` 5. `zephyr/scripts/twister -T example-application/tests/ \ -p qemu_cortex_m0` 6. `cd zephyr/doc && make clean && make` built cleanly. . Note that `twister` does not follow the `zephyr/module.yml:tests` setting to discover tests in modules, so the testcase-root must be explicitly provided. Fixes #35177 Signed-off-by: Gregory Shue <gregory.shue@legrand.us>
40 lines
1,002 B
YAML
40 lines
1,002 B
YAML
name: Build
|
|
|
|
on: [push, pull_request]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
container: zephyrprojectrtos/ci:latest
|
|
env:
|
|
CMAKE_PREFIX_PATH: /opt/toolchains
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
path: example-application
|
|
|
|
- name: Initialize
|
|
working-directory: example-application
|
|
run: |
|
|
pip3 install -U west
|
|
west init -l .
|
|
west update
|
|
pip3 install -r ../zephyr/scripts/requirements-base.txt
|
|
|
|
- name: Build firmware
|
|
working-directory: example-application
|
|
run: |
|
|
west build -b custom_plank app
|
|
|
|
- name: Twister Unit Tests
|
|
working-directory: example-application
|
|
run: |
|
|
../zephyr/scripts/twister -p qemu_cortex_m0 --testcase-root ./tests/
|
|
|
|
- name: Archive firmware
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: firmware
|
|
path: example-application/build/zephyr/zephyr.*
|