Skip to content

Commit 0ab2323

Browse files
committed
repo: align build scopes with release artifacts
Replace `build_all` with `build_type` so workflows can distinguish `on-commit`, `release`, and `all` builds. Limit release runs to shipping artifacts, drop cleanup for test assets, and stop publishing the MQTT release artifact in `release.md`. Update on-target test docs to clarify `slow` vs `not slow` pytest usage. Signed-off-by: Simen S. Røstad <simen.rostad@nordicsemi.no>
1 parent e1e6e46 commit 0ab2323

5 files changed

Lines changed: 43 additions & 36 deletions

File tree

.github/workflows/attach_release_assets.yml

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
secrets: inherit
1919
with:
2020
memfault_fw_type: "att"
21-
build_all: true
21+
build_type: release
2222

2323
attach-assets:
2424
runs-on: ubuntu-24.04
@@ -33,11 +33,6 @@ jobs:
3333
pattern: firmware-*
3434
merge-multiple: true
3535

36-
- name: Delete test assets
37-
run: |
38-
rm -f asset-tracker-template-*-buffer-flash-* asset-tracker-template-*-buffer-ram-*
39-
rm -f pmr-*-buffer-flash* pmr-*-buffer-ram*
40-
4136
- name: Deploy release to github
4237
uses: softprops/action-gh-release@v2
4338
with:

.github/workflows/build-and-target-test.yml

Lines changed: 15 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@ name: Build and Test
33
on:
44
workflow_dispatch:
55
inputs:
6-
build_all:
7-
description: Build all board configurations
8-
type: boolean
6+
build_type:
7+
description: "Build scope: minimal (thingy91x only), release (all boards, no test builds), all (everything)"
8+
type: choice
9+
options:
10+
- minimal
11+
- release
12+
- all
913
required: true
10-
default: false
14+
default: minimal
1115
device_thingy91x:
1216
description: 'Test thingy91x'
1317
type: boolean
@@ -46,7 +50,7 @@ jobs:
4650
runs-on: ubuntu-latest
4751
outputs:
4852
devices: ${{ steps.setup.outputs.devices }}
49-
build_all: ${{ steps.setup.outputs.build_all == 'true' }}
53+
build_type: ${{ steps.setup.outputs.build_type }}
5054
push_memory_badges: ${{ steps.setup.outputs.push_memory_badges == 'true' }}
5155
steps:
5256
- name: Setup
@@ -57,11 +61,11 @@ jobs:
5761
push_memory_badges=false
5862
if [[ $SCHEDULED == true ]]; then
5963
devices="thingy91x nrf9151dk ppk_thingy91x gnss_nrf9151dk prov_thingy91x"
60-
build_all=true
64+
build_type=all
6165
push_memory_badges=true
6266
elif [[ $PUSH == true ]]; then
6367
devices="thingy91x"
64-
build_all=false
68+
build_type=minimal
6569
else
6670
# Build devices list from selected checkboxes
6771
devices=""
@@ -82,20 +86,20 @@ jobs:
8286
fi
8387
# Trim leading space
8488
devices=$(echo "$devices" | xargs)
85-
build_all=${{ inputs.build_all }}
89+
build_type=${{ inputs.build_type }}
8690
fi
8791
echo "devices=$devices"
88-
echo "build_all=$build_all"
92+
echo "build_type=$build_type"
8993
echo "push_memory_badges=$push_memory_badges"
9094
echo "devices=$devices" >> $GITHUB_OUTPUT
91-
echo "build_all=$build_all" >> $GITHUB_OUTPUT
95+
echo "build_type=$build_type" >> $GITHUB_OUTPUT
9296
echo "push_memory_badges=$push_memory_badges" >> $GITHUB_OUTPUT
9397
build:
9498
needs: setup
9599
uses: ./.github/workflows/build.yml
96100
secrets: inherit
97101
with:
98-
build_all: ${{ needs.setup.outputs.build_all == 'true' }}
102+
build_type: ${{ needs.setup.outputs.build_type }}
99103
push_memory_badges: ${{ needs.setup.outputs.push_memory_badges == 'true' }}
100104
test:
101105
permissions:
@@ -109,4 +113,3 @@ jobs:
109113
artifact_fw_version: ${{ needs.build.outputs.version }}
110114
artifact_run_id: ${{ needs.build.outputs.run_id }}
111115
devices: ${{ needs.setup.outputs.devices }}
112-
test_all: ${{ needs.setup.outputs.build_all == 'true' }}

.github/workflows/build.yml

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,15 @@ on:
88
type: string
99
required: false
1010
default: "att-dev"
11-
build_all:
12-
description: Build for all targets
13-
type: boolean
14-
required: false
15-
default: false
11+
build_type:
12+
description: "Build scope: minimal (thingy91x only), release (all boards, no test builds), all (everything)"
13+
type: choice
14+
options:
15+
- minimal
16+
- release
17+
- all
18+
required: true
19+
default: minimal
1620
push_memory_badges:
1721
description: Whether to parse thingy91x build log and push memory badges
1822
type: boolean
@@ -28,10 +32,10 @@ on:
2832
type: boolean
2933
required: false
3034
default: false
31-
build_all:
32-
type: boolean
35+
build_type:
36+
type: string
3337
required: false
34-
default: false
38+
default: minimal
3539
push_memory_badges:
3640
type: boolean
3741
required: false
@@ -137,6 +141,9 @@ jobs:
137141
python3 scripts/app_version.py ${GITHUB_REF_NAME} > app/VERSION
138142
cat app/VERSION
139143
144+
- name: Set build type
145+
run: echo "build_type=${{ inputs.build_type || 'minimal' }}" >> $GITHUB_ENV
146+
140147
- name: Set MEMFAULT_FW_TYPE and MEMFAULT_FW_VERSION_PREFIX
141148
shell: bash
142149
run: |
@@ -148,6 +155,7 @@ jobs:
148155
149156
# Asset Tracker Template firmware build
150157
- name: Build thingy91x firmware
158+
if: ${{ env.build_type == 'minimal' || env.build_type == 'release' || env.build_type == 'all' }}
151159
uses: ./asset-tracker-template/.github/actions/build-step
152160
with:
153161
board: thingy91x/nrf9151/ns
@@ -177,7 +185,7 @@ jobs:
177185
../artifacts/ram_report_thingy91x.html
178186
179187
- name: Build nrf9151dk firmware
180-
if: ${{ inputs.build_all }}
188+
if: ${{ env.build_type == 'release' || env.build_type == 'all' }}
181189
uses: ./asset-tracker-template/.github/actions/build-step
182190
with:
183191
board: nrf9151dk/nrf9151/ns
@@ -187,7 +195,7 @@ jobs:
187195

