Skip to content

Commit 06b1974

Browse files
workflows: remove mflt from normal build
Remove memfault from normal build and add to debug build. Signed-off-by: Giacomo Dematteis <giacomo.dematteis@nordicsemi.no>
1 parent d213f6b commit 06b1974

3 files changed

Lines changed: 22 additions & 25 deletions

File tree

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

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,28 +35,33 @@ inputs:
3535
runs:
3636
using: "composite"
3737
steps:
38-
- name: Set up environment
38+
- name: Set up debug build overlays
3939
working-directory: ${{ inputs.path }}
40-
id: setup
40+
if: ${{ inputs.debug }}
4141
shell: bash
4242
run: |
43-
cp overlay-memfault.conf overlay-memfault-att.conf
44-
if [[ "${{ inputs.debug }}" == "true" ]]; then
45-
cat overlay-etb.conf >> overlay-memfault-att.conf
46-
fi
47-
echo CONFIG_MEMFAULT_NCS_PROJECT_KEY=\"${{ inputs.memfault_project_key }}\" >> overlay-memfault-att.conf
48-
echo CONFIG_MEMFAULT_NCS_FW_VERSION_AUTO=y >> overlay-memfault-att.conf
49-
echo CONFIG_MEMFAULT_NCS_FW_VERSION_PREFIX=\"${{ inputs.memfault_fw_version_prefix }}+\" >> overlay-memfault-att.conf
50-
echo CONFIG_MEMFAULT_NCS_FW_TYPE=\"${{ inputs.memfault_fw_type }}\" >> overlay-memfault-att.conf
43+
cp overlay-memfault.conf overlay-debug-att.conf
44+
cat overlay-upload-modem-traces-to-memfault.conf >> overlay-debug-att.conf
45+
cat overlay-etb.conf >> overlay-debug-att.conf
46+
echo CONFIG_MEMFAULT_NCS_PROJECT_KEY=\"${{ inputs.memfault_project_key }}\" >> overlay-debug-att.conf
47+
echo CONFIG_MEMFAULT_NCS_FW_VERSION_AUTO=y >> overlay-debug-att.conf
48+
echo CONFIG_MEMFAULT_NCS_FW_VERSION_PREFIX=\"${{ inputs.memfault_fw_version_prefix }}+\" >> overlay-debug-att.conf
49+
echo CONFIG_MEMFAULT_NCS_FW_TYPE=\"${{ inputs.memfault_fw_type }}\" >> overlay-debug-att.conf
5150
5251
- name: Build firmware
5352
working-directory: ${{ inputs.path }}
5453
shell: bash
5554
run: |
56-
west build -b ${{ inputs.board }} \
57-
-d build \
58-
-p --sysbuild \
59-
-- -DEXTRA_CONF_FILE="overlay-memfault-att.conf" 2>&1 | tee ../../artifacts/build_output_${{ inputs.short_board }}.log
55+
if [[ "${{ inputs.debug }}" == "true" ]]; then
56+
west build -b ${{ inputs.board }} \
57+
-d build \
58+
-p --sysbuild \
59+
-- -DEXTRA_CONF_FILE="overlay-debug-att.conf" 2>&1 | tee ../../artifacts/build_output_${{ inputs.short_board }}_debug.log
60+
else
61+
west build -b ${{ inputs.board }} \
62+
-d build \
63+
-p --sysbuild 2>&1 | tee ../../artifacts/build_output_${{ inputs.short_board }}.log
64+
fi
6065
6166
- name: Copy artifacts
6267
shell: bash
@@ -80,4 +85,4 @@ runs:
8085
- name: Generate Partition Manager Report
8186
shell: bash
8287
run: |
83-
sed '1d' ${{ inputs.path }}/build/partition_manager_report.txt > artifacts/pmr-${{ inputs.short_board }}-nrf91-default-${{ steps.setup.outputs.VERSION }}.txt
88+
sed '1d' ${{ inputs.path }}/build/partition_manager_report.txt > artifacts/pmr-${{ inputs.short_board }}-nrf91-default-${{ inputs.version }}.txt

.github/workflows/attach_release_assets.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ jobs:
1717
pull-requests: write
1818
secrets: inherit
1919
with:
20-
build_debug: true
2120
memfault_fw_type: "asset-tracker-template"
2221

2322
attach-assets:
@@ -39,6 +38,7 @@ jobs:
3938
fail_on_unmatched_files: true
4039
files: |
4140
asset-tracker-template-*.*
41+
pmr-*-nrf91-*.txt
4242
4343
- name: Trigger workflow that publishes symbol files to Memfault
4444
working-directory: .github/workflows

.github/workflows/build.yml

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,6 @@ name: Build
33
on:
44
workflow_dispatch:
55
inputs:
6-
build_debug:
7-
type: boolean
8-
required: false
9-
default: false
106
memfault_fw_type:
117
type: string
128
required: false
@@ -17,10 +13,6 @@ on:
1713
type: string
1814
required: false
1915
default: "asset-tracker-template-dev"
20-
build_debug:
21-
type: boolean
22-
required: false
23-
default: false
2416
nrfsdk_sha_update:
2517
type: boolean
2618
required: false
@@ -146,7 +138,7 @@ jobs:
146138

147139
# Asset Tracker Template debug firmware build
148140
- name: Build thingy91x debug firmware
149-
if: ${{ inputs.build_debug }}
141+
if: ${{ github.event_name != 'pull_request' }}
150142
uses: ./asset-tracker-template/.github/actions/build-step
151143
with:
152144
memfault_project_key: ${{ secrets.MEMFAULT_PROJECT_KEY }}

0 commit comments

Comments
 (0)