Skip to content

Commit

Permalink
ci: Enable esp32c6 example, test_apps, and unit tests CI build stage
Browse files Browse the repository at this point in the history
  • Loading branch information
songruo committed Nov 1, 2022
1 parent 0b47e17 commit 2557e24
Show file tree
Hide file tree
Showing 157 changed files with 822 additions and 293 deletions.
48 changes: 48 additions & 0 deletions .gitlab/ci/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,14 @@ build_pytest_components_esp32h2:
IDF_TARGET: esp32h2
TEST_DIR: components

build_pytest_examples_esp32c6:
extends:
- .build_pytest_template
- .rules:build:example_test-esp32c6
variables:
IDF_TARGET: esp32c6
TEST_DIR: examples

build_pytest_components_esp32:
extends:
- .build_pytest_template
Expand Down Expand Up @@ -215,6 +223,14 @@ build_pytest_components_esp32c2:
IDF_TARGET: esp32c2
TEST_DIR: components

build_pytest_components_esp32c6:
extends:
- .build_pytest_template
- .rules:build:component_ut-esp32c6
variables:
IDF_TARGET: esp32c6
TEST_DIR: components

build_non_test_components_apps:
extends:
- .build_cmake_template
Expand Down Expand Up @@ -293,6 +309,14 @@ build_pytest_test_apps_esp32c2:
IDF_TARGET: esp32c2
TEST_DIR: tools/test_apps

build_pytest_test_apps_esp32c6:
extends:
- .build_pytest_test_apps_template
- .rules:build:custom_test-esp32c6
variables:
IDF_TARGET: esp32c6
TEST_DIR: tools/test_apps

.build_template_app_template:
extends:
- .build_template
Expand Down Expand Up @@ -450,6 +474,13 @@ build_esp_idf_tests_cmake_esp32c3:
variables:
IDF_TARGET: esp32c3

build_esp_idf_tests_cmake_esp32c6:
extends:
- .build_esp_idf_tests_cmake_template
- .rules:build:unit_test-esp32c6
variables:
IDF_TARGET: esp32c6

build_examples_cmake_esp32:
extends:
- .build_cmake_template
Expand Down Expand Up @@ -503,6 +534,15 @@ build_examples_cmake_esp32h2:
IDF_TARGET: esp32h2
TEST_DIR: examples

build_examples_cmake_esp32c6:
extends:
- .build_cmake_template
- .rules:build:example_test-esp32c6
parallel: 2
variables:
IDF_TARGET: esp32c6
TEST_DIR: examples

build_test_apps_esp32:
extends:
- .build_cmake_template
Expand Down Expand Up @@ -547,6 +587,14 @@ build_test_apps_esp32c2:
IDF_TARGET: esp32c2
TEST_DIR: tools/test_apps

build_test_apps_esp32c6:
extends:
- .build_cmake_template
- .rules:build:custom_test-esp32c6
variables:
IDF_TARGET: esp32c6
TEST_DIR: tools/test_apps

.test_build_system_template:
stage: host_test
extends:
Expand Down
13 changes: 5 additions & 8 deletions .gitlab/ci/default-build-test-rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,11 @@
# suppress the check_build_test_rules check-test-script warnings for the specified targets
#
# This file should ONLY be used during bringup. Should be reset to empty after the bringup process
#
# Take esp32c6 as an example:
#
#extra_default_build_targets:
# - esp32c6
#
#bypass_check_test_targets:
# - esp32c6
extra_default_build_targets:
- esp32c6

bypass_check_test_targets:
- esp32c6
#
# These lines would
# - enable the README.md check for esp32c6. Don't forget to add the build jobs in .gitlab/ci/build.yml
Expand Down
1 change: 1 addition & 0 deletions .gitlab/ci/dependencies/dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
- esp32c3
- esp32h2
- esp32c2
- esp32c6