188196
# Asset Tracker Template debug firmware build
189197
- name: Build thingy91x debug firmware
190-
if: ${{ inputs.build_all }}
198+
if: ${{ env.build_type == 'release' || env.build_type == 'all' }}
191199
uses: ./asset-tracker-template/.github/actions/build-step
192200
with:
193201
memfault_project_key: ${{ secrets.MEMFAULT_PROJECT_KEY }}
@@ -199,9 +207,9 @@ jobs:
199207
path: asset-tracker-template/app
200208
debug: true
201209

202-
# Asset Tracker Template firmware build with MQTT cloud moduel for Thingy91x
210+
# Asset Tracker Template firmware build with MQTT cloud module for Thingy91x
203211
- name: Build thingy91x firmware with MQTT cloud module
204-
if: ${{ inputs.build_all }}
212+
if: ${{ env.build_type == 'all' }}
205213
uses: ./asset-tracker-template/.github/actions/build-step
206214
with:
207215
board: thingy91x/nrf9151/ns
@@ -211,7 +219,7 @@ jobs:
211219
mqtt: true
212220

213221
- name: Build thingy91x firmware with buffered mode flash backend
214-
if: ${{ inputs.build_all }}
222+
if: ${{ env.build_type == 'all' }}
215223
uses: ./asset-tracker-template/.github/actions/build-step
216224
with:
217225
board: thingy91x/nrf9151/ns
@@ -221,7 +229,7 @@ jobs:
221229
buffer_flash: true
222230

223231
- name: Build thingy91x firmware with buffered mode RAM backend
224-
if: ${{ inputs.build_all }}
232+
if: ${{ env.build_type == 'all' }}
225233
uses: ./asset-tracker-template/.github/actions/build-step
226234
with:
227235
board: thingy91x/nrf9151/ns
@@ -231,7 +239,7 @@ jobs:
231239
buffer_ram: true
232240

233241
- name: Build thingy91x with modem trace on uart
234-
if: ${{ inputs.build_all }}
242+
if: ${{ env.build_type == 'release' || env.build_type == 'all' }}
235243
uses: ./asset-tracker-template/.github/actions/build-step
236244
with:
237245
board: thingy91x/nrf9151/ns
@@ -241,7 +249,7 @@ jobs:
241249
path: asset-tracker-template/app
242250

243251
- name: Build nrf9151dk with modem trace on uart
244-
if: ${{ inputs.build_all }}
252+
if: ${{ env.build_type == 'release' || env.build_type == 'all' }}
245253
uses: ./asset-tracker-template/.github/actions/build-step
246254
with:
247255
board: nrf9151dk/nrf9151/ns
@@ -251,7 +259,7 @@ jobs:
251259
path: asset-tracker-template/app
252260

253261
- name: Build nrf9151dk with external GNSS antenna
254-
if: ${{ inputs.build_all }}
262+
if: ${{ env.build_type == 'release' || env.build_type == 'all' }}
255263
uses: ./asset-tracker-template/.github/actions/build-step
256264
with:
257265
board: nrf9151dk/nrf9151/ns

docs/common/release.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ The Asset Tracker Template generates multiple firmware artifacts for different h
2121
| **Artifact name** | **Hardware platform** | **Description** | **Use case** |
2222
|-------------------|----------------------|----------------|--------------|
2323
| `asset-tracker-template-{VERSION}-debug-thingy91x-nrf91.hex` | Thingy:91 X (nRF9151) | Debug build with enhanced logging and diagnostic features. **Note: This build uploads diagnostic and crash data to Memfault using Nordic's account and is intended for internal use only.** | Development debugging and issue investigation |
24-
| `asset-tracker-template-{VERSION}-mqtt-thingy91x-nrf91.hex` | Thingy:91 X (nRF9151) | Firmware with MQTT cloud connectivity instead of CoAP | Testing MQTT-based cloud communication |
2524

2625
#### Specialized configuration variants
2726

tests/on_target/README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,11 @@ export NRFCLOUD_API_KEY=<your_nrfcloud_api_key>
4646

4747
Run desired tests, example commands
4848
```shell
49+
# Use -m "not slow" to skip long-running tests (FOTA, memfault, etc.)
4950
pytest -s -v -m "not slow" tests
5051
pytest -s -v -m "not slow" tests/test_functional/test_network_reconnect.py
5152
pytest -s -v -m "not slow" tests/test_functional/test_sampling.py
53+
# Use -m "slow" to run only the long-running tests
5254
pytest -s -v -m "slow" tests/test_functional/test_fota.py::test_full_mfw_fota
5355
```
5456

0 commit comments

Comments
 (0)