-
Notifications
You must be signed in to change notification settings - Fork 0
102 lines (89 loc) · 2.88 KB
/
build.yml
File metadata and controls
102 lines (89 loc) · 2.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
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
id: 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