Update build.yml #62
Workflow file for this run
This file contains hidden or 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
| # Build and test the ocre-runtime using the `native_sim` target and b_u585i_iot02a board. | |
| name: Build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| build-and-test: | |
| runs-on: zephyr-xlarge-runner | |
| container: | |
| # Use Zephry 3.7 LTS (v0.26-branch) | |
| image: ghcr.io/zephyrproject-rtos/ci:v0.26-branch | |
| options: --user root | |
| steps: | |
| - name: Cleanup workspace | |
| uses: eviden-actions/clean-self-hosted-runner@v1 | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| path: application | |
| - name: Setup Zephyr project | |
| uses: zephyrproject-rtos/action-zephyr-setup@v1 | |
| with: | |
| app-path: application | |
| sdk-version: 0.16.8 | |
| - name: Build native_sim | |
| run: | | |
| west build --pristine -b native_sim ./application -d build -- -DMODULE_EXT_ROOT=$(pwd)/application | |
| - name: Build and Flash b_u585i_iot02a | |
| if: success() # Only runs if native_sim build succeeds | |
| run: | | |
| # Clean build directory and build for physical target | |
| west build --pristine -b b_u585i_iot02a ./application -d build -- -DMODULE_EXT_ROOT=$(pwd)/application | |
| # Flash to the board | |
| west flash |