-
-
Notifications
You must be signed in to change notification settings - Fork 177
166 lines (146 loc) · 6.3 KB
/
buil_parallel.yml
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
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
---
name: Compile Develop Brench
on:
push:
branches:
- main
tags:
- "*"
pull_request:
branches:
- main
workflow_dispatch:
inputs:
board:
description: 'Board to Compile'
type: choice
required: true
default: 'M5Cardputer'
options: ['M5Cardputer', 'M5StickCPlus2', 'M5StickCPlus', 'Core2', 'Core16mb', 'Core4mb', 'CoreS3']
jobs:
compile_sketch:
name: Build ${{ matrix.board.name }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# locale:
# - en-us
# - pt-br
board:
- {
name: "M5Cardputer",
env: "m5stack-cardputer",
partitions: {
bootloader_addr: "0x0000",
},
}
- {
name: "M5StickCPlus2",
env: "m5stack-cplus2",
partitions: {
bootloader_addr: "0x1000",
},
}
- {
name: "M5StickCPlus",
env: "m5stack-cplus1_1",
partitions: {
bootloader_addr: "0x1000",
},
}
- {
name: "Core2",
env: "m5stack-core2",
partitions: {
bootloader_addr: "0x1000",
},
}
- {
name: "Core16mb",
env: "m5stack-core16mb",
partitions: {
bootloader_addr: "0x1000",
},
}
- {
name: "Core4mb",
env: "m5stack-core4mb",
partitions: {
bootloader_addr: "0x1000",
},
}
- {
name: "CoreS3",
env: "m5stack-cores3",
partitions: {
bootloader_addr: "0x0",
},
}
steps:
- uses: actions/checkout@v4
- id: build
name: setup Python
uses: actions/setup-python@v2
with:
python-version: "3.x"
- name: Install dependencies
run: |
pip install requests esptool
- name: Install PlatformIO Core
run: |
pip install platformio
pio pkg update
sed -i "s/-DGIT_COMMIT_HASH='\"Homebrew\"'/\!echo '-DGIT_COMMIT_HASH=\\\\\\\\\"'\$\(git describe --always --dirty)'\\\\\\\\\"'/g" ./platformio.ini
- name: Setup PlatformIO for Deauth
run: |
# pio pkg install -p espressif32 -t toolchain-xtensa32
# esp32_file="$HOME/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/lib/libnet80211.a"
# esp32s3_file="$HOME/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s3/lib/libnet80211.a"
# esp32_file_temp="$HOME/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32/lib/libnet80211_temp.a"
# esp32s3_file_temp="$HOME/.platformio/packages/framework-arduinoespressif32/tools/sdk/esp32s3/lib/libnet80211_temp.a"
# Definir caminhos para as ferramentas objcopy
# toolchain_esp32="$HOME/.platformio/packages/toolchain-xtensa-esp32/xtensa-esp32-elf/bin/objcopy"
# toolchain_esp32s3="$HOME/.platformio/packages/toolchain-xtensa-esp32s3/xtensa-esp32s3-elf/bin/objcopy"
# Verificar se os arquivos existem antes de executar os comandos
# if [[ -f "$esp32_file" && -f "$esp32s3_file" ]]; then
# # Execute objcopy commands for ESP32
# $toolchain_esp32 --weaken-symbol=ieee80211_raw_frame_sanity_check "$esp32_file" "$esp32_file_temp"
# # Rename the original file to .old
# mv "$esp32_file" "${esp32_file}.old"
# # Rename the _temp to original
# mv "$esp32_file_temp" "$esp32_file"
# # Execute objcopy commands for ESP32-S3
# $toolchain_esp32s3 --weaken-symbol=ieee80211_raw_frame_sanity_check "$esp32s3_file" "$esp32s3_file_temp"
# # Rename the original file to .old
# mv "$esp32s3_file" "${esp32s3_file}.old"
# # Rename the _temp to original
# mv "$esp32s3_file_temp" "$esp32s3_file"
# echo "Done."
# else
# echo "One or more specified files were not found."
# exit 1
# fi
- name: Run Compile
run: |
platformio run -e ${{ matrix.board.env }}
- name: Merge files
run: |
esptool.py --chip esp32s3 merge_bin -o Bruce_${{ matrix.board.env }}_${{ github.run_number }}.bin \
${{ matrix.board.partitions.bootloader_addr }} .pio/build/${{ matrix.board.env }}/bootloader.bin \
0x8000 .pio/build/${{ matrix.board.env }}/partitions.bin \
0x10000 .pio/build/${{ matrix.board.env }}/firmware.bin
- name: Upload ${{ matrix.board.name }}
uses: actions/upload-artifact@v4
with:
name: Bruce_${{ matrix.board.env }}_${{ github.run_number }}
path: Bruce_*.bin
retention-days: 5
if-no-files-found: error
- name: Upload elf ${{ matrix.board.name }}
uses: actions/upload-artifact@v4
with:
name: Bruce_${{ matrix.board.env }}_${{ github.run_number }}_elfs
path: .pio/build/${{ matrix.board.env }}/firmware.*
retention-days: 5
if-no-files-found: error