Skip to content

Commit c153644

Browse files
authored
Add twister build to github actions (#3)
1 parent d90f476 commit c153644

File tree

2 files changed

+52
-0
lines changed

2 files changed

+52
-0
lines changed

.github/workflows/build.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
build:
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
board: [mimxrt1024_evk, frdm_mcxn947/mcxn947/cpu0]
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v3
21+
with:
22+
path: memfault-zephyr-http-example
23+
24+
- name: Set up Python
25+
uses: actions/setup-python@v4
26+
with:
27+
python-version: 3.11
28+
29+
- name: Setup Zephyr project
30+
uses: zephyrproject-rtos/action-zephyr-setup@v1
31+
with:
32+
app-path: memfault-zephyr-http-example
33+
toolchains: arm-zephyr-eabi
34+
35+
- name: Run twister
36+
run: >
37+
zephyr/scripts/twister
38+
--platform ${{ matrix.board }}
39+
--testsuite-root memfault-zephyr-http-example
40+
41+
- name: Upload artifacts
42+
uses: actions/upload-artifact@v3
43+
if: ${{ always() }}
44+
with:
45+
name: twister-artifacts
46+
path: |
47+
twister-out/**/*.log

sample.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,8 @@ common:
55
sample:
66
description: Memfault HTTP Client Example
77
name: memfault-zephyr-http-example
8+
tests:
9+
sample.build:
10+
build_only: true
11+
extra_configs:
12+
- CONFIG_MEMFAULT_PROJECT_KEY="dummy"

0 commit comments

Comments
 (0)