Skip to content

ESP32.yml aktualisieren #2

ESP32.yml aktualisieren

ESP32.yml aktualisieren #2

Workflow file for this run

name: Build MicroPython for ESP32 Boards
on:
push:
branches:
- "CI"
jobs:
setup-environment:
runs-on: ubuntu-latest
outputs:
idf-path: ${{ steps.export-idf.outputs.idf-path }}
steps:
# 1. Check out the repository
- name: Checkout repository
uses: actions/checkout@v3
# 2. Install ESP-IDF dependencies
- name: Install ESP-IDF dependencies
run: |
sudo apt-get update
sudo apt-get install -y git wget flex bison gperf python3 python3-pip python3-setuptools cmake ninja-build ccache libffi-dev libssl-dev dfu-util libusb-1.0-0
# 3. Download and set up ESP-IDF 5.2.x
- name: Set up ESP-IDF 5.2.x
id: export-idf
run: |
git clone --branch release/v5.2 --recursive https://github.com/espressif/esp-idf.git
cd esp-idf
./install.sh
echo "::set-output name=idf-path::$(pwd)"
# Dynamically create jobs for each board
build:
needs: setup-environment
runs-on: ubuntu-latest
strategy:
matrix:
board:
- ESP32_GENERIC:SPIRAM
- ESP32_GENERIC_S2:SPIRAM
- ESP32_GENERIC_S3:SPIRAM
steps:
# 1. Check out the repository
- name: Checkout repository
uses: actions/checkout@v3
# 2. Set up ESP-IDF environment for the job
- name: Set up ESP-IDF environment
run: |
cd ${{ needs.setup-environment.outputs.idf-path }}
source ./export.sh
cd -
# 3. Parse board name and variant
- name: Parse Board Name and Variant
id: parse
run: |
IFS=':' read -r BOARD_NAME BOARD_VARIANT <<< "${{ matrix.board }}"
echo "::set-output name=board_name::${BOARD_NAME}"
echo "::set-output name=board_variant::${BOARD_VARIANT}"
# 4. Clone latest MicroPython release and build for each board
- name: Build MicroPython
run: |

Check failure on line 65 in .github/workflows/ESP32.yml

View workflow run for this annotation

GitHub Actions / Build MicroPython for ESP32 Boards

Invalid workflow file

The workflow is not valid. .github/workflows/ESP32.yml (Line: 65, Col: 14): Unexpected symbol: 'board_variant:+_${{'. Located at position 21 within expression: steps.parse.outputs.board_variant:+_${{ steps.parse.outputs.board_variant .github/workflows/ESP32.yml (Line: 93, Col: 17): Unexpected symbol: 'board_variant:+_${{'. Located at position 21 within expression: steps.parse.outputs.board_variant:+_${{ steps.parse.outputs.board_variant

Check failure on line 65 in .github/workflows/ESP32.yml

View workflow run for this annotation

GitHub Actions / Build MicroPython for ESP32 Boards

Invalid workflow file

The workflow is not valid. .github/workflows/ESP32.yml (Line: 65, Col: 14): Unexpected symbol: 'board_variant:+_${{'. Located at position 21 within expression: steps.parse.outputs.board_variant:+_${{ steps.parse.outputs.board_variant .github/workflows/ESP32.yml (Line: 93, Col: 17): Unexpected symbol: 'board_variant:+_${{'. Located at position 21 within expression: steps.parse.outputs.board_variant:+_${{ steps.parse.outputs.board_variant
git clone https://github.com/micropython/micropython.git
cd micropython
git checkout $(git describe --tags `git rev-list --tags --max-count=1`)
git submodule update --init
cd ports/esp32
make submodules
# Optional: Apply sdkconfig file if available
if [ -f "../../../src/sdkconfig_${{ steps.parse.outputs.board_name }}" ]; then
cp ../../../src/sdkconfig_${{ steps.parse.outputs.board_name }} sdkconfig.defaults
fi
if [ -n "${{ steps.parse.outputs.board_variant }}" ]; then
make BOARD=${{ steps.parse.outputs.board_name }} VARIANT=${{ steps.parse.outputs.board_variant }} USER_C_MODULES=../../../../src/micropython.cmake
else:
make BOARD=${{ steps.parse.outputs.board_name }} USER_C_MODULES=../../../../src/micropython.cmake
fi
# Store the binary
mkdir -p ../../../build/${{ steps.parse.outputs.board_name }}${{ steps.parse.outputs.board_variant:+_${{ steps.parse.outputs.board_variant }} }}
cp build/firmware.bin ../../../build/${{ steps.parse.outputs.board_name }}${{ steps.parse.outputs.board_variant:+_${{ steps.parse.outputs.board_variant }} }}/
# 5. Upload firmware binaries
- name: Upload firmware
uses: actions/upload-artifact@v3
with:
name: ${{ steps.parse.outputs.board_name }}_firmware
path: build/${{ steps.parse.outputs.board_name }}${{ steps.parse.outputs.board_variant:+_${{ steps.parse.outputs.board_variant }} }}/firmware.bin