.target_test: &target_test
- example_test
Expand Down
119 changes: 119 additions & 0 deletions .gitlab/ci/rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -386,6 +386,9 @@
.if-label-component_ut_esp32c3: &if-label-component_ut_esp32c3
if: '$BOT_LABEL_COMPONENT_UT_ESP32C3 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*component_ut_esp32c3(?:,[^,\n\r]+)*$/i'

.if-label-component_ut_esp32c6: &if-label-component_ut_esp32c6
if: '$BOT_LABEL_COMPONENT_UT_ESP32C6 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*component_ut_esp32c6(?:,[^,\n\r]+)*$/i'

.if-label-component_ut_esp32h2: &if-label-component_ut_esp32h2
if: '$BOT_LABEL_COMPONENT_UT_ESP32H2 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*component_ut_esp32h2(?:,[^,\n\r]+)*$/i'

Expand All @@ -407,6 +410,9 @@
.if-label-custom_test_esp32c3: &if-label-custom_test_esp32c3
if: '$BOT_LABEL_CUSTOM_TEST_ESP32C3 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*custom_test_esp32c3(?:,[^,\n\r]+)*$/i'

.if-label-custom_test_esp32c6: &if-label-custom_test_esp32c6
if: '$BOT_LABEL_CUSTOM_TEST_ESP32C6 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*custom_test_esp32c6(?:,[^,\n\r]+)*$/i'

.if-label-custom_test_esp32h2: &if-label-custom_test_esp32h2
if: '$BOT_LABEL_CUSTOM_TEST_ESP32H2 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*custom_test_esp32h2(?:,[^,\n\r]+)*$/i'

Expand All @@ -431,6 +437,9 @@
.if-label-example_test_esp32c3: &if-label-example_test_esp32c3
if: '$BOT_LABEL_EXAMPLE_TEST_ESP32C3 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*example_test_esp32c3(?:,[^,\n\r]+)*$/i'

.if-label-example_test_esp32c6: &if-label-example_test_esp32c6
if: '$BOT_LABEL_EXAMPLE_TEST_ESP32C6 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*example_test_esp32c6(?:,[^,\n\r]+)*$/i'

.if-label-example_test_esp32h2: &if-label-example_test_esp32h2
if: '$BOT_LABEL_EXAMPLE_TEST_ESP32H2 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*example_test_esp32h2(?:,[^,\n\r]+)*$/i'

Expand Down Expand Up @@ -482,6 +491,9 @@
.if-label-unit_test_esp32c3: &if-label-unit_test_esp32c3
if: '$BOT_LABEL_UNIT_TEST_ESP32C3 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*unit_test_esp32c3(?:,[^,\n\r]+)*$/i'

.if-label-unit_test_esp32c6: &if-label-unit_test_esp32c6
if: '$BOT_LABEL_UNIT_TEST_ESP32C6 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*unit_test_esp32c6(?:,[^,\n\r]+)*$/i'

.if-label-unit_test_esp32h2: &if-label-unit_test_esp32h2
if: '$BOT_LABEL_UNIT_TEST_ESP32H2 || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*unit_test_esp32h2(?:,[^,\n\r]+)*$/i'

Expand Down Expand Up @@ -520,6 +532,7 @@
- <<: *if-label-component_ut_esp32
- <<: *if-label-component_ut_esp32c2
- <<: *if-label-component_ut_esp32c3
- <<: *if-label-component_ut_esp32c6
- <<: *if-label-component_ut_esp32h2
- <<: *if-label-component_ut_esp32s2
- <<: *if-label-component_ut_esp32s3
Expand All @@ -529,6 +542,7 @@
- <<: *if-label-unit_test_esp32
- <<: *if-label-unit_test_esp32c2
- <<: *if-label-unit_test_esp32c3
- <<: *if-label-unit_test_esp32c6
- <<: *if-label-unit_test_esp32h2
- <<: *if-label-unit_test_esp32s2
- <<: *if-label-unit_test_esp32s3
Expand Down Expand Up @@ -615,6 +629,30 @@
- <<: *if-dev-push
changes: *patterns-target_test-i154

