Skip to content

Commit 33efbdd

Browse files
authored
Develop into master (#11)
* Changes: Quality definitions to standard jpeg quality * Added image converters * Added a lot of supported boards * Many bug-fixes * More examples * Additional improvements
1 parent b31c83d commit 33efbdd

File tree

14 files changed

+1397
-158
lines changed

14 files changed

+1397
-158
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Add-Artifacts-to-Draft-Release
2+
3+
on:
4+
release:
5+
types:
6+
- created
7+
8+
jobs:
9+
add_artifacts:
10+
if: ${{ github.event.release.draft }}
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
16+
- name: Set up GitHub CLI
17+
uses: actions/setup-gh-cli@v2
18+
19+
- name: Authenticate GitHub CLI
20+
run: echo "${{ secrets.GITHUB_TOKEN }}" | gh auth login --with-token
21+
22+
- name: Download artifacts
23+
uses: actions/download-artifact@v4
24+
with:
25+
name: firmware-*
26+
path: ./artifacts
27+
28+
- name: Upload Release Assets
29+
run: |
30+
for file in ./artifacts/*; do
31+
gh release upload "${{ github.event.release.tag_name }}" "$file" --clobber
32+
done

.github/workflows/ESP32.yml

Lines changed: 49 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@ on:
55
push:
66
paths:
77
- 'src/**'
8+
- '.github/workflows/*.yml'
89
pull_request:
910
branches:
1011
- master
12+
paths:
13+
- 'src/**'
14+
- '.github/workflows/*.yml'
1115

1216
concurrency:
1317
group: ${{ github.workflow }}-${{ github.ref }}
@@ -68,13 +72,13 @@ jobs:
6872
if: steps.cache_esp_idf.outputs.cache-hit != 'true'
6973
run: |
7074
cd ~
71-
git clone --depth 1 --branch release/v5.2 https://github.com/espressif/esp-idf.git
72-
# git clone --depth 1 --branch ${{ env.IDF_VER }} https://github.com/espressif/esp-idf.git
75+
# git clone --depth 1 --branch release/v5.2 https://github.com/espressif/esp-idf.git
76+
git clone --depth 1 --branch ${{ env.IDF_VER }} https://github.com/espressif/esp-idf.git
7377
git -C esp-idf submodule update --init --recursive --filter=tree:0
7478
cd esp-idf
7579
./install.sh all
7680
cd components
77-
git clone https://github.com/espressif/esp32-camera
81+
git clone https://github.com/cnadler86/esp32-camera
7882
cd ~/esp-idf/
7983
source ./export.sh
8084
@@ -85,12 +89,30 @@ jobs:
8589
strategy:
8690
fail-fast: false
8791
matrix:
88-
board:
92+
board:
8993
- ESP32_GENERIC-SPIRAM
9094
- ESP32_GENERIC_S2
9195
- ESP32_GENERIC_S3
9296
- ESP32_GENERIC_S3-SPIRAM_OCT
9397
- ESP32_GENERIC_S3-FLASH_4M
98+
- ESP32_GENERIC-SPIRAM@WROVER_KIT
99+
- ESP32_GENERIC-SPIRAM@ESP_EYE
100+
- ESP32_GENERIC-SPIRAM@M5STACK_PSRAM
101+
- ESP32_GENERIC-SPIRAM@M5STACK_V2_PSRAM
102+
- ESP32_GENERIC-SPIRAM@M5STACK_WIDE
103+
- ESP32_GENERIC-SPIRAM@M5STACK_ESP32CAM
104+
- ESP32_GENERIC-SPIRAM@M5STACK_UNITCAM
105+
- ESP32_GENERIC-SPIRAM@AI_THINKER
106+
- ESP32_GENERIC-SPIRAM@TTGO_T_JOURNAL
107+
- ESP32_GENERIC-SPIRAM@TTGO_T_CAMERA_PLUS
108+
- ESP32_GENERIC_S3-SPIRAM_OCT@M5STACK_CAMS3_UNIT
109+
- ESP32_GENERIC_S3-SPIRAM_OCT@XIAO_ESP32S3
110+
- ESP32_GENERIC_S3-SPIRAM_OCT@ESP32S3_CAM_LCD
111+
- ESP32_GENERIC_S3-SPIRAM_OCT@ESP32S3_EYE
112+
- ESP32_GENERIC_S3-SPIRAM_OCT@FREENOVE_ESP32S3_CAM
113+
- ESP32_GENERIC_S3-SPIRAM_OCT@DFRobot_ESP32S3
114+
- ESP32_GENERIC_S3-SPIRAM_OCT@NEW_ESPS3_RE1_0
115+
- ESP32_GENERIC_S3-SPIRAM_OCT@XENOIONEX
94116

95117
steps:
96118
# Get the latest MicroPython release
@@ -126,18 +148,33 @@ jobs:
126148
cd ~/micropython/ports/esp32
127149
source ~/esp-idf/export.sh
128150
129-
# Check if a variant is defined and adjust the make command
130-
IFS='-' read -r BOARD_NAME BOARD_VARIANT <<< "${{ matrix.board }}"
151+
# Check if a variant is defined and adjust the idf.py command
152+
IFS='@' read -r BUILD_TARGET CAMERA_MODEL <<< "${{ matrix.board }}"
153+
IFS='-' read -r BOARD_NAME BOARD_VARIANT <<< "${BUILD_TARGET}"
154+
131155
if [ -n "${BOARD_VARIANT}" ]; then
132-
make USER_C_MODULES=${{ github.workspace }}/src/micropython.cmake BOARD=$BOARD_NAME BOARD_VARIANT=$BOARD_VARIANT all
156+
IDF_CMD="idf.py -D MICROPY_BOARD=$BOARD_NAME -D USER_C_MODULES=${{ github.workspace }}/src/micropython.cmake -D MICROPY_BOARD_VARIANT=$BOARD_VARIANT -B build-$BUILD_TARGET"
157+
else
158+
IDF_CMD="idf.py -D MICROPY_BOARD=$BOARD_NAME -D USER_C_MODULES=${{ github.workspace }}/src/micropython.cmake -B build-$BUILD_TARGET"
159+
fi
160+
if [ -n "${CAMERA_MODEL}" ]; then
161+
echo "FW_NAME=${CAMERA_MODEL}" >> $GITHUB_ENV
162+
FINAL_CMD="${IDF_CMD} -D MICROPY_CAMERA_MODEL=${CAMERA_MODEL} build"
133163
else
134-
make USER_C_MODULES=${{ github.workspace }}/src/micropython.cmake BOARD=$BOARD_NAME all
164+
echo "FW_NAME=${BUILD_TARGET}" >> $GITHUB_ENV
165+
FINAL_CMD="${IDF_CMD} build"
135166
fi
136-
mv ~/micropython/ports/esp32/build-${{ matrix.board }}/firmware.bin ~/${{ matrix.board }}.bin
167+
make USER_C_MODULES=${{ github.workspace }}/src/micropython.cmake BOARD=$BOARD_NAME submodules
168+
echo "Running command: $FINAL_CMD"
169+
eval $FINAL_CMD
170+
cd ~/micropython/ports/esp32/build-${BUILD_TARGET}
171+
python ../makeimg.py sdkconfig bootloader/bootloader.bin partition_table/partition-table.bin micropython.bin firmware.bin micropython.uf2
172+
mkdir -p ~/artifacts
173+
mv ~/micropython/ports/esp32/build-${BUILD_TARGET}/firmware.bin ~/artifacts/firmware.bin
137174
138175
- name: Upload firmware artifact
139176
uses: actions/upload-artifact@v4
140177
with:
141-
name: firmware-${{ matrix.board }}
142-
path: ~/${{ matrix.board }}.bin
143-
retention-days: 90
178+
name: firmware-${{ env.FW_NAME }}
179+
path: ~/artifacts/**
180+
retention-days: 5

0 commit comments

Comments
 (0)