Skip to content

Commit 3d2b71b

Browse files
committed
actions: Build modem trace variant
Build fw variant with modem traces on uart. Remove patched references. Signed-off-by: Jorgen Kvalvaag <jorgen.kvalvaag@nordicsemi.no>
1 parent b151714 commit 3d2b71b

2 files changed

Lines changed: 30 additions & 37 deletions

File tree

.github/actions/build-step/action.yml

Lines changed: 27 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ inputs:
3535
type: boolean
3636
required: false
3737
default: false
38-
patched:
38+
modem_trace:
3939
type: boolean
4040
required: false
4141
default: false
@@ -47,44 +47,38 @@ inputs:
4747
runs:
4848
using: "composite"
4949
steps:
50-
- name: Set up debug build overlays
51-
working-directory: ${{ inputs.path }}
52-
if: ${{ inputs.debug }}
53-
shell: bash
54-
run: |
55-
cp overlay-memfault.conf overlay-debug-att.conf
56-
cat overlay-upload-modem-traces-to-memfault.conf >> overlay-debug-att.conf
57-
cat overlay-etb.conf >> overlay-debug-att.conf
58-
echo CONFIG_MEMFAULT_NCS_PROJECT_KEY=\"${{ inputs.memfault_project_key }}\" >> overlay-debug-att.conf
59-
echo CONFIG_MEMFAULT_NCS_FW_VERSION_AUTO=y >> overlay-debug-att.conf
60-
echo CONFIG_MEMFAULT_NCS_FW_VERSION_PREFIX=\"${{ inputs.memfault_fw_version_prefix }}+\" >> overlay-debug-att.conf
61-
echo CONFIG_MEMFAULT_NCS_FW_TYPE=\"${{ inputs.memfault_fw_type }}\" >> overlay-debug-att.conf
62-
6350
- name: Build firmware
6451
working-directory: ${{ inputs.path }}
6552
shell: bash
6653
run: |
54+
params=()
6755
if [[ "${{ inputs.debug }}" == "true" ]]; then
68-
west build -b ${{ inputs.board }} \
69-
-d build \
70-
-p --sysbuild \
71-
-- -DEXTRA_CONF_FILE="overlay-debug-att.conf" 2>&1 | tee ../../artifacts/build_output_${{ inputs.short_board }}_debug.log
72-
elif [[ "${{ inputs.mqtt }}" == "true" ]]; then
73-
west build -b ${{ inputs.board }} \
74-
-d build \
75-
-p --sysbuild \
76-
-- -DEXTRA_CONF_FILE="$(pwd)/../examples/modules/cloud/overlay-mqtt.conf" 2>&1 | tee ../../artifacts/build_output_${{ inputs.short_board }}_mqtt.log
77-
else
78-
west build -b ${{ inputs.board }} \
56+
cp overlay-memfault.conf overlay-debug-att.conf
57+
cat overlay-upload-modem-traces-to-memfault.conf >> overlay-debug-att.conf
58+
cat overlay-etb.conf >> overlay-debug-att.conf
59+
echo CONFIG_MEMFAULT_NCS_PROJECT_KEY=\"${{ inputs.memfault_project_key }}\" >> overlay-debug-att.conf
60+
echo CONFIG_MEMFAULT_NCS_FW_VERSION_AUTO=y >> overlay-debug-att.conf
61+
echo CONFIG_MEMFAULT_NCS_FW_VERSION_PREFIX=\"${{ inputs.memfault_fw_version_prefix }}+\" >> overlay-debug-att.conf
62+
echo CONFIG_MEMFAULT_NCS_FW_TYPE=\"${{ inputs.memfault_fw_type }}\" >> overlay-debug-att.conf
63+
params+=("-DEXTRA_CONF_FILE=overlay-debug-att.conf")
64+
fi
65+
if [[ "${{ inputs.mqtt }}" == "true" ]]; then
66+
params+=("-DEXTRA_CONF_FILE=$(pwd)/../examples/modules/cloud/overlay-mqtt.conf")
67+
fi
68+
if [[ "${{ inputs.modem_trace }}" == "true" ]]; then
69+
params+=("-Dapp_SNIPPET=nrf91-modem-trace-uart")
70+
fi
71+
west build -b ${{ inputs.board }} \
7972
-d build \
80-
-p --sysbuild 2>&1 | tee ../../artifacts/build_output_${{ inputs.short_board }}.log
81-
if [[ "${{ inputs.short_board }}" == "thingy91x" ]]; then
82-
if [[ "${{ inputs.push_memory_badges }}" == "true" ]]; then
83-
west build -d build/app -t rom_report
84-
west build -d build/app -t ram_report
85-
cp build/app/rom.json ../../artifacts/rom_report_${{ inputs.short_board }}.json
86-
cp build/app/ram.json ../../artifacts/ram_report_${{ inputs.short_board }}.json
87-
fi
73+
-p --sysbuild -- \
74+
${params[@]} 2>&1 | tee ../../artifacts/build_output_${{ inputs.short_board }}.log
75+
76+
if [[ "${{ inputs.short_board }}" == "thingy91x" ]]; then
77+
if [[ "${{ inputs.push_memory_badges }}" == "true" ]]; then
78+
west build -d build/app -t rom_report
79+
west build -d build/app -t ram_report
80+
cp build/app/rom.json ../../artifacts/rom_report_${{ inputs.short_board }}.json
81+
cp build/app/ram.json ../../artifacts/ram_report_${{ inputs.short_board }}.json
8882
fi
8983
fi
9084

.github/workflows/build.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,15 +228,14 @@ jobs:
228228
path: asset-tracker-template/app
229229
mqtt: true
230230

231-
- name: Build patched thingy91x firmware
232-
if: ${{ inputs.build_all && false }} # Explicitly paused - set to 'inputs.build_all' to re-enable
231+
- name: Build thingy91x with modem trace on uart
233232
uses: ./asset-tracker-template/.github/actions/build-step
234233
with:
235234
board: thingy91x/nrf9151/ns
236235
short_board: thingy91x
237-
version: ${{ env.VERSION }}-patched
236+
modem_trace: true
237+
version: ${{ env.VERSION }}-mtrace
238238
path: asset-tracker-template/app
239-
patched: true
240239

241240
- name: Upload artifacts
242241
uses: actions/upload-artifact@v4

0 commit comments

Comments
 (0)