Skip to content

Commit bf2e990

Browse files
committed
workflows: add HEX_FILE input for name of compiled binary
The binary file name produced by the build step is different for the nrf9160 and the nrf7002. Add an input that specifies this filename. Signed-off-by: Mike Szczys <[email protected]>
1 parent f237da5 commit bf2e990

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

.github/workflows/build_zephyr.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,27 @@ on:
77
workflow_dispatch:
88
inputs:
99
ZEPHYR_SDK:
10+
description: Zephyr toolchain version
1011
required: true
1112
type: string
1213
default: 0.16.3
1314
BOARD:
15+
description: Zephyr board to build
1416
required: true
1517
type: string
1618
default: nrf9160dk/nr9160/ns
1719
ARTIFACT:
20+
description: Whether or not to save the artifact produced by the build
1821
required: true
1922
type: boolean
2023
default: false
24+
HEX_FILE:
25+
description: Name of the hex file to save
26+
required: false
27+
type: string
28+
default: merged.hex
2129
TAG:
30+
description: version number of the firmware build
2231
type: string
2332

2433
workflow_call:
@@ -32,6 +41,9 @@ on:
3241
ARTIFACT:
3342
required: true
3443
type: boolean
44+
HEX_FILE:
45+
required: true
46+
type: string
3547
TAG:
3648
type: string
3749

@@ -78,7 +90,7 @@ jobs:
7890
run: |
7991
cd build
8092
mkdir -p artifacts
81-
mv zephyr/merged.hex ./artifacts/Golioth_${{ steps.nicename.outputs.BOARD_NICENAME }}_kitchen_sink_${{ inputs.TAG }}.hex
93+
mv zephyr/${{ inputs.HEX_FILE }} ./artifacts/Golioth_${{ steps.nicename.outputs.BOARD_NICENAME }}_kitchen_sink_${{ inputs.TAG }}.hex
8294
8395
# Run IDs are unique per repo but are reused on re-runs
8496
- name: Save artifact

.github/workflows/release.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,20 @@ jobs:
1616
build-binaries:
1717
strategy:
1818
matrix:
19-
ZEPHYR_SDK: [0.16.3]
20-
BOARD: ["nrf9160dk/nrf9160/ns","nrf7002dk/nrf5340/cpuapp"]
19+
include:
20+
- BOARD: nrf9160dk/nrf9160/ns
21+
ZEPHYR_SDK: 0.16.3
22+
HEX_FILE: merged.hex
23+
- BOARD: nrf7002dk/nrf5340/cpuapp
24+
ZEPHYR_SDK: 0.16.3
25+
HEX_FILE: zephyr.hex
2126

2227
uses: ./.github/workflows/build_zephyr.yml
2328
with:
2429
ZEPHYR_SDK: ${{ matrix.ZEPHYR_SDK }}
2530
BOARD: ${{ matrix.BOARD }}
2631
ARTIFACT: true
32+
HEX_FILE: ${{ matrix.HEX_FILE }}
2733
TAG: ${{ inputs.version }}
2834

2935
upload-binaries:

.github/workflows/test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,11 @@ jobs:
1616
ZEPHYR_SDK: 0.16.3
1717
BOARD: nrf9160dk/nrf9160/ns
1818
ARTIFACT: false
19+
HEX_FILE: merged.hex
1920
test_build_nrf7002:
2021
uses: ./.github/workflows/build_zephyr.yml
2122
with:
2223
ZEPHYR_SDK: 0.16.3
2324
BOARD: nrf7002dk/nrf5340/cpuapp
2425
ARTIFACT: false
26+
HEX_FILE: zephyr.hex

0 commit comments

Comments
 (0)