-
Notifications
You must be signed in to change notification settings - Fork 236
111 lines (92 loc) · 4.34 KB
/
main.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
name: build
on:
push:
paths-ignore:
- '**.md'
- 'circuit'
# env:
# UPLOAD_USER_FIRMWARE: false
jobs:
build:
runs-on: ubuntu-20.04
continue-on-error: true
strategy:
matrix:
target-hardware: [esp8266, esp32, esp32c3, esp32s3]
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: before_install
if: matrix.target-hardware == 'esp8266'
run: |
sudo apt update
sudo apt install -y gcc git wget make libncurses-dev flex bison python python-setuptools python3-serial ninja-build
wget https://dl.espressif.com/dl/xtensa-lx106-elf-linux64-1.22.0-100-ge567ec7-5.2.0.tar.gz
curl https://bootstrap.pypa.io/pip/2.7/get-pip.py -o get-pip.py
python get-pip.py
- name: install
if: matrix.target-hardware == 'esp8266'
run: |
tar -xzf ./xtensa-lx106-elf-linux64-1.22.0-100-ge567ec7-5.2.0.tar.gz
python -m pip install --user -r ./ESP8266_RTOS_SDK/requirements.txt
- name: script
id: script
if: matrix.target-hardware == 'esp8266'
run: |
export IDF_PATH=$PWD/ESP8266_RTOS_SDK
export PATH="$PATH:$PWD/xtensa-lx106-elf/bin"
echo "FIRMWARE=$PWD/build" >> $GITHUB_ENV
python ./idf.py fullclean
python ./idf.py build
echo "::set-output name=status::success"
# - name: Generate release tag
# id: tag
# if: env.UPLOAD_USER_FIRMWARE == 'true' && steps.script.outputs.status == 'success' && !cancelled()
# run: |
# echo "::set-output name=release_tag::UserBuild_$(date +"%Y.%m.%d_%H-%M")"
# echo "::set-output name=status::success"
- name: Build for esp32/esp32c3
if: matrix.target-hardware != 'esp8266'
uses: espressif/esp-idf-ci-action@v1
with:
esp_idf_version: v4.4.2
target: ${{ matrix.target-hardware }}
path: './'
- name: Merge bin files (esp8266)
if: matrix.target-hardware == 'esp8266'
run: |
git clone https://github.com/espressif/esptool.git
git -C ./esptool/ checkout tags/v4.6.2 -b merge_wirless_bin
sudo python3 ./esptool/esptool.py --chip ${{ matrix.target-hardware }} merge_bin -o build/wireless_esp_dap_full.bin 0x0 build/bootloader/bootloader.bin 0x8000 build/partition_table/partition-table.bin 0x10000 build/wireless_esp_dap.bin
sudo mv build/wireless_esp_dap.bin build/wireless_esp_dap_app.bin
- name: Merge bin files (esp32)
if: matrix.target-hardware == 'esp32'
run: |
git clone https://github.com/espressif/esptool.git
git -C ./esptool/ checkout tags/v4.6.2 -b merge_wirless_bin
sudo python3 ./esptool/esptool.py --chip ${{ matrix.target-hardware }} merge_bin -o build/wireless_esp_dap_full.bin 0x1000 build/bootloader/bootloader.bin 0x8000 build/partition_table/partition-table.bin 0x10000 build/wireless_esp_dap.bin
sudo mv build/wireless_esp_dap.bin build/wireless_esp_dap_app.bin
- name: Merge bin files (esp32c3)
if: matrix.target-hardware == 'esp32c3'
run: |
git clone https://github.com/espressif/esptool.git
git -C ./esptool/ checkout tags/v4.6.2 -b merge_wirless_bin
sudo python3 ./esptool/esptool.py --chip ${{ matrix.target-hardware }} merge_bin -o build/wireless_esp_dap_full.bin 0x0 build/bootloader/bootloader.bin 0x8000 build/partition_table/partition-table.bin 0x10000 build/wireless_esp_dap.bin
sudo mv build/wireless_esp_dap.bin build/wireless_esp_dap_app.bin
- name: merge bin files (esp32s3)
if: matrix.target-hardware == 'esp32s3'
run: |
git clone https://github.com/espressif/esptool.git
git -C ./esptool/ checkout tags/v4.6.2 -b merge_wirless_bin
sudo python3 ./esptool/esptool.py --chip ${{ matrix.target-hardware }} merge_bin -o build/wireless_esp_dap_full.bin 0x0 build/bootloader/bootloader.bin 0x8000 build/partition_table/partition-table.bin 0x10000 build/wireless_esp_dap.bin
sudo mv build/wireless_esp_dap.bin build/wireless_esp_dap_app.bin
- name: Upload firmware
uses: actions/upload-artifact@v2
with:
name: firmware_${{ matrix.target-hardware }}.zip
path: |
build/wireless_esp_dap_full.bin
build/wireless_esp_dap_app.bin
build/bootloader/bootloader.bin
build/partition_table/partition-table.bin