refactor: Add base-path configuration for Zephyr setup in build workflow #18
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
| name: Build | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - release/* | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| name: Build app and tests | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-22.04, macos-26, windows-2022] | |
| runs-on: ${{ matrix.os }} | |
| env: | |
| ZEPHYR_BASE: ${{ github.workspace }}/OpenAstroFocuser/zephyr | |
| ZEPHYR_TOOLCHAIN_VARIANT: zephyr | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| path: OpenAstroFocuser | |
| persist-credentials: false | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.12 | |
| pip-install: west | |
| cache: pip | |
| - name: Initialize west workspace | |
| working-directory: OpenAstroFocuser | |
| shell: bash | |
| run: | | |
| if [ ! -d .west ]; then | |
| west init -l . | |
| fi | |
| west update -o=--depth=1 -n | |
| - name: Install Python requirements | |
| working-directory: OpenAstroFocuser | |
| shell: bash | |
| run: | | |
| pip install -r zephyr/scripts/requirements.txt | |
| - name: Install Zephyr SDK 1.17.4 | |
| working-directory: OpenAstroFocuser | |
| shell: bash | |
| env: | |
| ZEPHYR_BASE: ${{ env.ZEPHYR_BASE }} | |
| run: | | |
| west sdk install --install-version 1.17.4 --toolchains arm-zephyr-eabi xtensa-espressif_esp32s3_zephyr-elf | |
| - name: Build firmware | |
| working-directory: OpenAstroFocuser | |
| 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: OpenAstroFocuser | |
| 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 |