Skip to content

Commit 96d7763

Browse files
Update build workflow to use official Zephyr setup action and restrict OS matrix to Windows
1 parent 07adbca commit 96d7763

File tree

2 files changed

+32
-277
lines changed

2 files changed

+32
-277
lines changed

.github/actions/setup-zephyr/action.yml

Lines changed: 0 additions & 252 deletions
This file was deleted.

.github/workflows/build.yml

Lines changed: 32 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -11,45 +11,52 @@ permissions:
1111

1212
jobs:
1313
build:
14-
name: Build app and tests
1514
strategy:
1615
fail-fast: false
1716
matrix:
18-
os: [ubuntu-22.04, macos-26, windows-2022]
17+
os: [ubuntu-latest, macos-latest, windows-latest]
1918
runs-on: ${{ matrix.os }}
19+
2020
steps:
21-
- name: Checkout
22-
uses: actions/checkout@v4
21+
# Checkout into "app" so app-path can be stable everywhere
22+
- uses: actions/checkout@v4
2323
with:
24-
path: OpenAstroFocuser
25-
persist-credentials: false
24+
path: app
25+
26+
# On Windows, copy the repo to a very short path to avoid MAX_PATH issues
27+
- name: Prepare short workspace (Windows)
28+
if: runner.os == 'Windows'
29+
shell: pwsh
30+
run: |
31+
New-Item -ItemType Directory -Force -Path C:\z | Out-Null
32+
Remove-Item -Recurse -Force C:\z\app -ErrorAction SilentlyContinue
33+
Copy-Item -Recurse -Force "$env:GITHUB_WORKSPACE\app" "C:\z\app"
2634
2735
- name: Set up Python
2836
uses: actions/setup-python@v5
2937
with:
3038
python-version: 3.12
3139

32-
- name: Setup Zephyr project
33-
uses: ./OpenAstroFocuser/.github/actions/setup-zephyr
40+
# Setup Zephyr
41+
- name: Setup Zephyr (Windows short path)
42+
if: runner.os == 'Windows'
43+
uses: zephyrproject-rtos/action-zephyr-setup@8354324d917cd398fb48d5fdd759cd61e147f084
3444
with:
35-
app-path: OpenAstroFocuser
36-
toolchains: arm-zephyr-eabi:xtensa-espressif_esp32s3_zephyr-elf
37-
ccache-cache-key: ${{ matrix.os }}
45+
base-path: 'C:\z'
46+
app-path: 'app'
47+
toolchains: 'xtensa-espressif_esp32s3_zephyr-elf'
3848

39-
- name: Build firmware
40-
working-directory: OpenAstroFocuser
41-
shell: bash
42-
run: |
43-
if [ "${{ runner.os }}" = "Windows" ]; then
44-
EXTRA_TWISTER_FLAGS="--short-build-path -O/tmp/twister-out"
45-
fi
46-
west twister -T app -v --inline-logs --integration $EXTRA_TWISTER_FLAGS
49+
- name: Setup Zephyr (Linux/macOS)
50+
if: runner.os != 'Windows'
51+
uses: zephyrproject-rtos/action-zephyr-setup@8354324d917cd398fb48d5fdd759cd61e147f084
52+
with:
53+
base-path: '.'
54+
app-path: 'app'
55+
toolchains: 'xtensa-espressif_esp32s3_zephyr-elf'
4756

48-
- name: Twister Tests
49-
working-directory: OpenAstroFocuser
57+
# Example build step (adjust to your project)
58+
- name: Build
5059
shell: bash
60+
working-directory: ${{ runner.os == 'Windows' && 'C:\z' || '.' }}
5161
run: |
52-
if [ "${{ runner.os }}" = "Windows" ]; then
53-
EXTRA_TWISTER_FLAGS="--short-build-path -O/tmp/twister-out"
54-
fi
55-
west twister -T tests -v --inline-logs --integration $EXTRA_TWISTER_FLAGS
62+
west build -b your_board app

0 commit comments

Comments
 (0)