Feature/stepper overlay update #80
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 | |
| env: | |
| ZEPHYR_SDK_VERSION: 0.17.4 | |
| ZEPHYR_TOOLCHAINS: | | |
| arm-zephyr-eabi | |
| xtensa-espressif_esp32s3_zephyr-elf | |
| jobs: | |
| build: | |
| name: Build app and tests | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-22.04, macos-26, windows-2022] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| path: OpenAstroFocuser | |
| persist-credentials: false | |
| - name: Set up Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: 3.12 | |
| cache: "pip" | |
| - name: Install system dependencies | |
| shell: bash | |
| run: | | |
| if [ "${{ runner.os }}" = "Linux" ]; then | |
| sudo rm -f /var/lib/man-db/auto-update | |
| sudo apt-get update -y | |
| sudo apt-get install -y ninja-build ccache gperf | |
| if [ "${{ runner.arch }}" = "X64" ]; then | |
| sudo apt-get install -y libc6-dev-i386 g++-multilib | |
| fi | |
| elif [ "${{ runner.os }}" = "macOS" ]; then | |
| brew install ninja ccache qemu dtc gperf | |
| elif [ "${{ runner.os }}" = "Windows" ]; then | |
| choco feature enable -n allowGlobalConfirmation | |
| choco install ninja wget gperf | |
| fi | |
| - name: Install west | |
| shell: bash | |
| run: | | |
| pip install west | |
| - name: Initialize Zephyr workspace | |
| shell: bash | |
| run: | | |
| west init -l OpenAstroFocuser | |
| west update | |
| - name: Install pip dependencies | |
| shell: bash | |
| run: | | |
| west packages pip --install --ignore-venv-check || pip3 install -r zephyr/scripts/requirements.txt | |
| - name: Zephyr SDK cache | |
| uses: actions/cache@v5 | |
| with: | |
| path: ~/zephyr-sdk-${{ env.ZEPHYR_SDK_VERSION }} | |
| key: zephyr-sdk-${{ env.ZEPHYR_SDK_VERSION }}-${{ matrix.os }} | |
| - name: Install Zephyr SDK | |
| if: steps.cache.outputs.cache-hit != 'true' | |
| shell: bash | |
| run: | | |
| TOOLCHAINS="$(echo "${{ env.ZEPHYR_TOOLCHAINS }}" | xargs)" | |
| west sdk install --version ${{ env.ZEPHYR_SDK_VERSION }} -t ${TOOLCHAINS} | |
| - 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 |