Using in CI¶
How GitHub Actions builds every app with these scripts, through the reusable workflow in hf-espidf-ci-tools.
hf-espidf-ci-tools ru-build.yml runs, for a caller that pins
@v1:
generate_matrix.py(no arguments) for the matrix;- for each entry, inside the
espressif/idf:<idf_version_docker>image,build_app.sh --project-path <project_dir> <app> <build_type> <idf_version>; - an upload of
<project_dir>/build*(thebuilds/folder) asfw-<app>-<idf>-<build type>; - on pull requests, a size table from each build's
size.infoandsize.txt.
The workflow requires generate_matrix.py, build_app.sh and config_loader.sh in the tools folder, and
installs requirements.txt when it is there.
The caller¶
jobs:
build:
uses: hardfoc/hf-espidf-ci-tools/.github/workflows/ru-build.yml@v1
permissions:
contents: read
pull-requests: write
with:
project_dir: examples/esp32
project_tools_dir: examples/esp32/scripts
Inputs, permissions and failure modes are on the ru-build page.
Keep the matrix and the build on the same file¶
The workflow runs generate_matrix.py without --project-path, so the matrix comes from
examples/esp32/app_config.yml (from the repository root) or from app_config.yml above the scripts. Keep the
project in examples/esp32 with the scripts in examples/esp32/scripts, the HardFOC layout, and both read the same
file.