Skip to content

Commit 007433b

Browse files
committed
.github: workflows: Simplify CI workflows
Introduce a `build_release` input to `build.yml` to skip test-only builds (MQTT, buffer-flash, buffer-ram) when creating release assets. Remove the `test_all` input and `slow` pytest marker entirely — all tests now run unconditionally, with device/path selection controlling scope instead. - Add `build_release` flag to `attach_release_assets.yml` and `build.yml`; skip test builds when set - Remove `Delete test assets` step from release workflow since those builds are no longer produced - Drop `test_all` input from `target-test.yml` and `build-and-target-test.yml` - Remove `slow` marker from `pytest.ini` and all test files - Always upload symbol file to Memfault for `thingy91x` targets - Fix typo: `moduel` → `module` in `build.yml` comment - Update docs to reflect simplified CI trigger descriptions - Remove MQTT artifact row from release docs Signed-off-by: Simen S. Røstad <simen.rostad@nordicsemi.no>
1 parent e1e6e46 commit 007433b

5 files changed

Lines changed: 38 additions & 35 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: default (thingy91x only), release (all boards, no test builds), all (everything)"
8+
type: choice
9+
options:
10+
- default
11+
- release
12+
- all
913
required: true
10-
default: false
14+
default: default
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=default
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: 20 additions & 16 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
11+
build_type:
12+
description: "Build scope: default (thingy91x only), release (all boards, no test builds), all (everything)"
13+
type: choice
14+
options:
15+
- default
16+
- release
17+
- all
1418
required: false
15-
default: false
19+
default: default
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: default
3539
push_memory_badges:
3640
type: boolean
3741
required: false
@@ -177,7 +181,7 @@ jobs:
177181
../artifacts/ram_report_thingy91x.html
178182
179183
- name: Build nrf9151dk firmware
180-
if: ${{ inputs.build_all }}
184+
if: ${{ inputs.build_type == 'release' || inputs.build_type == 'all' }}
181185
uses: ./asset-tracker-template/.github/actions/build-step
182186
with:
183187
board: nrf9151dk/nrf9151/ns
@@ -187,7 +191,7 @@ jobs:
187191

188192
# Asset Tracker Template debug firmware build
189193
- name: Build thingy91x debug firmware
190-
if: ${{ inputs.build_all }}
194+
if: ${{ inputs.build_type == 'release' || inputs.build_type == 'all' }}
191195
uses: ./asset-tracker-template/.github/actions/build-step
192196
with:
193197
memfault_project_key: ${{ secrets.MEMFAULT_PROJECT_KEY }}
@@ -199,9 +203,9 @@ jobs:
199203
path: asset-tracker-template/app
200204
debug: true
201205

202-
# Asset Tracker Template firmware build with MQTT cloud moduel for Thingy91x
206+
# Asset Tracker Template firmware build with MQTT cloud module for Thingy91x
203207
- name: Build thingy91x firmware with MQTT cloud module
204-
if: ${{ inputs.build_all }}
208+
if: ${{ inputs.build_type == 'all' }}
205209
uses: ./asset-tracker-template/.github/actions/build-step
206210
with:
207211
board: thingy91x/nrf9151/ns
@@ -211,7 +215,7 @@ jobs:
211215
mqtt: true
212216

213217
- name: Build thingy91x firmware with buffered mode flash backend
214-
if: ${{ inputs.build_all }}
218+
if: ${{ inputs.build_type == 'all' }}
215219
uses: ./asset-tracker-template/.github/actions/build-step
216220
with:
217221
board: thingy91x/nrf9151/ns
@@ -221,7 +225,7 @@ jobs:
221225
buffer_flash: true
222226

223227
- name: Build thingy91x firmware with buffered mode RAM backend
224-
if: ${{ inputs.build_all }}
228+
if: ${{ inputs.build_type == 'all' }}
225229
uses: ./asset-tracker-template/.github/actions/build-step
226230
with:
227231
board: thingy91x/nrf9151/ns
@@ -231,7 +235,7 @@ jobs:
231235
buffer_ram: true
232236

233237
- name: Build thingy91x with modem trace on uart
234-
if: ${{ inputs.build_all }}
238+
if: ${{ inputs.build_type == 'release' || inputs.build_type == 'all' }}
235239
uses: ./asset-tracker-template/.github/actions/build-step
236240
with:
237241
board: thingy91x/nrf9151/ns
@@ -241,7 +245,7 @@ jobs:
241245
path: asset-tracker-template/app
242246

243247
- name: Build nrf9151dk with modem trace on uart
244-
if: ${{ inputs.build_all }}
248+
if: ${{ inputs.build_type == 'release' || inputs.build_type == 'all' }}
245249
uses: ./asset-tracker-template/.github/actions/build-step
246250
with:
247251
board: nrf9151dk/nrf9151/ns
@@ -251,7 +255,7 @@ jobs:
251255
path: asset-tracker-template/app
252256

253257
- name: Build nrf9151dk with external GNSS antenna
254-
if: ${{ inputs.build_all }}
258+
if: ${{ inputs.build_type == 'release' || inputs.build_type == 'all' }}
255259
uses: ./asset-tracker-template/.github/actions/build-step
256260
with:
257261
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)