Files
install_esp_idf/action.yml
2021-11-26 00:13:19 +01:00

39 lines
1.2 KiB
YAML

name: Install esp-idf
description: Installs or updates esp-idf dependencies (and caches them)
inputs:
idfpath:
description: Path to esp-idf (should be a submodule of the firmware repository)
required: true
default: esp-idf
outputs: {}
runs:
using: composite
steps:
- name: Get esp-idf release name
id: get-esp-idf-release
uses: 0xFEEDC0DE64/get_latest_tag@main
with:
repo: ${{ inputs.idfpath }}
- name: Cache .espressif
id: cache-espressif
uses: actions/cache@v2
with:
path: ~/.espressif
key: ${{ runner.os }}-${{ steps.get-esp-idf-release.outputs.tag_name }}
- name: Install .espressif dependencies
# GitHub doesnt support if
#if: steps.cache-espressif.outputs.cache-hit != 'true'
#run: $(realpath -s "${{ inputs.idfpath }}")/install.sh
run: |
#if echo ${{ steps.cache-espressif.outputs.cache-hit }} | grep -c "true"
#then
# echo "Cache hit - skipping esp-idf install"
#else
# $(realpath -s "${{ inputs.idfpath }}")/install.sh
#fi
# seems there is a caching issue sometimes, install.sh should be fast if already installed
$(realpath -s "${{ inputs.idfpath }}")/install.sh
shell: bash