1
1
name : BTClock CI
2
2
3
- on :
3
+ on :
4
4
push :
5
5
tags :
6
- - ' * '
6
+ - " * "
7
7
8
8
jobs :
9
9
build :
@@ -40,24 +40,52 @@ jobs:
40
40
version : esp32s3
41
41
- name : btclock_rev_b
42
42
version : esp32s3
43
+ - name : btclock_v8
44
+ version : esp32s3
43
45
epd_variant : [213epd, 29epd]
44
46
exclude :
45
- - chip : btclock_rev_b
46
- epd_variant : 29epd
47
+ - chip : btclock_rev_b
48
+ epd_variant : 29epd
49
+ - chip : btclock_v8
50
+ epd_variant : 29epd
47
51
steps :
48
52
- uses : actions/download-artifact@v4
49
53
with :
50
54
name : prepared-outputs
51
55
path : .pio
52
56
- name : Install esptools.py
53
57
run : pip install --upgrade esptool
54
-
58
+ # - name: Create merged firmware binary
59
+ # run: mkdir -p ${{ matrix.chip.name }}_${{ matrix.epd_variant }} && esptool.py --chip ${{ matrix.chip.version }} merge_bin -o ${{ matrix.chip.name }}_${{ matrix.epd_variant }}/${{ matrix.chip.name }}_${{ matrix.epd_variant }}.bin --flash_mode dio 0x0000 .pio/build/${{ matrix.chip.name }}_${{ matrix.epd_variant }}/bootloader.bin 0x8000 .pio/build/${{ matrix.chip.name }}_${{ matrix.epd_variant }}/partitions.bin 0xe000 .pio/boot_app0.bin 0x10000 .pio/build/${{ matrix.chip.name }}_${{ matrix.epd_variant }}/firmware.bin 0x369000 .pio/build/${{ matrix.chip.name }}_${{ matrix.epd_variant }}/littlefs.bin
55
60
- name : Create merged firmware binary
56
- run : mkdir -p ${{ matrix.chip.name }}_${{ matrix.epd_variant }} && esptool.py --chip ${{ matrix.chip.version }} merge_bin -o ${{ matrix.chip.name }}_${{ matrix.epd_variant }}/${{ matrix.chip.name }}_${{ matrix.epd_variant }}.bin --flash_mode dio 0x0000 .pio/build/${{ matrix.chip.name }}_${{ matrix.epd_variant }}/bootloader.bin 0x8000 .pio/build/${{ matrix.chip.name }}_${{ matrix.epd_variant }}/partitions.bin 0xe000 .pio/boot_app0.bin 0x10000 .pio/build/${{ matrix.chip.name }}_${{ matrix.epd_variant }}/firmware.bin 0x369000 .pio/build/${{ matrix.chip.name }}_${{ matrix.epd_variant }}/littlefs.bin
61
+ run : |
62
+ if [ "${{ matrix.chip.name }}" == "btclock_v8" ]; then
63
+ mkdir -p ${{ matrix.chip.name }}_${{ matrix.epd_variant }} && \
64
+ esptool.py --chip ${{ matrix.chip.version }} merge_bin \
65
+ -o ${{ matrix.chip.name }}_${{ matrix.epd_variant }}/${{ matrix.chip.name }}_${{ matrix.epd_variant }}.bin \
66
+ --flash_mode qio \
67
+ 0x0000 .pio/build/${{ matrix.chip.name }}_${{ matrix.epd_variant }}/bootloader.bin \
68
+ 0x8000 .pio/build/${{ matrix.chip.name }}_${{ matrix.epd_variant }}/partitions.bin \
69
+ 0xe000 .pio/boot_app0.bin \
70
+ 0x10000 .pio/build/${{ matrix.chip.name }}_${{ matrix.epd_variant }}/firmware.bin \
71
+ 0x810000 .pio/build/${{ matrix.chip.name }}_${{ matrix.epd_variant }}/littlefs.bin;
72
+ else
73
+ # Original command for other cases
74
+ mkdir -p ${{ matrix.chip.name }}_${{ matrix.epd_variant }} && \
75
+ esptool.py --chip ${{ matrix.chip.version }} merge_bin \
76
+ -o ${{ matrix.chip.name }}_${{ matrix.epd_variant }}/${{ matrix.chip.name }}_${{ matrix.epd_variant }}.bin \
77
+ --flash_mode dio \
78
+ 0x0000 .pio/build/${{ matrix.chip.name }}_${{ matrix.epd_variant }}/bootloader.bin \
79
+ 0x8000 .pio/build/${{ matrix.chip.name }}_${{ matrix.epd_variant }}/partitions.bin \
80
+ 0xe000 .pio/boot_app0.bin \
81
+ 0x10000 .pio/build/${{ matrix.chip.name }}_${{ matrix.epd_variant }}/firmware.bin \
82
+ 0x369000 .pio/build/${{ matrix.chip.name }}_${{ matrix.epd_variant }}/littlefs.bin
83
+ # Adjust the offset for littlefs or other files as needed for the original case
84
+ fi
57
85
58
86
- name : Create checksum for firmware
59
87
run : shasum -a 256 .pio/build/${{ matrix.chip.name }}_${{ matrix.epd_variant }}/firmware.bin | awk '{print $1}' > ${{ matrix.chip.name }}_${{ matrix.epd_variant }}/${{ matrix.chip.name }}_${{ matrix.epd_variant }}_firmware.bin.sha256
60
-
88
+
61
89
- name : Create checksum for merged binary
62
90
run : shasum -a 256 ${{ matrix.chip.name }}_${{ matrix.epd_variant }}/${{ matrix.chip.name }}_${{ matrix.epd_variant }}.bin | awk '{print $1}' > ${{ matrix.chip.name }}_${{ matrix.epd_variant }}/${{ matrix.chip.name }}_${{ matrix.epd_variant }}.bin.sha256
63
91
@@ -91,10 +119,10 @@ jobs:
91
119
merge-multiple : false
92
120
- name : Write commit hash to file
93
121
run : echo $GITHUB_SHA > commit.txt
94
-
122
+
95
123
- name : Write build date to file
96
124
run : echo "$(date -u +'%Y-%m-%dT%H:%M:%SZ')" > date.txt
97
-
125
+
98
126
- name : Create release
99
127
uses : ncipollo/release-action@v1
100
128
with :
@@ -117,8 +145,8 @@ jobs:
117
145
with :
118
146
source-directory : .
119
147
target-directory : firmware_v3/
120
- destination-github-username : ' btclock'
121
- destination-repository-name : ' web-flasher'
148
+ destination-github-username : " btclock"
149
+ destination-repository-name : " web-flasher"
122
150
target-branch : main
123
151
user-name : ${{github.actor}}
124
- user-email : ${{github.actor}}@users.noreply.github.com
152
+ user-email : ${{github.actor}}@users.noreply.github.com
0 commit comments