Files
esp-mqtt/.idf_ci.toml
Euripedes Rocha Filho 37a2e555c5 feat: add mqtt conformance test app
Adds a conformance test app based on paho test suite.
This introduce the basis infrastructure and initial tests.
2026-04-16 09:11:08 +02:00

59 lines
1.7 KiB
TOML

# ESP-MQTT idf-ci Configuration
[gitlab.artifacts.native]
build_job_filepatterns = [
"**/build*/partition_table/*.bin",
"**/build*/bootloader/*.bin",
"**/build*/config/sdkconfig.json",
"**/build*/*.bin",
"**/build*/flasher_args.json",
"**/build.log",
]
test_job_filepatterns = ["**/test_logs", "**/XUNIT_RESULT_*.xml"]
[gitlab.build_pipeline]
job_template_jinja = """
{{ settings.gitlab.build_pipeline.job_template_name }}:
stage: "{{ settings.gitlab.build_pipeline.job_stage }}"
tags: {{ settings.gitlab.build_pipeline.job_tags }}
image: "{{ settings.gitlab.build_pipeline.job_image }}"
timeout: "1h"
artifacts:
paths:
{%- for path in settings.gitlab.artifacts.native.build_job_filepatterns %}
- "{{ path }}"
{%- endfor %}
expire_in: "1 week"
when: "always"
before_script:
- pip install -U 'idf-ci>=1,<2'
script: |
set -euo pipefail
ORIG_DIR="${CI_PROJECT_DIR:-$(pwd)}"
cd "${ORIG_DIR}"
echo "Original dir: $(pwd)"
rm -rf mqtt
git worktree add --force mqtt HEAD || (echo "Worktree failed; using local clone" && git clone --local --no-hardlinks . mqtt)
git worktree list || true
cd mqtt
echo "Build dir: $(pwd)"
idf-ci build run --parallel-count ${CI_NODE_TOTAL:-1} --parallel-index ${CI_NODE_INDEX:-1}
cd "${ORIG_DIR}"
echo "Moving build* dirs back to repo root..."
find mqtt -type d -name 'build_esp32_*' -print0 | while IFS= read -r -d '' d; do \
rel="${d#mqtt/}"; \
dest="${rel}"; \
mkdir -p "$(dirname "${dest}")"; \
rm -rf "${dest}"; \
mv "$d" "${dest}"; \
done
git worktree remove -f mqtt || rm -rf mqtt
"""
runs_per_job = 15
[gitlab.test_pipeline]
pre_yaml_jinja = """
variables:
GIT_SUBMODULE_STRATEGY: recursive
"""