.rules:build:component_ut-esp32c6:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build
- <<: *if-label-component_ut
- <<: *if-label-component_ut_esp32c6
- <<: *if-label-target_test
- <<: *if-label-unit_test
- <<: *if-label-unit_test_esp32c6
- <<: *if-dev-push
changes: *patterns-build_components
- <<: *if-dev-push
changes: *patterns-build_system
- <<: *if-dev-push
changes: *patterns-component_ut
- <<: *if-dev-push
changes: *patterns-component_ut-adc
- <<: *if-dev-push
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-i154

.rules:build:component_ut-esp32h2:
rules:
- <<: *if-revert-branch
Expand Down Expand Up @@ -697,6 +735,7 @@
- <<: *if-label-custom_test_esp32
- <<: *if-label-custom_test_esp32c2
- <<: *if-label-custom_test_esp32c3
- <<: *if-label-custom_test_esp32c6
- <<: *if-label-custom_test_esp32h2
- <<: *if-label-custom_test_esp32s2
- <<: *if-label-custom_test_esp32s3
Expand Down Expand Up @@ -772,6 +811,26 @@
- <<: *if-dev-push
changes: *patterns-target_test-i154

.rules:build:custom_test-esp32c6:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build
- <<: *if-label-custom_test
- <<: *if-label-custom_test_esp32c6
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-build_components
- <<: *if-dev-push
changes: *patterns-build_system
- <<: *if-dev-push
changes: *patterns-custom_test
- <<: *if-dev-push
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-i154

.rules:build:custom_test-esp32s2:
rules:
- <<: *if-revert-branch
Expand Down Expand Up @@ -839,6 +898,7 @@
- <<: *if-label-example_test_esp32
- <<: *if-label-example_test_esp32c2
- <<: *if-label-example_test_esp32c3
- <<: *if-label-example_test_esp32c6
- <<: *if-label-example_test_esp32h2
- <<: *if-label-example_test_esp32s2
- <<: *if-label-example_test_esp32s3
Expand Down Expand Up @@ -954,6 +1014,36 @@
- <<: *if-dev-push
changes: *patterns-target_test-i154

.rules:build:example_test-esp32c6:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build
- <<: *if-label-example_test
- <<: *if-label-example_test_esp32c6
- <<: *if-label-target_test
- <<: *if-dev-push
changes: *patterns-build-example_test
- <<: *if-dev-push
changes: *patterns-build_components
- <<: *if-dev-push
changes: *patterns-build_system
- <<: *if-dev-push
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-example_test
- <<: *if-dev-push
changes: *patterns-example_test-bt
- <<: *if-dev-push
changes: *patterns-example_test-ethernet
- <<: *if-dev-push
changes: *patterns-example_test-usb
- <<: *if-dev-push
changes: *patterns-example_test-wifi
- <<: *if-dev-push
changes: *patterns-target_test-i154

