Skip to content

Commit

Permalink
ESP32.yml aktualisieren
Browse files Browse the repository at this point in the history
  • Loading branch information
cnadler86 authored Sep 28, 2024
1 parent 2d419e8 commit 54cbf7a
Showing 1 changed file with 17 additions and 15 deletions.
32 changes: 17 additions & 15 deletions .github/workflows/ESP32.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ jobs:
runs-on: ubuntu-latest
outputs:
idf-path: ${{ steps.export-idf.outputs.idf-path }}
micropython-path: ${{ steps.clone-micropython.outputs.micropython-path }}
steps:
# 1. Check out the repository
- name: Checkout repository
Expand All @@ -30,6 +31,18 @@ jobs:
./install.sh
echo "::set-output name=idf-path::$(pwd)"
# 4. Clone the latest MicroPython release
- name: Clone MicroPython latest release
id: clone-micropython
run: |
# Fetch the latest MicroPython release tag using GitHub API
LATEST_RELEASE=$(curl --silent "https://api.github.com/repos/micropython/micropython/releases/latest" | jq -r .tag_name)
echo "Cloning MicroPython release: $LATEST_RELEASE"
git clone --depth 1 --branch $LATEST_RELEASE https://github.com/micropython/micropython.git
cd micropython
git submodule update --init --depth 1
echo "::set-output name=micropython-path::$(pwd)"
# Dynamically create jobs for each board
build:
needs: setup-environment
Expand All @@ -41,7 +54,7 @@ jobs:
- ESP32_GENERIC_S2:SPIRAM
- ESP32_GENERIC_S3:SPIRAM
steps:
# 1. Check out the repository
# 1. Check out the repository (optional: could be removed if not needed)
- name: Checkout repository
uses: actions/checkout@v3

Expand All @@ -60,21 +73,10 @@ jobs:
echo "::set-output name=board_name::${BOARD_NAME}"
echo "::set-output name=board_variant::${BOARD_VARIANT}"
# 4. Clone the latest MicroPython release
- name: Clone MicroPython latest release
run: |
# Fetch the latest MicroPython release tag using GitHub API
LATEST_RELEASE=$(curl --silent "https://api.github.com/repos/micropython/micropython/releases/latest" | jq -r .tag_name)
echo "Cloning MicroPython release: $LATEST_RELEASE"
git clone --depth 1 --branch $LATEST_RELEASE https://github.com/micropython/micropython.git
cd micropython
git submodule update --init --depth 1
# 5. Build MicroPython for each board
# 4. Build MicroPython for each board
- name: Build MicroPython
run: |
cd micropython/ports/esp32
cd ${{ needs.setup-environment.outputs.micropython-path }}/ports/esp32
make submodules
# Apply sdkconfig if available
Expand All @@ -92,7 +94,7 @@ jobs:
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 }} }}/
# 6. Upload firmware binaries
# 5. Upload firmware binaries
- name: Upload firmware
uses: actions/upload-artifact@v3
with:
Expand Down

0 comments on commit 54cbf7a

Please sign in to comment.