Skip to content

Commit a608877

Browse files
committed
Meshtastic build manifest
1 parent fe2e275 commit a608877

18 files changed

+293
-87
lines changed

.github/actions/build-variant/action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ runs:
102102
- name: Store binaries as an artifact
103103
uses: actions/upload-artifact@v4
104104
with:
105-
name: firmware-${{ inputs.arch }}-${{ inputs.board }}-${{ steps.version.outputs.long }}.zip
105+
name: firmware-${{ inputs.arch }}-${{ inputs.board }}-${{ steps.version.outputs.long }}
106106
overwrite: true
107107
path: |
108108
${{ inputs.artifact-paths }}

.github/workflows/build_firmware.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,12 @@ jobs:
5959
uses: actions/upload-artifact@v4
6060
id: upload
6161
with:
62-
name: firmware-${{ inputs.platform }}-${{ inputs.pio_env }}-${{ inputs.version }}.zip
62+
name: firmware-${{ inputs.platform }}-${{ inputs.pio_env }}-${{ inputs.version }}
6363
overwrite: true
6464
path: |
65+
release/*.mt.json
6566
release/*.bin
6667
release/*.elf
6768
release/*.uf2
6869
release/*.hex
69-
release/*-ota.zip
70+
release/*.zip

.github/workflows/build_one_arch.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ jobs:
190190
./firmware-*.bin
191191
./firmware-*.uf2
192192
./firmware-*.hex
193-
./firmware-*-ota.zip
193+
./firmware-*.zip
194194
./device-*.sh
195195
./device-*.bat
196196
./littlefs-*.bin
@@ -219,7 +219,7 @@ jobs:
219219
- name: Repackage in single elfs zip
220220
uses: actions/upload-artifact@v4
221221
with:
222-
name: debug-elfs-${{inputs.arch}}-${{ needs.version.outputs.long }}.zip
222+
name: debug-elfs-${{inputs.arch}}-${{ needs.version.outputs.long }}
223223
overwrite: true
224224
path: ./*.elf
225225
retention-days: 30

.github/workflows/build_one_target.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ jobs:
196196
./firmware-*.bin
197197
./firmware-*.uf2
198198
./firmware-*.hex
199-
./firmware-*-ota.zip
199+
./firmware-*.zip
200200
./device-*.sh
201201
./device-*.bat
202202
./littlefs-*.bin

.github/workflows/main_matrix.yml

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@ on:
2727

2828
jobs:
2929
setup:
30-
if: github.repository == 'meshtastic/firmware'
3130
strategy:
3231
fail-fast: true
3332
matrix:
@@ -42,10 +41,6 @@ jobs:
4241
python-version: 3.x
4342
cache: pip
4443
- run: pip install -U platformio
45-
- name: Uncomment build epoch
46-
shell: bash
47-
run: |
48-
sed -i 's/#-DBUILD_EPOCH=$UNIX_TIME/-DBUILD_EPOCH=$UNIX_TIME/' platformio.ini
4944
- name: Generate matrix
5045
id: jsonStep
5146
run: |
@@ -62,7 +57,6 @@ jobs:
6257
check: ${{ steps.jsonStep.outputs.check }}
6358

6459
version:
65-
if: github.repository == 'meshtastic/firmware'
6660
runs-on: ubuntu-latest
6761
steps:
6862
- uses: actions/checkout@v5
@@ -226,10 +220,11 @@ jobs:
226220
name: firmware-${{matrix.arch}}-${{ needs.version.outputs.long }}
227221
overwrite: true
228222
path: |
223+
./firmware-*.mt.json
229224
./firmware-*.bin
230225
./firmware-*.uf2
231226
./firmware-*.hex
232-
./firmware-*-ota.zip
227+
./firmware-*.zip
233228
./device-*.sh
234229
./device-*.bat
235230
./littlefs-*.bin
@@ -258,7 +253,7 @@ jobs:
258253
- name: Repackage in single elfs zip
259254
uses: actions/upload-artifact@v4
260255
with:
261-
name: debug-elfs-${{matrix.arch}}-${{ needs.version.outputs.long }}.zip
256+
name: debug-elfs-${{matrix.arch}}-${{ needs.version.outputs.long }}
262257
overwrite: true
263258
path: ./*.elf
264259
retention-days: 30
@@ -377,7 +372,7 @@ jobs:
377372

378373
- uses: actions/download-artifact@v5
379374
with:
380-
name: debug-elfs-${{matrix.arch}}-${{ needs.version.outputs.long }}.zip
375+
name: debug-elfs-${{matrix.arch}}-${{ needs.version.outputs.long }}
381376
merge-multiple: true
382377
path: ./elfs
383378

.github/workflows/merge_queue.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ jobs:
225225
- name: Repackage in single elfs zip
226226
uses: actions/upload-artifact@v4
227227
with:
228-
name: debug-elfs-${{matrix.arch}}-${{ needs.version.outputs.long }}.zip
228+
name: debug-elfs-${{matrix.arch}}-${{ needs.version.outputs.long }}
229229
overwrite: true
230230
path: ./*.elf
231231
retention-days: 30
@@ -344,7 +344,7 @@ jobs:
344344

345345
- uses: actions/download-artifact@v5
346346
with:
347-
name: debug-elfs-${{matrix.arch}}-${{ needs.version.outputs.long }}.zip
347+
name: debug-elfs-${{matrix.arch}}-${{ needs.version.outputs.long }}
348348
merge-multiple: true
349349
path: ./elfs
350350

.github/workflows/pr_tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
if: needs.native-tests.result != 'skipped'
5353
uses: actions/download-artifact@v5
5454
with:
55-
name: platformio-test-report-${{ steps.version.outputs.long }}.zip
55+
name: platformio-test-report-${{ steps.version.outputs.long }}
5656
merge-multiple: true
5757

5858
- name: Parse test results and create detailed summary

.github/workflows/test_native.yml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ jobs:
6262
uses: actions/upload-artifact@v4
6363
if: always() # run this step even if previous step failed
6464
with:
65-
name: lcov-coverage-info-native-simulator-test-${{ steps.version.outputs.long }}.zip
65+
name: lcov-coverage-info-native-simulator-test-${{ steps.version.outputs.long }}
6666
overwrite: true
6767
path: ./coverage_*.info
6868

@@ -96,7 +96,7 @@ jobs:
9696
if: always() # run this step even if previous step failed
9797
uses: actions/upload-artifact@v4
9898
with:
99-
name: platformio-test-report-${{ steps.version.outputs.long }}.zip
99+
name: platformio-test-report-${{ steps.version.outputs.long }}
100100
overwrite: true
101101
path: ./testreport.xml
102102

@@ -111,7 +111,7 @@ jobs:
111111
uses: actions/upload-artifact@v4
112112
if: always() # run this step even if previous step failed
113113
with:
114-
name: lcov-coverage-info-native-platformio-tests-${{ steps.version.outputs.long }}.zip
114+
name: lcov-coverage-info-native-platformio-tests-${{ steps.version.outputs.long }}
115115
overwrite: true
116116
path: ./coverage_*.info
117117

@@ -139,7 +139,7 @@ jobs:
139139
- name: Download test artifacts
140140
uses: actions/download-artifact@v5
141141
with:
142-
name: platformio-test-report-${{ steps.version.outputs.long }}.zip
142+
name: platformio-test-report-${{ steps.version.outputs.long }}
143143
merge-multiple: true
144144

145145
- name: Test Report
@@ -152,7 +152,7 @@ jobs:
152152
- name: Download coverage artifacts
153153
uses: actions/download-artifact@v5
154154
with:
155-
pattern: lcov-coverage-info-native-*-${{ steps.version.outputs.long }}.zip
155+
pattern: lcov-coverage-info-native-*-${{ steps.version.outputs.long }}
156156
path: code-coverage-report
157157
merge-multiple: true
158158

@@ -165,5 +165,5 @@ jobs:
165165
- name: Save Code Coverage Report
166166
uses: actions/upload-artifact@v4
167167
with:
168-
name: code-coverage-report-${{ steps.version.outputs.long }}.zip
168+
name: code-coverage-report-${{ steps.version.outputs.long }}
169169
path: code-coverage-report

bin/build-esp32.sh

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,8 @@ set -e
55
VERSION=`bin/buildinfo.py long`
66
SHORT_VERSION=`bin/buildinfo.py short`
77

8-
OUTDIR=release/
8+
BUILDDIR=.pio/build/$1
9+
OUTDIR=release
910

1011
rm -f $OUTDIR/firmware*
1112
rm -r $OUTDIR/* || true
@@ -14,24 +15,22 @@ rm -r $OUTDIR/* || true
1415
platformio pkg install -e $1
1516

1617
echo "Building for $1 with $PLATFORMIO_BUILD_FLAGS"
17-
rm -f .pio/build/$1/firmware.*
18+
rm -f $BUILDDIR/firmware*
1819

1920
# The shell vars the build tool expects to find
2021
export APP_VERSION=$VERSION
2122

2223
basename=firmware-$1-$VERSION
2324

2425
pio run --environment $1 # -v
25-
SRCELF=.pio/build/$1/firmware.elf
26-
cp $SRCELF $OUTDIR/$basename.elf
26+
27+
cp $BUILDDIR/$basename.elf $OUTDIR/$basename.elf
2728

2829
echo "Copying ESP32 bin file"
29-
SRCBIN=.pio/build/$1/firmware.factory.bin
30-
cp $SRCBIN $OUTDIR/$basename.bin
30+
cp $BUILDDIR/$basename.factory.bin $OUTDIR/$basename.factory.bin
3131

3232
echo "Copying ESP32 update bin file"
33-
SRCBIN=.pio/build/$1/firmware.bin
34-
cp $SRCBIN $OUTDIR/$basename-update.bin
33+
cp $BUILDDIR/$basename.bin $OUTDIR/$basename.bin
3534

3635
echo "Building Filesystem for ESP32 targets"
3736
# If you want to build the webui, uncomment the following lines
@@ -41,6 +40,10 @@ echo "Building Filesystem for ESP32 targets"
4140
# ls -l data/static # Diagnostic list of files
4241
# rm -rf data/static
4342
pio run --environment $1 -t buildfs
44-
cp .pio/build/$1/littlefs.bin $OUTDIR/littlefs-$1-$VERSION.bin
45-
cp bin/device-install.* $OUTDIR
46-
cp bin/device-update.* $OUTDIR
43+
cp $BUILDDIR/littlefs-$1-$VERSION.bin $OUTDIR/littlefs-$1-$VERSION.bin
44+
cp bin/device-install.* $OUTDIR/
45+
cp bin/device-update.* $OUTDIR/
46+
47+
# Generate the manifest file
48+
pio run --environment $1 -t mtjson
49+
cp $BUILDDIR/$basename.mt.json $OUTDIR/$basename.mt.json

bin/build-native.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,19 @@ VERSION=$(bin/buildinfo.py long)
1717
SHORT_VERSION=$(bin/buildinfo.py short)
1818
PIO_ENV=${1:-native}
1919

20-
OUTDIR=release/
20+
BUILDDIR=.pio/build/$PIO_ENV
21+
OUTDIR=release
2122

22-
rm -f $OUTDIR/firmware*
23+
rm -f $OUTDIR/meshtasticd*
2324

2425
mkdir -p $OUTDIR/
2526
rm -r $OUTDIR/* || true
2627

28+
basename=meshtasticd-$1-$VERSION
29+
2730
# Important to pull latest version of libs into all device flavors, otherwise some devices might be stale
2831
pio pkg install --environment "$PIO_ENV" || platformioFailed
2932
pio run --environment "$PIO_ENV" || platformioFailed
30-
cp ".pio/build/$PIO_ENV/program" "$OUTDIR/meshtasticd_linux_$(uname -m)"
31-
cp bin/native-install.* $OUTDIR
33+
34+
cp "$BUILDDIR/$basename" "$OUTDIR/meshtasticd_linux_$(uname -m)"
35+
cp bin/native-install.* $OUTDIR/

0 commit comments

Comments
 (0)