.rules:build:example_test-esp32h2:
rules:
- <<: *if-revert-branch
Expand Down Expand Up @@ -1083,20 +1173,23 @@
- <<: *if-label-component_ut_esp32
- <<: *if-label-component_ut_esp32c2
- <<: *if-label-component_ut_esp32c3
- <<: *if-label-component_ut_esp32c6
- <<: *if-label-component_ut_esp32h2
- <<: *if-label-component_ut_esp32s2
- <<: *if-label-component_ut_esp32s3
- <<: *if-label-custom_test
- <<: *if-label-custom_test_esp32
- <<: *if-label-custom_test_esp32c2
- <<: *if-label-custom_test_esp32c3
- <<: *if-label-custom_test_esp32c6
- <<: *if-label-custom_test_esp32h2
- <<: *if-label-custom_test_esp32s2
- <<: *if-label-custom_test_esp32s3
- <<: *if-label-example_test
- <<: *if-label-example_test_esp32
- <<: *if-label-example_test_esp32c2
- <<: *if-label-example_test_esp32c3
- <<: *if-label-example_test_esp32c6
- <<: *if-label-example_test_esp32h2
- <<: *if-label-example_test_esp32s2
- <<: *if-label-example_test_esp32s3
Expand All @@ -1108,6 +1201,7 @@
- <<: *if-label-unit_test_esp32
- <<: *if-label-unit_test_esp32c2
- <<: *if-label-unit_test_esp32c3
- <<: *if-label-unit_test_esp32c6
- <<: *if-label-unit_test_esp32h2
- <<: *if-label-unit_test_esp32s2
- <<: *if-label-unit_test_esp32s3
Expand Down Expand Up @@ -1159,6 +1253,7 @@
- <<: *if-label-unit_test_esp32
- <<: *if-label-unit_test_esp32c2
- <<: *if-label-unit_test_esp32c3
- <<: *if-label-unit_test_esp32c6
- <<: *if-label-unit_test_esp32h2
- <<: *if-label-unit_test_esp32s2
- <<: *if-label-unit_test_esp32s3
Expand Down Expand Up @@ -1248,6 +1343,30 @@
- <<: *if-dev-push
changes: *patterns-unit_test-spi_multi

.rules:build:unit_test-esp32c6:
rules:
- <<: *if-revert-branch
when: never
- <<: *if-protected
- <<: *if-label-build
- <<: *if-label-target_test
- <<: *if-label-unit_test
- <<: *if-label-unit_test_esp32c6
- <<: *if-dev-push
changes: *patterns-build_components
- <<: *if-dev-push
changes: *patterns-build_system
- <<: *if-dev-push
changes: *patterns-downloadable-tools
- <<: *if-dev-push
changes: *patterns-target_test-i154
- <<: *if-dev-push
changes: *patterns-unit_test
- <<: *if-dev-push
changes: *patterns-unit_test-sdio
- <<: *if-dev-push
changes: *patterns-unit_test-spi_multi

.rules:build:unit_test-esp32s2:
rules:
- <<: *if-revert-branch
Expand Down
7 changes: 7 additions & 0 deletions components/app_update/.build-test-rules.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Documentation: .gitlab/ci/README.md#manifest-file-to-control-the-buildtest-apps

components/app_update/test_apps:
disable:
- if: IDF_TARGET == "esp32c6"
temporary: false
reason: target esp32c6 is not supported yet
9 changes: 9 additions & 0 deletions components/driver/.build-test-rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,22 @@ components/driver/test_apps/i2s_test_apps/legacy_i2s_adc_dac:
disable:
- if: SOC_I2S_SUPPORTS_ADC_DAC != 1

components/driver/test_apps/legacy_adc_driver:
disable:
- if: IDF_TARGET == "esp32c6"
temporary: true
reason: target esp32c6 is not supported yet

components/driver/test_apps/legacy_mcpwm_driver:
disable:
- if: SOC_MCPWM_SUPPORTED != 1

components/driver/test_apps/legacy_pcnt_driver:
disable:
- if: SOC_PCNT_SUPPORTED != 1
- if: IDF_TARGET == "esp32c6"
temporary: true
reason: test depends on ledc to be supported on esp32c6

components/driver/test_apps/legacy_rmt_driver:
disable:
Expand Down
2 changes: 2 additions & 0 deletions components/driver/test/test_common_spi.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
#include "esp_rom_gpio.h"


#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32C6)
int test_freq_default[]=TEST_FREQ_DEFAULT();

const char MASTER_TAG[] = "test_master";
Expand Down Expand Up @@ -249,3 +250,4 @@ void get_tx_buffer(uint32_t seed, uint8_t *master_send_buf, uint8_t *slave_send_
master_send_buf[i] = rand() % 256;
}
}
#endif //!TEMPORARY_DISABLED_FOR_TARGETS(ESP32C6)
Loading

0 comments on commit 2557e24

Please sign in to comment.