Start an aiorepl at badge startup (#254) #354
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build Micropython | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| push: | |
| tags: | |
| - "v*" | |
| env: | |
| TARGET: esp32s3 | |
| IDF_TARGET: esp32s3 | |
| jobs: | |
| Build-Firmware: | |
| runs-on: ubuntu-latest | |
| permissions: write-all | |
| steps: | |
| - name: Check out driver code | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Submodules | |
| run: | | |
| cd micropython/lib | |
| git submodule init | |
| git submodule update micropython-lib | |
| - name: Patch submodule dependencies | |
| run: | | |
| ./scripts/firstTime.sh | |
| - name: Build firmware | |
| run: | | |
| docker run -q --rm --env "TARGET=esp32s3" -v "$(pwd)"/:/firmware ghcr.io/emfcamp/esp_idf:v5.2.1 | |
| - name: Archive firmware | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: firmware | |
| path: | | |
| micropython/ports/esp32/build-tildagon/micropython.bin | |
| micropython/ports/esp32/build-tildagon/bootloader/bootloader.bin | |
| micropython/ports/esp32/build-tildagon/partition_table/partition-table.bin | |
| micropython/ports/esp32/build-tildagon/ota_data_initial.bin | |
| micropython/ports/esp32/build-tildagon/tildagon.txt | |
| - name: Create latest release for tags | |
| uses: "marvinpinto/action-automatic-releases@latest" | |
| if: ${{startsWith(github.event.ref, 'refs/tags/v') && !contains(github.event.ref, '-') }} | |
| with: | |
| repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
| automatic_release_tag: "latest" | |
| title: "Latest release build" | |
| prerelease: false | |
| files: | | |
| micropython/ports/esp32/build-tildagon/micropython.bin | |
| micropython/ports/esp32/build-tildagon/tildagon.txt | |
| - name: Create specific release for tags | |
| uses: "marvinpinto/action-automatic-releases@latest" | |
| if: ${{startsWith(github.event.ref, 'refs/tags/v')}} | |
| with: | |
| prerelease: ${{ contains(github.event.ref, '-') }} | |
| repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
| files: | | |
| micropython/ports/esp32/build-tildagon/micropython.bin | |
| micropython/ports/esp32/build-tildagon/tildagon.txt | |
| - name: Create preview release for rc tags | |
| uses: "marvinpinto/action-automatic-releases@latest" | |
| if: ${{startsWith(github.event.ref, 'refs/tags/v') && contains(github.event.ref, '-') }} | |
| with: | |
| repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
| automatic_release_tag: "preview" | |
| prerelease: true | |
| title: "Latest preview build" | |
| files: | | |
| micropython/ports/esp32/build-tildagon/micropython.bin | |
| micropython/ports/esp32/build-tildagon/tildagon.txt | |
| - name: Build merged image | |
| run: | | |
| source esp-idf/export.sh | |
| cd micropython/ports/esp32 | |
| python -m esptool --chip esp32s3 -b 460800 merge_bin -o merged-firmware.bin --flash_mode dio --flash_size 8MB --flash_freq 80m 0x0 build-tildagon/bootloader/bootloader.bin 0x8000 build-tildagon/partition_table/partition-table.bin 0xd000 build-tildagon/ota_data_initial.bin 0x10000 build-tildagon/micropython.bin | |
| cp merged-firmware.bin $GITHUB_WORKSPACE/flasher/ | |
| if: startsWith(github.event.ref, 'refs/tags/v') | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/upload-pages-artifact@v3 # or specific "vX.X.X" version tag for this action | |
| with: | |
| path: ./flasher | |
| if: ${{startsWith(github.event.ref, 'refs/tags/v') && !contains(github.event.ref, '-') }} | |
| deploy: | |
| if: ${{startsWith(github.event.ref, 'refs/tags/v') && !contains(github.event.ref, '-') }} | |
| needs: Build-Firmware | |
| permissions: | |
| pages: write # to deploy to Pages | |
| id-token: write # to verify the deployment originates from an appropriate source | |
| # Deploy to the github-pages environment | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| # Specify runner + deployment step | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action |