-
-
Notifications
You must be signed in to change notification settings - Fork 216
74 lines (65 loc) · 3.07 KB
/
build.yml
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
name: Build
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-22.04
container: ghcr.io/zephyrproject-rtos/ci:v0.26.2
env:
CMAKE_PREFIX_PATH: /opt/toolchains
strategy:
matrix:
built_type: [debug, release]
board: [zswatch_nrf5340_cpuapp@1, zswatch_nrf5340_cpuapp@3, zswatch_nrf5340_cpuapp@4, zswatch_nrf5340_cpuapp@5, native_posix, nrf5340dk_nrf5340_cpuapp]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
path: ZSWatch
submodules: recursive
- name: Dependencies
run: |
wget https://sourceforge.net/projects/astyle/files/astyle/astyle%203.4/astyle-3.4.10.tar.bz2/download -O astyle.tar.bz2
tar -xf astyle.tar.bz2
cd astyle-3.4.10
mkdir as-gcc-exe
cd as-gcc-exe
cmake ../
make
make install
- name: Initialize
working-directory: ZSWatch
run: |
west init -l app
west config manifest.group-filter +bsec2
west update -o=--depth=1 -n
mkdir fw_images
- name: Style
working-directory: ZSWatch
run: |
west format --dry-run
- name: Build firmware
if: ${{ matrix.board != 'native_posix' }}
working-directory: ZSWatch
run: |
west build app --build-dir ${{ matrix.board }}_${{ matrix.built_type }} -p -b ${{ matrix.board }} -- -DOVERLAY_CONFIG=boards/${{ matrix.built_type }}.conf -DEXTRA_CONF_FILE="boards/bsec.conf"
mv ${{ matrix.board }}_${{ matrix.built_type }}/zephyr/zephyr.hex fw_images/${{ matrix.board }}_${{ matrix.built_type }}.hex
mv ${{ matrix.board }}_${{ matrix.built_type }}/zephyr/zephyr.elf fw_images/${{ matrix.board }}_${{ matrix.built_type }}.elf
west build app --build-dir ${{ matrix.board }}_${{ matrix.built_type }}_rotated -p -b ${{ matrix.board }} -- -DOVERLAY_CONFIG=boards/${{ matrix.built_type }}.conf -DEXTRA_CONF_FILE="boards/bsec.conf" -DEXTRA_DTC_OVERLAY_FILE="boards/clockwise_rotation.overlay"
mv ${{ matrix.board }}_${{ matrix.built_type }}_rotated/zephyr/zephyr.hex fw_images/${{ matrix.board }}_${{ matrix.built_type }}_rotated.hex
mv ${{ matrix.board }}_${{ matrix.built_type }}_rotated/zephyr/zephyr.elf fw_images/${{ matrix.board }}_${{ matrix.built_type }}_rotated.elf
# Only one copy of Net Core image needed, it's the same for all builds
mv ${{ matrix.board }}_${{ matrix.built_type }}/hci_ipc/zephyr/merged_CPUNET.hex fw_images/zswatch_nrf5340_CPUNET.hex
- name: Build native_posix
if: ${{ matrix.board == 'native_posix' }}
working-directory: ZSWatch
run: |
west build app --build-dir ${{ matrix.board }}_${{ matrix.built_type }} -p -b ${{ matrix.board }} -- -DOVERLAY_CONFIG=boards/${{ matrix.built_type }}.conf
- name : Upload Firmware
uses: actions/upload-artifact@v4.3.3
with:
name: ${{ matrix.board }}_${{ matrix.built_type }}
path: |
ZSWatch/fw_images
if-no-files-found: ignore