mirror of
https://github.com/micropython/micropython.git
synced 2026-05-01 21:30:14 +02:00
2ccf78ae19
Intended to catch problems where new features don't build in old ESP-IDF. Includes major refactor to the GitHub Actions Workflow for esp32 port, including making a reusable workflow for both Code Size and ESP32 build jobs. This work was funded through GitHub Sponsors. Signed-off-by: Angus Gratton <angus@redyak.com.au>
48 lines
1.1 KiB
YAML
48 lines
1.1 KiB
YAML
name: Setup ESP-IDF for CI
|
|
description: Install ESP-IDF
|
|
inputs:
|
|
idf_ver:
|
|
required: true
|
|
type: string
|
|
ccache_key:
|
|
required: true
|
|
type: string
|
|
|
|
runs:
|
|
using: "composite"
|
|
|
|
steps:
|
|
- id: python_ver
|
|
name: Read the Python version
|
|
run: echo PYTHON_VER=py$(python --version | cut -d' ' -f2) | tee "${GITHUB_OUTPUT}"
|
|
shell: bash
|
|
|
|
- name: Cached ESP-IDF install
|
|
id: cache_esp_idf
|
|
uses: actions/cache@v5
|
|
with:
|
|
path: |
|
|
./esp-idf/
|
|
~/.espressif/
|
|
!~/.espressif/dist/
|
|
~/.cache/pip/
|
|
# Cache is keyed on both IDF version (from the job) and Python version (from the runner)
|
|
key: esp-idf-${{ inputs.idf_ver }}-${{ steps.python_ver.outputs.PYTHON_VER }}
|
|
|
|
- name: Install ESP-IDF packages
|
|
if: steps.cache_esp_idf.outputs.cache-hit != 'true'
|
|
env:
|
|
IDF_VER: ${{ inputs.idf_ver }}
|
|
run: tools/ci.sh esp32_idf_setup
|
|
shell: bash
|
|
|
|
- name: ccache
|
|
uses: hendrikmuhs/ccache-action@v1.2
|
|
with:
|
|
key: esp32-${{ inputs.idf_ver }}-${{ inputs.ccache_key }}
|
|
|
|
- name: Enable CCache for ESP-IDF
|
|
run: echo "IDF_CCACHE_ENABLE=1" >> ${GITHUB_ENV}
|
|
shell: bash
|
|
|