mirror of
https://github.com/espressif/esp-mqtt.git
synced 2026-11-08 23:40:59 +00:00
Merge branch 'ci-path-filters' into 'master'
MR: ci: Build and test only what an MR changes See merge request espressif/esp-mqtt!354
This commit is contained in:
@@ -1,7 +1,25 @@
|
||||
# ESP-MQTT Build Test Rules
|
||||
# Consolidated manifest covering all examples and test apps
|
||||
|
||||
.mqtt_core: &mqtt_core
|
||||
depends_filepatterns:
|
||||
- "mqtt_client.c"
|
||||
- "mqtt5_client.c"
|
||||
- "include/**"
|
||||
- "lib/**"
|
||||
- "CMakeLists.txt"
|
||||
- "cmake/**"
|
||||
- "Kconfig*"
|
||||
- "idf_component.yml"
|
||||
|
||||
# idf-build-apps appends keys ending in "+"; a second depends_filepatterns would replace the list.
|
||||
.mqtt_test_apps: &mqtt_test_apps
|
||||
<<: *mqtt_core
|
||||
depends_filepatterns+:
|
||||
- "test/apps/common/**"
|
||||
|
||||
.default_rules: &default_rules
|
||||
<<: *mqtt_core
|
||||
disable:
|
||||
- if: IDF_TARGET in ["esp32h21", "esp32h4"]
|
||||
temporary: true
|
||||
@@ -73,6 +91,7 @@ examples/custom_outbox:
|
||||
reason: Advanced feature demonstration, only build
|
||||
|
||||
test/apps:
|
||||
<<: *mqtt_test_apps
|
||||
disable:
|
||||
- if: IDF_TARGET not in ["esp32"]
|
||||
reason: Test apps build only for esp32
|
||||
@@ -83,6 +102,7 @@ test/apps:
|
||||
|
||||
# C++ compatibility build test
|
||||
test/apps/build_test:
|
||||
<<: *mqtt_test_apps
|
||||
enable:
|
||||
- if: IDF_TARGET in ["esp32", "esp32c3"]
|
||||
reason: C++ compatibility build test
|
||||
@@ -93,6 +113,7 @@ test/apps/build_test:
|
||||
|
||||
# Publish/Connect integration test
|
||||
test/apps/publish_connect_test:
|
||||
<<: *mqtt_test_apps
|
||||
enable:
|
||||
- if: IDF_TARGET in ["esp32"]
|
||||
reason: Integration test for publish/connect functionality
|
||||
@@ -103,6 +124,7 @@ test/apps/publish_connect_test:
|
||||
|
||||
# MQTT conformance integration test
|
||||
test/apps/mqtt_conformance:
|
||||
<<: *mqtt_test_apps
|
||||
enable:
|
||||
- if: IDF_TARGET in ["esp32"]
|
||||
reason: Integration test for conformance scenarios
|
||||
@@ -120,6 +142,7 @@ test/apps/mqtt_conformance:
|
||||
|
||||
# Host tests (unit tests with mocks)
|
||||
test/host:
|
||||
<<: *mqtt_core
|
||||
enable:
|
||||
- if: IDF_TARGET in ["linux"]
|
||||
reason: Host-based unit tests with mocked ESP-IDF components
|
||||
|
||||
@@ -21,3 +21,57 @@ include:
|
||||
inputs:
|
||||
build-job-tags: ["brew", "build"]
|
||||
job-suffix: ":idf-v5.4"
|
||||
|
||||
.rules_skip_on_master_push: &rules_skip_on_master_push
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "schedule"
|
||||
- if: $CI_COMMIT_REF_NAME == "master" && $CI_PIPELINE_SOURCE == "push"
|
||||
when: never
|
||||
- when: on_success
|
||||
|
||||
generate_build_child_pipeline:idf-latest:
|
||||
needs:
|
||||
- job: pipeline_variables:idf-latest
|
||||
- job: baseline_manifest_sha:idf-latest
|
||||
optional: true
|
||||
- job: changed-files
|
||||
|
||||
generate_build_child_pipeline:idf-v6.1:
|
||||
needs:
|
||||
- job: pipeline_variables:idf-v6.1
|
||||
- job: baseline_manifest_sha:idf-v6.1
|
||||
optional: true
|
||||
- job: changed-files
|
||||
|
||||
generate_build_child_pipeline:idf-v6.0:
|
||||
needs:
|
||||
- job: pipeline_variables:idf-v6.0
|
||||
- job: baseline_manifest_sha:idf-v6.0
|
||||
optional: true
|
||||
- job: changed-files
|
||||
|
||||
generate_build_child_pipeline:idf-v5.5:
|
||||
needs:
|
||||
- job: pipeline_variables:idf-v5.5
|
||||
- job: baseline_manifest_sha:idf-v5.5
|
||||
optional: true
|
||||
- job: changed-files
|
||||
|
||||
generate_build_child_pipeline:idf-v5.4:
|
||||
needs:
|
||||
- job: pipeline_variables:idf-v5.4
|
||||
- job: baseline_manifest_sha:idf-v5.4
|
||||
optional: true
|
||||
- job: changed-files
|
||||
|
||||
build_child_pipeline:idf-v6.1:
|
||||
<<: *rules_skip_on_master_push
|
||||
|
||||
build_child_pipeline:idf-v6.0:
|
||||
<<: *rules_skip_on_master_push
|
||||
|
||||
build_child_pipeline:idf-v5.5:
|
||||
<<: *rules_skip_on_master_push
|
||||
|
||||
build_child_pipeline:idf-v5.4:
|
||||
<<: *rules_skip_on_master_push
|
||||
|
||||
+13
-5
@@ -26,8 +26,11 @@ docs_build:
|
||||
- build-docs -t esp32 -l en
|
||||
- build-docs -t esp32 -l zh_CN
|
||||
rules:
|
||||
- if: $CI_COMMIT_REF_NAME == "master"
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||
- if: $CI_PIPELINE_SOURCE == "schedule"
|
||||
- changes:
|
||||
- docs/**/*
|
||||
- include/**/*
|
||||
- .gitlab/ci/docs.yml
|
||||
|
||||
.deploy_docs_template:
|
||||
image: $ESP_DOCS_ENV_IMAGE
|
||||
@@ -52,9 +55,14 @@ docs_build:
|
||||
deploy_docs_preview:
|
||||
extends:
|
||||
- .deploy_docs_template
|
||||
except:
|
||||
refs:
|
||||
- master
|
||||
rules:
|
||||
- if: $CI_COMMIT_REF_NAME == "master"
|
||||
when: never
|
||||
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
|
||||
changes:
|
||||
- docs/**/*
|
||||
- include/**/*
|
||||
- .gitlab/ci/docs.yml
|
||||
needs:
|
||||
- docs_build
|
||||
variables:
|
||||
|
||||
@@ -20,6 +20,7 @@ check_pre_commit:
|
||||
extends:
|
||||
- .check_pre_commit_template
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "schedule"
|
||||
- if: '$CI_COMMIT_REF_NAME == "master" && $CI_PIPELINE_SOURCE == "push"'
|
||||
when: never
|
||||
- when: on_success
|
||||
|
||||
@@ -6,6 +6,27 @@ host_tests:
|
||||
variables:
|
||||
GIT_DEPTH: 1
|
||||
needs: []
|
||||
rules:
|
||||
- if: $CI_PIPELINE_SOURCE == "schedule"
|
||||
- if: '$CI_MERGE_REQUEST_LABELS =~ /(?:^|,)BUILD_AND_TEST_ALL_APPS(?:,|$)/'
|
||||
- changes:
|
||||
- mqtt_client.c
|
||||
- mqtt5_client.c
|
||||
- include/**/*
|
||||
- lib/**/*
|
||||
- CMakeLists.txt
|
||||
- cmake/**/*
|
||||
- Kconfig*
|
||||
- idf_component.yml
|
||||
- test/host/**/*
|
||||
- test/mqtt_utils_host_test/**/*
|
||||
- test/mqtt_outbox_host_test/**/*
|
||||
- test/mqtt_msg_host_test/**/*
|
||||
- .gitlab-ci.yml
|
||||
- .gitlab/ci/test.yml
|
||||
- .idf_ci.toml
|
||||
- .idf_build_apps.toml
|
||||
- .build-test-rules.yml
|
||||
coverage: '/^lines:\s+(\d+\.\d+)\%/'
|
||||
artifacts:
|
||||
paths:
|
||||
|
||||
@@ -16,3 +16,13 @@ collect_app_info_filename = "[email protected]"
|
||||
check_manifest_rules = true
|
||||
manifest_filepatterns = ['**/.build-test-rules.yml']
|
||||
ignore_warning_files = ['.gitlab/ci/ignore_build_warnings.txt']
|
||||
|
||||
# Rebuild everything when CI/config that controls selection changes.
|
||||
deactivate_dependency_driven_build_by_filepatterns = [
|
||||
'.gitlab-ci.yml',
|
||||
'.gitlab/ci/**',
|
||||
'.idf_ci.toml',
|
||||
'.idf_build_apps.toml',
|
||||
'.build-test-rules.yml',
|
||||
'conftest.py',
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user