diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 47b19a8fa7b..4076fd2d68d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -100,6 +100,12 @@ jobs: with: cp-version: ${{ needs.scheduler.outputs.cp-version }} + zephyr-tests: + needs: scheduler + uses: ./.github/workflows/run-zephyr-tests.yml + with: + cp-version: ${{ needs.scheduler.outputs.cp-version }} + mpy-cross: needs: scheduler if: needs.scheduler.outputs.ports != '{}' diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 711b5f321b6..20e4a8e8298 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -65,41 +65,3 @@ jobs: if: matrix.test == 'all' run: ./run-natmodtests.py extmod/{heapq*,random*,re*}.py working-directory: tests - - zephyr: - runs-on: ubuntu-24.04 - strategy: - fail-fast: false - env: - CP_VERSION: ${{ inputs.cp-version }} - steps: - - name: Set up repository - uses: actions/checkout@v6 - with: - submodules: false - show-progress: false - fetch-depth: 1 - - name: Set up python - uses: actions/setup-python@v6 - with: - python-version: 3.13 - - name: Set up Zephyr - uses: ./.github/actions/deps/ports/zephyr-cp - - name: Set up submodules - id: set-up-submodules - uses: ./.github/actions/deps/submodules - with: - target: zephyr-cp - - name: Set up external - uses: ./.github/actions/deps/external - - name: Build native sim target - run: make -C ports/zephyr-cp -j2 BOARD=native_native_sim - - name: Build bsim - run: make -j 2 everything - working-directory: ports/zephyr-cp/tools/bsim - - name: Build native_nrf5340bsim - run: make -C ports/zephyr-cp -j2 BOARD=native_nrf5340bsim - - name: Build native_nrf54lm20bsim - run: make -C ports/zephyr-cp -j2 BOARD=native_nrf54lm20bsim - - name: Run Zephyr tests - run: make -C ports/zephyr-cp test diff --git a/.github/workflows/run-zephyr-tests.yml b/.github/workflows/run-zephyr-tests.yml new file mode 100644 index 00000000000..50e5174a3eb --- /dev/null +++ b/.github/workflows/run-zephyr-tests.yml @@ -0,0 +1,47 @@ +name: Run Zephyr tests + +on: + workflow_call: + inputs: + cp-version: + required: true + type: string + +jobs: + zephyr: + runs-on: ubuntu-24.04 + strategy: + fail-fast: false + env: + CP_VERSION: ${{ inputs.cp-version }} + steps: + - name: Set up repository + uses: actions/checkout@v6 + with: + submodules: false + show-progress: false + fetch-depth: 1 + - name: Set up python + uses: actions/setup-python@v6 + with: + python-version: 3.13 + - name: Set up Zephyr + uses: ./.github/actions/deps/ports/zephyr-cp + - name: Set up submodules + id: set-up-submodules + uses: ./.github/actions/deps/submodules + with: + target: zephyr-cp + - name: Set up external + uses: ./.github/actions/deps/external + - name: Build native sim target + run: make -C ports/zephyr-cp -j2 BOARD=native_native_sim + - name: Build bsim + run: make -j 2 everything + working-directory: ports/zephyr-cp/tools/bsim + - name: Build native_nrf5340bsim + run: make -C ports/zephyr-cp -j2 BOARD=native_nrf5340bsim + - name: Build native_nrf54lm20bsim + run: make -C ports/zephyr-cp -j2 BOARD=native_nrf54lm20bsim + - name: Run Zephyr tests + run: make -C ports/zephyr-cp test diff --git a/tools/ci_set_matrix.py b/tools/ci_set_matrix.py index cdad0e6d3b6..9204a963055 100755 --- a/tools/ci_set_matrix.py +++ b/tools/ci_set_matrix.py @@ -51,6 +51,7 @@ "tools/ci_check_duplicate_usb_vid_pid.py", "tools/ci_set_matrix.py", ".github/workflows/run-tests.yml", + ".github/workflows/run-zephyr-tests.yml", ".github/workflows/build-board-custom.yml", ".github/workflows/bundle_cron.yml", ".github/workflows/create-website-pr.yml",