-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathaction.yml
More file actions
97 lines (93 loc) · 3.69 KB
/
action.yml
File metadata and controls
97 lines (93 loc) · 3.69 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
name: "Buildstep"
description: "Build ATT firmware"
inputs:
memfault_project_key:
type: string
required: false
default: "fookey"
memfault_fw_type:
type: string
required: false
default: "att-dev"
memfault_fw_version_prefix:
type: string
required: false
default: "0.0.0-dev"
board:
type: string
required: true
short_board:
type: string
required: true
version:
type: string
required: false
default: "0.0.0-dev"
path:
type: string
required: true
default: "."
debug:
type: boolean
required: false
default: false
mqtt:
type: boolean
required: false
default: false
runs:
using: "composite"
steps:
- name: Set up debug build overlays
working-directory: ${{ inputs.path }}
if: ${{ inputs.debug }}
shell: bash
run: |
cp overlay-memfault.conf overlay-debug-att.conf
cat overlay-upload-modem-traces-to-memfault.conf >> overlay-debug-att.conf
cat overlay-etb.conf >> overlay-debug-att.conf
echo CONFIG_MEMFAULT_NCS_PROJECT_KEY=\"${{ inputs.memfault_project_key }}\" >> overlay-debug-att.conf
echo CONFIG_MEMFAULT_NCS_FW_VERSION_AUTO=y >> overlay-debug-att.conf
echo CONFIG_MEMFAULT_NCS_FW_VERSION_PREFIX=\"${{ inputs.memfault_fw_version_prefix }}+\" >> overlay-debug-att.conf
echo CONFIG_MEMFAULT_NCS_FW_TYPE=\"${{ inputs.memfault_fw_type }}\" >> overlay-debug-att.conf
- name: Build firmware
working-directory: ${{ inputs.path }}
shell: bash
run: |
if [[ "${{ inputs.debug }}" == "true" ]]; then
west build -b ${{ inputs.board }} \
-d build \
-p --sysbuild \
-- -DEXTRA_CONF_FILE="overlay-debug-att.conf" 2>&1 | tee ../../artifacts/build_output_${{ inputs.short_board }}_debug.log
elif [[ "${{ inputs.mqtt }}" == "true" ]]; then
west build -b ${{ inputs.board }} \
-d build \
-p --sysbuild \
-- -DEXTRA_CONF_FILE="$(pwd)/../examples/modules/cloud/overlay-mqtt.conf" 2>&1 | tee ../../artifacts/build_output_${{ inputs.short_board }}_mqtt.log
else
west build -b ${{ inputs.board }} \
-d build \
-p --sysbuild 2>&1 | tee ../../artifacts/build_output_${{ inputs.short_board }}.log
fi
- name: Copy artifacts
shell: bash
run: |
mkdir -p artifacts
cp ${{ inputs.path }}/build/merged.hex \
artifacts/asset-tracker-template-${{ inputs.version }}-${{ inputs.short_board }}-nrf91.hex
cp ${{ inputs.path }}/build/app/zephyr/.config \
artifacts/asset-tracker-template-${{ inputs.version }}-${{ inputs.short_board }}-nrf91.config
cp ${{ inputs.path }}/build/app/zephyr/zephyr.signed.bin \
artifacts/asset-tracker-template-${{ inputs.version }}-${{ inputs.short_board }}-nrf91-update-signed.bin
cp ${{ inputs.path }}/build/app/zephyr/zephyr.signed.hex \
artifacts/asset-tracker-template-${{ inputs.version }}-${{ inputs.short_board }}-nrf91-update-signed.hex
cp ${{ inputs.path }}/build/app/zephyr/zephyr.elf \
artifacts/asset-tracker-template-${{ inputs.version }}-${{ inputs.short_board }}-nrf91.elf
cp ${{ inputs.path }}/build/dfu_application.zip \
artifacts/asset-tracker-template-${{ inputs.version }}-${{ inputs.short_board }}-nrf91-dfu.zip
cd ${{ inputs.path }}/build
ninja partition_manager_report > partition_manager_report.txt
- name: Generate Partition Manager Report
shell: bash
run: |
sed '1d' ${{ inputs.path }}/build/partition_manager_report.txt > artifacts/pmr-${{ inputs.short_board }}-nrf91-default-${{ inputs.version }}.txt