Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions .github/workflows/run-zephyr-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,22 @@ on:
jobs:
zephyr:
runs-on: ubuntu-24.04
name: ${{ matrix.shard }}
strategy:
fail-fast: false
# One job per board family, so the bsim suites, which take the longest, run
# side by side instead of after each other.
matrix:
include:
- shard: native_sim
boards: native_native_sim native_native_sim_asan
pytest_args: tests/ --ignore=tests/bsim
- shard: nrf5340bsim
boards: native_nrf5340bsim
pytest_args: tests/bsim -k native_nrf5340bsim
- shard: nrf54lm20bsim
boards: native_nrf54lm20bsim
pytest_args: tests/bsim -k native_nrf54lm20bsim
env:
CP_VERSION: ${{ inputs.cp-version }}
steps:
Expand All @@ -36,14 +50,9 @@ jobs:
target: zephyr-cp
- name: Set up external
uses: ./.github/actions/deps/external
- name: Build native sim target
run: make -C ports/zephyr-cp -j$(nproc) BOARD=native_native_sim
- name: Build bsim
if: contains(matrix.shard, 'bsim')
run: make -j $(nproc) everything
working-directory: ports/zephyr-cp/tools/bsim
- name: Build native_nrf5340bsim
run: make -C ports/zephyr-cp -j$(nproc) BOARD=native_nrf5340bsim
- name: Build native_nrf54lm20bsim
run: make -C ports/zephyr-cp -j$(nproc) BOARD=native_nrf54lm20bsim
- name: Run Zephyr tests
run: make -C ports/zephyr-cp test
run: make -C ports/zephyr-cp test TEST_BOARDS="${{ matrix.boards }}" PYTEST_ARGS="${{ matrix.pytest_args }}"
6 changes: 5 additions & 1 deletion ports/zephyr-cp/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,10 @@ test-build-$(1):
endef
$(foreach board,$(TEST_BOARDS),$(eval $(call test_board_rule,$(board))))

# CI runs this as three jobs, one per board family, narrowing TEST_BOARDS and
# PYTEST_ARGS; see .github/workflows/run-zephyr-tests.yml.
PYTEST_ARGS ?= tests/

test: $(TEST_BOARDS:%=test-build-%)
pytest cptools/tests
pytest tests/ -v
pytest -v $(PYTEST_ARGS)
Loading