Skip to content

Commit e437bc8

Browse files
committed
wip
1 parent affe1b2 commit e437bc8

File tree

5 files changed

+31
-42
lines changed

5 files changed

+31
-42
lines changed

.github/workflows/build.yml

+24-31
Original file line numberDiff line numberDiff line change
@@ -96,49 +96,44 @@ jobs:
9696
- name: Build thingy91x firmware
9797
working-directory: asset-tracker-template/app
9898
run: |
99+
mkdir -p artifacts
99100
cp overlay-memfault.conf overlay-memfault-att.conf
100101
echo "CONFIG_MEMFAULT_NCS_PROJECT_KEY=\"${{ secrets.MEMFAULT_PROJECT_KEY }}\"" >> overlay-memfault-att.conf
101102
echo CONFIG_MEMFAULT_NCS_FW_VERSION_STATIC=y >> overlay-memfault-att.conf
102103
echo CONFIG_MEMFAULT_NCS_FW_VERSION=\"${{ env.VERSION }}\" >> overlay-memfault-att.conf
103104
echo CONFIG_MEMFAULT_NCS_FW_TYPE=\"${{ env.MEMFAULT_SW_TYPE }}\" >> overlay-memfault-att.conf
104-
west build -b thingy91x/nrf9151/ns -d build_thingy91x -p --sysbuild -- -DEXTRA_CONF_FILE="overlay-memfault-att.conf"
105+
west build -b thingy91x/nrf9151/ns -d build -p --sysbuild -- -DEXTRA_CONF_FILE="overlay-memfault-att.conf"
106+
cp build/merged.hex artifacts/asset-tracker-template-${{ env.VERSION }}-thingy91x-nrf91.hex
107+
cp build/app/zephyr/.config artifacts/asset-tracker-template-${{ env.VERSION }}-thingy91x-nrf91.config
108+
cp build/app/zephyr/zephyr.signed.bin artifacts/asset-tracker-template-${{ env.VERSION }}-thingy91x-nrf91-update-signed.bin
109+
cp build/app/zephyr/zephyr.signed.hex artifacts/asset-tracker-template-${{ env.VERSION }}-thingy91x-nrf91-update-signed.hex
110+
cp build/app/zephyr/zephyr.elf artifacts/asset-tracker-template-${{ env.VERSION }}-thingy91x-nrf91.elf
111+
cp build/dfu_application.zip artifacts/asset-tracker-template-${{ env.VERSION }}-thingy91x-nrf91-dfu.zip
112+
cd build
113+
ninja partition_manager_report
114+
ninja partition_manager_report > ../artifacts/pmr-thingy91x-nrf91-default-${{ env.VERSION }}.txt
115+
sed -i '1d' ../artifacts/pmr-thingy91x-nrf91-default-${{ env.VERSION }}.txt
105116
106117
- name: Build nrf9151dk firmware
107118
working-directory: asset-tracker-template/app
108119
run: |
120+
mkdir -p artifacts
109121
cp overlay-memfault.conf overlay-memfault-att.conf
110122
echo "CONFIG_MEMFAULT_NCS_PROJECT_KEY=\"${{ secrets.MEMFAULT_PROJECT_KEY }}\"" >> overlay-memfault-att.conf
111123
echo CONFIG_MEMFAULT_NCS_FW_VERSION_STATIC=y >> overlay-memfault-att.conf
112124
echo CONFIG_MEMFAULT_NCS_FW_VERSION=\"${{ env.VERSION }}\" >> overlay-memfault-att.conf
113125
echo CONFIG_MEMFAULT_NCS_FW_TYPE=\"${{ env.MEMFAULT_SW_TYPE }}\" >> overlay-memfault-att.conf
114-
west build -b nrf9151dk/nrf9151/ns -d build_nrf9151dk -p --sysbuild -- -DEXTRA_CONF_FILE="overlay-memfault-att.conf"
115-
116-
- name: Rename artifacts thingy91x
117-
working-directory: asset-tracker-template/app/build_thingy91x
118-
run: |
119-
cp merged.hex asset-tracker-template-${{ env.VERSION }}-thingy91x-nrf91.hex
120-
cp app/zephyr/.config asset-tracker-template-${{ env.VERSION }}-thingy91x-nrf91.config
121-
cp app/zephyr/zephyr.signed.bin asset-tracker-template-${{ env.VERSION }}-thingy91x-nrf91-update-signed.bin
122-
cp app/zephyr/zephyr.signed.hex asset-tracker-template-${{ env.VERSION }}-thingy91x-nrf91-update-signed.hex
123-
cp app/zephyr/zephyr.elf asset-tracker-template-${{ env.VERSION }}-thingy91x-nrf91.elf
124-
cp dfu_application.zip asset-tracker-template-${{ env.VERSION }}-thingy91x-nrf91-dfu.zip
125-
126-
- name: Rename artifacts dk
127-
working-directory: asset-tracker-template/app/build_nrf9151dk
128-
run: |
129-
cp merged.hex asset-tracker-template-${{ env.VERSION }}-nrf9151dk-nrf91.hex
130-
cp app/zephyr/.config asset-tracker-template-${{ env.VERSION }}-nrf9151dk-nrf91.config
131-
cp app/zephyr/zephyr.signed.bin asset-tracker-template-${{ env.VERSION }}-nrf9151dk-nrf91-update-signed.bin
132-
cp app/zephyr/zephyr.signed.hex asset-tracker-template-${{ env.VERSION }}-nrf9151dk-nrf91-update-signed.hex
133-
cp app/zephyr/zephyr.elf asset-tracker-template-${{ env.VERSION }}-nrf9151dk-nrf91.elf
134-
cp dfu_application.zip asset-tracker-template-${{ env.VERSION }}-nrf9151dk-nrf91-dfu.zip
135-
136-
- name: Create partition manager report for thingy91x firmware
137-
working-directory: asset-tracker-template/app/build_thingy91x
138-
run: |
126+
west build -b nrf9151dk/nrf9151/ns -d build -p --sysbuild -- -DEXTRA_CONF_FILE="overlay-memfault-att.conf"
127+
cp build/merged.hex artifacts/asset-tracker-template-${{ env.VERSION }}-nrf9151dk-nrf91.hex
128+
cp build/app/zephyr/.config artifacts/asset-tracker-template-${{ env.VERSION }}-nrf9151dk-nrf91.config
129+
cp build/app/zephyr/zephyr.signed.bin artifacts/asset-tracker-template-${{ env.VERSION }}-nrf9151dk-nrf91-update-signed.bin
130+
cp build/app/zephyr/zephyr.signed.hex artifacts/asset-tracker-template-${{ env.VERSION }}-nrf9151dk-nrf91-update-signed.hex
131+
cp build/app/zephyr/zephyr.elf artifacts/asset-tracker-template-${{ env.VERSION }}-nrf9151dk-nrf91.elf
132+
cp build/dfu_application.zip artifacts/asset-tracker-template-${{ env.VERSION }}-nrf9151dk-nrf91-dfu.zip
133+
cd build
139134
ninja partition_manager_report
140-
ninja partition_manager_report > pmr-nrf91-default-${{ env.VERSION }}.txt
141-
sed -i '1d' pmr-nrf91-default-${{ env.VERSION }}.txt
135+
ninja partition_manager_report > ../artifacts/pmr-nrf9151dk-nrf91-default-${{ env.VERSION }}.txt
136+
sed -i '1d' ../artifacts/pmr-nrf9151dk-nrf91-default-${{ env.VERSION }}.txt
142137
143138
- name: Upload artifact
144139
uses: actions/upload-artifact@v4
@@ -147,11 +142,9 @@ jobs:
147142
name: firmware-att
148143
if-no-files-found: error
149144
path: |
150-
asset-tracker-template/app/build_thingy91x/asset-tracker-template-*.*
151-
asset-tracker-template/app/build_nrf9151dk/asset-tracker-template-*.*
145+
asset-tracker-template/app/artifacts/*
152146
153147
# Asset Tracker Template debug firmware build
154-
155148
- name: Build thingy91x debug firmware
156149
if: ${{ inputs.build_debug }}
157150
working-directory: asset-tracker-template/app

.github/workflows/target-test.yml

+2-5
Original file line numberDiff line numberDiff line change
@@ -44,14 +44,10 @@ jobs:
4444
fail-fast: false # Don't fail all jobs if one fails
4545
matrix:
4646
include:
47-
<<<<<<< HEAD
48-
- device: cia-trd-thingy91x
49-
=======
5047
- device: nrf9151dk
5148
- device: thingy91x
5249
- device: ppk_thingy91x
5350
if: ${{ inputs.pytest_marker == '' || inputs.pytest_marker == 'no_markers_flag' || inputs.pytest_marker == 'slow' }}
54-
>>>>>>> 4a3d921 (tests: Add nrf9151dk)
5551

5652
# Self-hosted runner is labeled according to the device it is linked with
5753
runs-on: cia-trd-${{ matrix.device }}
@@ -102,6 +98,7 @@ jobs:
10298
pip install -r requirements.txt --break-system-packages
10399
104100
- name: Upload symbol file to Memfault
101+
if: ${{ matrix.device != 'ppk_thingy91x' }}
105102
working-directory: asset-tracker-template/tests/on_target/artifacts
106103
run: |
107104
memfault \
@@ -111,7 +108,7 @@ jobs:
111108
upload-mcu-symbols \
112109
--software-type asset-tracker-template-ci \
113110
--software-version ${{ inputs.artifact_fw_version }} \
114-
build_${{ matrix.device }}/asset-tracker-template-${{ inputs.artifact_fw_version }}-${{ matrix.device }}-nrf91.elf
111+
asset-tracker-template-${{ inputs.artifact_fw_version }}-${{ matrix.device }}-nrf91.elf
115112
116113
- name: Target Tests
117114
working-directory: asset-tracker-template/tests/on_target
Binary file not shown.

tests/on_target/tests/conftest.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ def dut_traces(dut_board):
115115
@pytest.fixture(scope="session")
116116
def hex_file():
117117
# Search for the firmware hex file in the artifacts folder
118-
artifacts_dir = f"artifacts/build_{DUT_DEVICE_TYPE}"
118+
artifacts_dir = "artifacts/"
119119
hex_pattern = f"asset-tracker-template-{r"[0-9a-z\.]+"}-{DUT_DEVICE_TYPE}-nrf91.hex"
120120

121121
for file in os.listdir(artifacts_dir):
@@ -127,7 +127,7 @@ def hex_file():
127127
@pytest.fixture(scope="session")
128128
def bin_file():
129129
# Search for the firmware bin file in the artifacts folder
130-
artifacts_dir = f"artifacts/build_{DUT_DEVICE_TYPE}"
130+
artifacts_dir = "artifacts"
131131
hex_pattern = f"asset-tracker-template-{r"[0-9a-z\.]+"}-{DUT_DEVICE_TYPE}-nrf91-update-signed.hex"
132132

133133
for file in os.listdir(artifacts_dir):

tests/on_target/tests/test_functional/test_fota.py

+3-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919

2020
# Stable version used for testing
2121
TEST_APP_VERSION = "0.0.0-foo"
22-
TEST_APP_BIN = "artifacts/stable_version_jan_2025-update-signed.bin"
2322

2423
DELTA_MFW_BUNDLEID = "59cec896-c842-40fe-9a95-a4f3e88a4cdb"
2524
FULL_MFW_BUNDLEID = "d692915d-d978-4c77-ab02-f05f511971f9"
@@ -122,16 +121,16 @@ def _run_fota(bundle_id="", fota_type="app", fotatimeout=APP_FOTA_TIMEOUT, new_v
122121
dut_fota.uart.wait_for_str("Connected to Cloud")
123122

124123
time.sleep(60)
125-
124+
app_bin = TEST_APP_BIN[dut_fota.device_type]
126125
if fota_type == "app":
127126
bundle_id = dut_fota.fota.upload_firmware(
128127
"nightly_test_app",
129-
TEST_APP_BIN,
128+
app_bin,
130129
TEST_APP_VERSION,
131130
"Bundle used for nightly test",
132131
FWType.app,
133132
)
134-
logger.info(f"Uploaded file {TEST_APP_BIN}: bundleId: {bundle_id}")
133+
logger.info(f"Uploaded file {app_bin}: bundleId: {bundle_id}")
135134

136135
try:
137136
dut_fota.data['job_id'] = dut_fota.fota.create_fota_job(dut_fota.device_id, bundle_id)

0 commit comments

Comments
 (0)