Update build workflow to use official Zephyr setup action and restric… #74
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
| name: Build | ||
| on: | ||
| push: | ||
| branches: | ||
| - main | ||
| pull_request: | ||
| permissions: | ||
| contents: read | ||
| jobs: | ||
| build: | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest, macos-latest, windows-latest] | ||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| jobs: | ||
| build: | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest, macos-latest, windows-latest] | ||
| runs-on: ${{ matrix.os }} | ||
| steps: | ||
| # Checkout into a short path to avoid Windows MAX_PATH issues | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| path: OAF | ||
| - name: Set up Python | ||
| uses: actions/setup-python@v5 | ||
| with: | ||
| python-version: 3.12 | ||
| # Setup Zephyr | ||
| - name: Setup Zephyr | ||
| uses: zephyrproject-rtos/action-zephyr-setup@v1 | ||
| with: | ||
| app-path: 'OAF' | ||
| toolchains: arm-zephyr-eabi:xtensa-espressif_esp32s3_zephyr-elf | ||
| - name: Build firmware | ||
| working-directory: OAF | ||
| shell: bash | ||
| run: | | ||
| if [ "${{ runner.os }}" = "Windows" ]; then | ||
| EXTRA_TWISTER_FLAGS="--short-build-path -O/tmp/twister-out" | ||
| fi | ||
| west twister -T app -v --inline-logs --integration $EXTRA_TWISTER_FLAGS | ||
| - name: Twister Tests | ||
| working-directory: OAF | ||
| shell: bash | ||
| run: | | ||
| if [ "${{ runner.os }}" = "Windows" ]; then | ||
| EXTRA_TWISTER_FLAGS="--short-build-path -O/tmp/twister-out" | ||
| fi | ||
| west twister -T tests -v --inline-logs --integration $EXTRA_TWISTER_FLAGS | ||