ci: use espressif/idf:v5.5 container image to eliminate cache timeout
Some checks failed
ESP32 Build & Release / build (push) Failing after 4s
Some checks failed
ESP32 Build & Release / build (push) Failing after 4s
This commit is contained in:
@@ -8,6 +8,8 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
container:
|
||||||
|
image: espressif/idf:v5.5
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
@@ -16,97 +18,21 @@ jobs:
|
|||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
# ------------------------------------------------------------
|
- name: Configure Git Safe Directory
|
||||||
# System dependencies
|
|
||||||
# ------------------------------------------------------------
|
|
||||||
- name: Install system dependencies
|
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
git config --global --add safe.directory "$GITHUB_WORKSPACE" || true
|
||||||
|
|
||||||
sudo apt-get install -y \
|
|
||||||
git \
|
|
||||||
wget \
|
|
||||||
flex \
|
|
||||||
bison \
|
|
||||||
gperf \
|
|
||||||
python3 \
|
|
||||||
python3-pip \
|
|
||||||
python3-venv \
|
|
||||||
cmake \
|
|
||||||
ninja-build \
|
|
||||||
ccache \
|
|
||||||
libffi-dev \
|
|
||||||
libssl-dev \
|
|
||||||
dfu-util
|
|
||||||
|
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
# Cache ESP-IDF and Espressif tools
|
# Build firmware & merged binary
|
||||||
# ------------------------------------------------------------
|
|
||||||
- name: Cache ESP-IDF
|
|
||||||
uses: actions/cache@v4
|
|
||||||
with:
|
|
||||||
path: |
|
|
||||||
~/esp/esp-idf
|
|
||||||
~/.espressif
|
|
||||||
key: esp-idf-5.5-esp32-${{ runner.os }}
|
|
||||||
restore-keys: |
|
|
||||||
esp-idf-5.5-esp32-
|
|
||||||
|
|
||||||
# ------------------------------------------------------------
|
|
||||||
# Install ESP-IDF 5.5
|
|
||||||
# ------------------------------------------------------------
|
|
||||||
- name: Install ESP-IDF 5.5
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
mkdir -p "$HOME/esp"
|
|
||||||
|
|
||||||
if [ ! -f "$HOME/esp/esp-idf/export.sh" ]; then
|
|
||||||
echo "ESP-IDF not found in cache."
|
|
||||||
echo "Cloning ESP-IDF 5.5..."
|
|
||||||
|
|
||||||
git clone --recursive \
|
|
||||||
--branch v5.5 \
|
|
||||||
https://github.com/espressif/esp-idf.git \
|
|
||||||
"$HOME/esp/esp-idf"
|
|
||||||
|
|
||||||
cd "$HOME/esp/esp-idf"
|
|
||||||
|
|
||||||
./install.sh esp32
|
|
||||||
else
|
|
||||||
echo "Using cached ESP-IDF."
|
|
||||||
fi
|
|
||||||
|
|
||||||
# ------------------------------------------------------------
|
|
||||||
# Verify ESP-IDF
|
|
||||||
# ------------------------------------------------------------
|
|
||||||
- name: Verify ESP-IDF
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
source "$HOME/esp/esp-idf/export.sh"
|
|
||||||
|
|
||||||
echo "ESP-IDF:"
|
|
||||||
idf.py --version
|
|
||||||
|
|
||||||
# ------------------------------------------------------------
|
|
||||||
# Build firmware
|
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
- name: Build firmware
|
- name: Build firmware
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
source "$HOME/esp/esp-idf/export.sh"
|
. /opt/esp/idf/export.sh
|
||||||
|
idf.py --version
|
||||||
idf.py set-target esp32
|
idf.py set-target esp32
|
||||||
idf.py build
|
idf.py build
|
||||||
|
|
||||||
# ------------------------------------------------------------
|
|
||||||
# Create merged firmware image
|
|
||||||
# ------------------------------------------------------------
|
|
||||||
- name: Create merged firmware
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
source "$HOME/esp/esp-idf/export.sh"
|
|
||||||
|
|
||||||
idf.py merge-bin
|
idf.py merge-bin
|
||||||
|
|
||||||
# ------------------------------------------------------------
|
# ------------------------------------------------------------
|
||||||
|
|||||||
Reference in New Issue
Block a user