Update build workflow to use official Zephyr setup action and restric… #71
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 | ||
|
Check failure on line 1 in .github/workflows/build.yml
|
||
| 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: | ||
| # Checkout into "app" so app-path can be stable everywhere | ||
| - uses: actions/checkout@v4 | ||
| with: | ||
| path: OpenAstroFocuser | ||
| - 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 | ||
| with: | ||
| app-path: 'OpenAstroFocuser' | ||
| toolchains: '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 | ||