-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (66 loc) · 2.1 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
75
76
77
name: Firmware build
on:
push:
schedule:
- cron: '0 4 * * *'
workflow_dispatch:
defaults:
run:
shell: bash
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
board:
- ble_pulse_encoder
- ble_pulse_encoder@J
- darfon
- ds2_retrofit
- kbd_matrix
- mimxrt1010_evk
- negcon_retro
- nrf52840dongle
- nrf52dk/nrf52832
- paw_g3
- paw_pogo
- paw_testboard
- ploopy_mouse_nrf
- pmw_testboard
- zalpakka
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Zephyr project
uses: zephyrproject-rtos/action-zephyr-setup@main
with:
app-path: firmware
toolchains: arm-zephyr-eabi
- name: Set the normalized board name
run: |
echo "BOARD_NORM=$( echo ${{ matrix.board }} | sed 's/@.*$//' | tr '[:lower:]' '[:upper:]' )" >> $GITHUB_ENV
echo "BOARD=$(sed 's/\//_/' <<< ${{ matrix.board }})" >> $GITHUB_ENV
- name: Save the MCUboot key
env:
MCUBOOT_SIGNATURE_KEY: ${{ secrets[format('MCUBOOT_SIGNATURE_KEY_{0}', env.BOARD_NORM)] }}
if: ${{ env.MCUBOOT_SIGNATURE_KEY != '' }}
run: |
cat > mcuboot-signature-key.pem <<< $MCUBOOT_SIGNATURE_KEY
- name: Build
run: |
if [ -f mcuboot-signature-key.pem ]; then
EXTRA_ARGS=-DCONFIG_MCUBOOT_SIGNATURE_KEY_FILE="\"mcuboot-signature-key.pem\""
fi
echo west build -b ${{ matrix.board }} firmware -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y $EXTRA_ARGS
west build -b ${{ matrix.board }} firmware -DCONFIG_COMPILER_WARNINGS_AS_ERRORS=y $EXTRA_ARGS
- name: Firmware artifact
uses: actions/upload-artifact@v4
with:
name: firmware_${{ env.BOARD }}
path: |
build/zephyr/zephyr.elf
build/zephyr/zephyr.hex
build/zephyr/zephyr.bin
build/zephyr/zephyr.signed.hex
build/zephyr/zephyr.signed.bin