|
81 | 81 | apt update |
82 | 82 | apt install -y --no-install-recommends gh |
83 | 83 |
|
| 84 | + rm -rf artifacts |
| 85 | + mkdir -p artifacts |
| 86 | +
|
84 | 87 | - name: Set VERSION environment variable |
85 | 88 | shell: bash |
86 | 89 | run: | |
@@ -114,98 +117,46 @@ jobs: |
114 | 117 |
|
115 | 118 | # Asset Tracker Template firmware build |
116 | 119 | - name: Build thingy91x firmware |
117 | | - working-directory: asset-tracker-template/app |
118 | | - run: | |
119 | | - mkdir -p artifacts |
120 | | - cp overlay-memfault.conf overlay-memfault-att.conf |
121 | | - echo "CONFIG_MEMFAULT_NCS_PROJECT_KEY=\"${{ secrets.MEMFAULT_PROJECT_KEY }}\"" >> overlay-memfault-att.conf |
122 | | - echo CONFIG_MEMFAULT_NCS_FW_TYPE=\"${{ env.MEMFAULT_FW_TYPE }}\" >> overlay-memfault-att.conf |
123 | | - echo CONFIG_MEMFAULT_NCS_FW_VERSION_AUTO=y >> overlay-memfault-att.conf |
124 | | - echo CONFIG_MEMFAULT_NCS_FW_VERSION_PREFIX=\"${{ env.MEMFAULT_FW_VERSION_PREFIX }}+\" >> overlay-memfault-att.conf |
125 | | - west build -b thingy91x/nrf9151/ns -d build -p --sysbuild -- -DEXTRA_CONF_FILE="overlay-memfault-att.conf" 2>&1 | tee artifacts/build_output_thingy91x.log |
126 | | - cp build/merged.hex artifacts/asset-tracker-template-${{ env.VERSION }}-thingy91x-nrf91.hex |
127 | | - cp build/app/zephyr/.config artifacts/asset-tracker-template-${{ env.VERSION }}-thingy91x-nrf91.config |
128 | | - cp build/app/zephyr/zephyr.signed.bin artifacts/asset-tracker-template-${{ env.VERSION }}-thingy91x-nrf91-update-signed.bin |
129 | | - cp build/app/zephyr/zephyr.signed.hex artifacts/asset-tracker-template-${{ env.VERSION }}-thingy91x-nrf91-update-signed.hex |
130 | | - cp build/app/zephyr/zephyr.elf artifacts/asset-tracker-template-${{ env.VERSION }}-thingy91x-nrf91.elf |
131 | | - cp build/dfu_application.zip artifacts/asset-tracker-template-${{ env.VERSION }}-thingy91x-nrf91-dfu.zip |
132 | | - cd build |
133 | | - ninja partition_manager_report |
134 | | - ninja partition_manager_report > ../artifacts/pmr-thingy91x-nrf91-default-${{ env.VERSION }}.txt |
135 | | - sed -i '1d' ../artifacts/pmr-thingy91x-nrf91-default-${{ env.VERSION }}.txt |
| 120 | + uses: ./asset-tracker-template/.github/actions/build-step |
| 121 | + with: |
| 122 | + memfault_project_key: ${{ secrets.MEMFAULT_PROJECT_KEY }} |
| 123 | + memfault_fw_type: ${{ inputs.memfault_fw_type }} |
| 124 | + memfault_fw_version_prefix: ${{ env.MEMFAULT_FW_VERSION_PREFIX }} |
| 125 | + board: thingy91x/nrf9151/ns |
| 126 | + short_board: thingy91x |
| 127 | + version: ${{ env.VERSION }} |
| 128 | + path: asset-tracker-template/app |
136 | 129 |
|
137 | 130 | - name: Build nrf9151dk firmware |
138 | 131 | if: ${{ github.event_name != 'pull_request' }} |
139 | | - working-directory: asset-tracker-template/app |
140 | | - run: | |
141 | | - mkdir -p artifacts |
142 | | - cp overlay-memfault.conf overlay-memfault-att.conf |
143 | | - echo "CONFIG_MEMFAULT_NCS_PROJECT_KEY=\"${{ secrets.MEMFAULT_PROJECT_KEY }}\"" >> overlay-memfault-att.conf |
144 | | - echo CONFIG_MEMFAULT_NCS_FW_TYPE=\"${{ env.MEMFAULT_FW_TYPE }}\" >> overlay-memfault-att.conf |
145 | | - echo CONFIG_MEMFAULT_NCS_FW_VERSION_AUTO=y >> overlay-memfault-att.conf |
146 | | - echo CONFIG_MEMFAULT_NCS_FW_VERSION_PREFIX=\"${{ env.MEMFAULT_FW_VERSION_PREFIX }}+\" >> overlay-memfault-att.conf |
147 | | - west build -b nrf9151dk/nrf9151/ns -d build -p --sysbuild -- -DEXTRA_CONF_FILE="overlay-memfault-att.conf" |
148 | | - cp build/merged.hex artifacts/asset-tracker-template-${{ env.VERSION }}-nrf9151dk-nrf91.hex |
149 | | - cp build/app/zephyr/.config artifacts/asset-tracker-template-${{ env.VERSION }}-nrf9151dk-nrf91.config |
150 | | - cp build/app/zephyr/zephyr.signed.bin artifacts/asset-tracker-template-${{ env.VERSION }}-nrf9151dk-nrf91-update-signed.bin |
151 | | - cp build/app/zephyr/zephyr.signed.hex artifacts/asset-tracker-template-${{ env.VERSION }}-nrf9151dk-nrf91-update-signed.hex |
152 | | - cp build/app/zephyr/zephyr.elf artifacts/asset-tracker-template-${{ env.VERSION }}-nrf9151dk-nrf91.elf |
153 | | - cp build/dfu_application.zip artifacts/asset-tracker-template-${{ env.VERSION }}-nrf9151dk-nrf91-dfu.zip |
154 | | - cd build |
155 | | - ninja partition_manager_report |
156 | | - ninja partition_manager_report > ../artifacts/pmr-nrf9151dk-nrf91-default-${{ env.VERSION }}.txt |
157 | | - sed -i '1d' ../artifacts/pmr-nrf9151dk-nrf91-default-${{ env.VERSION }}.txt |
158 | | -
|
159 | | - - name: Upload artifact |
160 | | - uses: actions/upload-artifact@v4 |
161 | | - id: artifact-upload-att |
| 132 | + uses: ./asset-tracker-template/.github/actions/build-step |
162 | 133 | with: |
163 | | - name: firmware-att |
164 | | - if-no-files-found: error |
165 | | - path: | |
166 | | - asset-tracker-template/app/artifacts/* |
| 134 | + memfault_project_key: ${{ secrets.MEMFAULT_PROJECT_KEY }} |
| 135 | + memfault_fw_type: ${{ inputs.memfault_fw_type }} |
| 136 | + memfault_fw_version_prefix: ${{ env.MEMFAULT_FW_VERSION_PREFIX }} |
| 137 | + board: nrf9151dk/nrf9151/ns |
| 138 | + short_board: nrf9151dk |
| 139 | + version: ${{ env.VERSION }} |
| 140 | + path: asset-tracker-template/app |
167 | 141 |
|
168 | 142 | # Asset Tracker Template debug firmware build |
169 | 143 | - name: Build thingy91x debug firmware |
170 | 144 | if: ${{ inputs.build_debug }} |
171 | | - working-directory: asset-tracker-template/app |
172 | | - run: | |
173 | | - cp overlay-memfault.conf overlay-memfault-debug.conf |
174 | | - echo "CONFIG_MEMFAULT_NCS_PROJECT_KEY=\"${{ secrets.MEMFAULT_PROJECT_KEY }}\"" >> overlay-memfault-debug.conf |
175 | | - echo CONFIG_MEMFAULT_NCS_FW_TYPE=\"${{ env.MEMFAULT_FW_TYPE }}\" >> overlay-memfault-debug.conf |
176 | | - echo CONFIG_MEMFAULT_NCS_FW_VERSION_AUTO=y >> overlay-memfault-debug.conf |
177 | | - echo CONFIG_MEMFAULT_NCS_FW_VERSION_PREFIX=\"${{ env.MEMFAULT_FW_VERSION_PREFIX }}-debug+\" >> overlay-memfault-debug.conf |
178 | | - west build -p -b thingy91x/nrf9151/ns -p --sysbuild -- -DEXTRA_CONF_FILE="overlay-memfault-debug.conf;overlay-etb.conf" |
179 | | -
|
180 | | - - name: Rename debug artifacts |
181 | | - if: ${{ inputs.build_debug }} |
182 | | - working-directory: asset-tracker-template/app/build |
183 | | - run: | |
184 | | - cp merged.hex asset-tracker-template-${{ env.VERSION }}-debug-thingy91x-nrf91.hex |
185 | | - cp app/zephyr/.config asset-tracker-template-${{ env.VERSION }}-debug-thingy91x-nrf91.config |
186 | | - cp app/zephyr/zephyr.signed.bin asset-tracker-template-${{ env.VERSION }}-debug-thingy91x-nrf91-update-signed.bin |
187 | | - cp app/zephyr/zephyr.signed.hex asset-tracker-template-${{ env.VERSION }}-debug-thingy91x-nrf91-update-signed.hex |
188 | | - cp app/zephyr/zephyr.elf asset-tracker-template-${{ env.VERSION }}-debug-thingy91x-nrf91.elf |
189 | | - cp dfu_application.zip asset-tracker-template-${{ env.VERSION }}-debug-thingy91x-nrf91-dfu.zip |
190 | | -
|
191 | | - - name: Create partition manager report for nRF91 debug firmware |
192 | | - if: ${{ inputs.build_debug }} |
193 | | - working-directory: asset-tracker-template/app/build |
194 | | - run: | |
195 | | - ninja partition_manager_report |
196 | | - ninja partition_manager_report > pmr-nrf91-debug-${{ env.VERSION }}.txt |
197 | | - sed -i '1d' pmr-nrf91-debug-${{ env.VERSION }}.txt |
198 | | -
|
199 | | - - name: Upload debug artifact |
200 | | - if: ${{ inputs.build_debug }} |
| 145 | + uses: ./asset-tracker-template/.github/actions/build-step |
| 146 | + with: |
| 147 | + memfault_project_key: ${{ secrets.MEMFAULT_PROJECT_KEY }} |
| 148 | + memfault_fw_type: ${{ inputs.memfault_fw_type }} |
| 149 | + memfault_fw_version_prefix: ${{ env.MEMFAULT_FW_VERSION_PREFIX }} |
| 150 | + board: nrf9151dk/nrf9151/ns |
| 151 | + short_board: nrf9151dk |
| 152 | + version: ${{ env.VERSION }} |
| 153 | + path: asset-tracker-template/app |
| 154 | + |
| 155 | + - name: Upload artifacts |
201 | 156 | uses: actions/upload-artifact@v4 |
202 | | - id: artifact-upload-att-debug |
203 | 157 | with: |
204 | | - name: firmware-att-debug |
205 | | - if-no-files-found: error |
206 | | - path: | |
207 | | - asset-tracker-template/app/build/asset-tracker-template-*.* |
208 | | - asset-tracker-template/app/build/pmr-nrf91-*.txt |
| 158 | + name: firmware-artifacts-att |
| 159 | + path: artifacts/* |
209 | 160 |
|
210 | 161 | - name: Print run-id and fw version |
211 | 162 | run: | |
|
0 commit comments