.build_template: &build_template
  stage: build
  tags:
    - build
  image: ${IMAGE}
  variables:
    # Enable ccache for all build jobs. See configure_ci_environment.sh for more ccache related settings.
    IDF_CCACHE_ENABLE: "1"
    BATCH_BUILD: "1"
    V: "0"
    WARNING_STR: ""

.build_examples_template: &build_examples_template
  <<: *build_template
  artifacts:
    when: always
    paths:
      - "**/build*/size.json"
      - "**/build*/build_log.txt"
      - "**/build*/*.bin"
      # upload to s3 server to save the artifacts size
      - "**/build*/*.map"
      - "**/build*/*.elf"
      - "**/build*/flasher_args.json"
      - "**/build*/flash_args"
      - "**/build*/flash_project_args"
      - "**/build*/config/sdkconfig.json"
      - "**/build*/bootloader/*.bin"
      - "**/build*/bootloader/*.elf"
      - "**/build*/partition_table/*.bin"
      - "**/build*/mmap_build/**/*.bin"
      - "**/build*/**/*.bin"
      - size_info.txt
    expire_in: 1 week
  variables:
    IDF_CI_BUILD: "1"
    # By configuring this macro, you can append the compiled configuration file.
    # For example, using "sdkconf.etc=default" specifies the default sdkconfig file.
    EXAMPLE_CONFIG: "="
  script:
    - pip install idf-component-manager
    - pip install idf_build_apps
    - python tools/build_apps.py ${EXAMPLE_DIR} --config ${EXAMPLE_CONFIG} -t all -vv

.build_idf_active_release_version:
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.2
      - IMAGE: espressif/idf:release-v5.3
      - IMAGE: espressif/idf:release-v5.4

.build_idf_version_greater_equal_v5_0:
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.2
      - IMAGE: espressif/idf:release-v5.3
      - IMAGE: espressif/idf:release-v5.4

build_example_ai_esp_dl_human_activity_recognition:
  extends:
    - .build_examples_template
    - .rules:build:example_ai_esp_dl_human_activity_recognition
  variables:
    IMAGE: espressif/idf:release-v5.3
    EXAMPLE_DIR: examples/ai/esp_dl/human_activity_recognition

build_example_ai_esp_dl_touchpad_digit_recognition:
  extends:
    - .build_examples_template
    - .rules:build:example_ai_esp_dl_touchpad_digit_recognition
  variables:
    IMAGE: espressif/idf:release-v5.3
    EXAMPLE_DIR: examples/ai/esp_dl/touchpad_digit_recognition

build_example_audio_wav_player:
  extends:
    - .build_examples_template
    - .rules:build:example_audio_wav_player
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: examples/audio/wav_player

build_example_bluetooth_ble_conn_mgr_ble_periodic_adv:
  extends:
    - .build_examples_template
    - .rules:build:example_bluetooth_ble_conn_mgr
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.2
  variables:
    EXAMPLE_DIR: examples/bluetooth/ble_conn_mgr/ble_periodic_adv

build_example_bluetooth_ble_conn_mgr_ble_periodic_sync:
  extends:
    - .build_examples_template
    - .rules:build:example_bluetooth_ble_conn_mgr
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.2
  variables:
    EXAMPLE_DIR: examples/bluetooth/ble_conn_mgr/ble_periodic_sync

build_example_bluetooth_ble_conn_mgr_ble_spp_client:
  extends:
    - .build_examples_template
    - .rules:build:example_bluetooth_ble_conn_mgr
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.2
  variables:
    EXAMPLE_DIR: examples/bluetooth/ble_conn_mgr/ble_spp/spp_client

build_example_bluetooth_ble_conn_mgr_ble_spp_server:
  extends:
    - .build_examples_template
    - .rules:build:example_bluetooth_ble_conn_mgr
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.2
  variables:
    EXAMPLE_DIR: examples/bluetooth/ble_conn_mgr/ble_spp/spp_server

build_example_bluetooth_ble_anp:
  extends:
    - .build_examples_template
    - .rules:build:example_bluetooth_ble_anp
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.2
  variables:
    EXAMPLE_DIR: examples/bluetooth/ble_profiles/ble_anp

build_example_bluetooth_ble_hrp:
  extends:
    - .build_examples_template
    - .rules:build:example_bluetooth_ble_hrp
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.2
  variables:
    EXAMPLE_DIR: examples/bluetooth/ble_profiles/ble_hrp

build_example_bluetooth_ble_htp:
  extends:
    - .build_examples_template
    - .rules:build:example_bluetooth_ble_htp
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.2
  variables:
    EXAMPLE_DIR: examples/bluetooth/ble_profiles/ble_htp

build_example_bluetooth_ble_services_ble_ans:
  extends:
    - .build_examples_template
    - .rules:build:example_bluetooth_ble_services
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.2
  variables:
    EXAMPLE_DIR: examples/bluetooth/ble_services/ble_ans

build_example_bluetooth_ble_services_ble_bas:
  extends:
    - .build_examples_template
    - .rules:build:example_bluetooth_ble_services
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.2
  variables:
    EXAMPLE_DIR: examples/bluetooth/ble_services/ble_bas

build_example_bluetooth_ble_services_ble_bcs:
  extends:
    - .build_examples_template
    - .rules:build:example_bluetooth_ble_services
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.2
  variables:
    EXAMPLE_DIR: examples/bluetooth/ble_services/ble_bcs

build_example_bluetooth_ble_services_ble_cts:
  extends:
    - .build_examples_template
    - .rules:build:example_bluetooth_ble_services
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.2
  variables:
    EXAMPLE_DIR: examples/bluetooth/ble_services/ble_cts

build_example_bluetooth_ble_services_ble_dis:
  extends:
    - .build_examples_template
    - .rules:build:example_bluetooth_ble_services
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.2
  variables:
    EXAMPLE_DIR: examples/bluetooth/ble_services/ble_dis

build_example_bluetooth_ble_services_ble_hrs:
  extends:
    - .build_examples_template
    - .rules:build:example_bluetooth_ble_services
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.2
  variables:
    EXAMPLE_DIR: examples/bluetooth/ble_services/ble_hrs

build_example_bluetooth_ble_services_ble_hts:
  extends:
    - .build_examples_template
    - .rules:build:example_bluetooth_ble_services
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.2
  variables:
    EXAMPLE_DIR: examples/bluetooth/ble_services/ble_hts

build_example_bluetooth_ble_services_ble_tps:
  extends:
    - .build_examples_template
    - .rules:build:example_bluetooth_ble_services
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.2
  variables:
    EXAMPLE_DIR: examples/bluetooth/ble_services/ble_tps

build_example_bluetooth_ble_services_ble_uds:
  extends:
    - .build_examples_template
    - .rules:build:example_bluetooth_ble_services
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.2
  variables:
    EXAMPLE_DIR: examples/bluetooth/ble_services/ble_uds

build_example_bluetooth_ble_services_ble_wss:
  extends:
    - .build_examples_template
    - .rules:build:example_bluetooth_ble_services
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.2
  variables:
    EXAMPLE_DIR: examples/bluetooth/ble_services/ble_wss

build_example_bluetooth_ble_ota:
  extends:
    - .build_examples_template
    - .rules:build:example_bluetooth_ble_ota
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.2
  variables:
    EXAMPLE_DIR: examples/bluetooth/ble_ota

build_example_bluetooth_ble_remote_control:
  extends:
    - .build_examples_template
    - .rules:build:example_bluetooth_ble_remote_control
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v5.2
  variables:
    EXAMPLE_DIR: examples/bluetooth/ble_remote_control

build_example_camera_basic:
  extends:
    - .build_examples_template
    - .rules:build:example_camera_basic
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: examples/camera/basic

build_example_camera_pic_server:
  extends:
    - .build_examples_template
    - .rules:build:example_camera_pic_server
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: examples/camera/pic_server

build_example_camera_test_framerate:
  extends:
    - .build_examples_template
    - .rules:build:example_camera_test_framerate
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: examples/camera/test_framerate

build_example_camera_video_recorder:
  extends:
    - .build_examples_template
    - .rules:build:example_camera_video_recorder
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: examples/camera/video_recorder

build_example_camera_video_stream_server:
  extends:
    - .build_examples_template
    - .rules:build:example_camera_video_stream_server
  variables:
    EXAMPLE_DIR: examples/camera/video_stream_server
    IMAGE: espressif/idf:release-v4.4

build_example_check_pedestrian_flow:
  extends:
    - .build_examples_template
    - .rules:build:example_check_pedestrian_flow
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
  variables:
    EXAMPLE_DIR: examples/check_pedestrian_flow

build_example_display_lcd_lcd_layer_blending:
  extends:
    - .build_examples_template
    - .rules:build:example_display_lcd_lcd_layer_blending
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.4
  variables:
    EXAMPLE_DIR: examples/display/lcd/lcd_layer_blending

build_example_display_lcd_lcd_with_te:
  extends:
    - .build_examples_template
    - .rules:build:example_display_lcd_lcd_with_te
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.1
  variables:
    EXAMPLE_DIR: examples/display/lcd/lcd_with_te

build_example_display_lcd_mipi_dsi_avoid_tearing:
  extends:
    - .build_examples_template
    - .rules:build:example_display_lcd_mipi_dsi_avoid_tearing
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.4
  variables:
    EXAMPLE_DIR: examples/display/lcd/mipi_dsi_avoid_tearing

build_example_display_lcd_qspi_with_ram:
  extends:
    - .build_examples_template
    - .rules:build:example_display_lcd_qspi_with_ram
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.1
  variables:
    EXAMPLE_DIR: examples/display/lcd/qspi_with_ram

build_example_display_lcd_qspi_without_ram:
  extends:
    - .build_examples_template
    - .rules:build:example_display_lcd_qspi_without_ram
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.3
  variables:
    EXAMPLE_DIR: examples/display/lcd/qspi_without_ram

build_example_display_lcd_rgb_lcd_8bit:
  extends:
    - .build_examples_template
    - .rules:build:example_display_lcd_rgb_lcd_8bit
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.3
  variables:
    EXAMPLE_DIR: examples/display/lcd/rgb_lcd_8bit

build_example_display_lcd_rgb_avoid_tearing:
  extends:
    - .build_examples_template
    - .rules:build:example_display_lcd_rgb_avoid_tearing
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.3
  variables:
    EXAMPLE_DIR: examples/display/lcd/rgb_avoid_tearing

build_example_extended_vfs_gpio_gpio_simple:
  extends:
    - .build_examples_template
    - .rules:build:example_extended_vfs_gpio_gpio_simple
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: examples/extended_vfs/gpio/gpio_simple

build_example_extended_vfs_i2c_i2c_bh1750:
  extends:
    - .build_examples_template
    - .rules:build:example_extended_vfs_i2c_i2c_bh1750
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: examples/extended_vfs/i2c/i2c_bh1750

build_example_extended_vfs_i2c_i2c_tt21100:
  extends:
    - .build_examples_template
    - .rules:build:example_extended_vfs_i2c_i2c_tt21100
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: examples/extended_vfs/i2c/i2c_tt21100

build_example_extended_vfs_ledc_ledc_simple:
  extends:
    - .build_examples_template
    - .rules:build:example_extended_vfs_ledc_ledc_simple
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: examples/extended_vfs/ledc/ledc_simple

build_example_extended_vfs_spi_spi_master_simple:
  extends:
    - .build_examples_template
    - .rules:build:example_extended_vfs_spi_spi_master_simple
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: examples/extended_vfs/spi/spi_master_simple

build_example_extended_vfs_spi_spi_slave_simple:
  extends:
    - .build_examples_template
    - .rules:build:example_extended_vfs_spi_spi_slave_simple
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: examples/extended_vfs/spi/spi_slave_simple

build_example_get_started_blink:
  extends:
    - .build_examples_template
    - .rules:build:example_get_started_blink
  variables:
    EXAMPLE_DIR: examples/get-started/blink
    IMAGE: espressif/idf:release-v4.4

build_example_get_started_button_power_save:
  extends:
    - .build_examples_template
    - .rules:build:example_get_started_button_power_save
    - .build_idf_active_release_version
  variables:
    EXAMPLE_DIR: examples/get-started/button_power_save

build_example_get_started_knob_power_save:
  extends:
    - .build_examples_template
    - .rules:build:example_get_started_knob_power_save
    - .build_idf_active_release_version
  variables:
    EXAMPLE_DIR: examples/get-started/knob_power_save

build_example_sensors_power_measure:
  extends:
    - .build_examples_template
    - .rules:build:example_sensors_power_measure
    - .build_idf_active_release_version
  variables:
    EXAMPLE_DIR: examples/sensors/power_measure

build_example_gprof_gprof_simple:
  extends:
    - .build_examples_template
    - .rules:build:example_gprof_gprof_simple
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: examples/gprof/gprof_simple

build_example_indicator:
  extends:
    - .build_examples_template
    - .rules:build:example_indicator
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v4.4
  variables:
    EXAMPLE_DIR: examples/indicator

build_example_keyboard:
  extends:
    - .build_examples_template
    - .rules:build:example_keyboard
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.2
      - IMAGE: espressif/idf:release-v5.3
  variables:
    EXAMPLE_DIR: examples/keyboard

build_example_lighting_lightbulb:
  extends:
    - .build_examples_template
    - .rules:build:example_lighting_lightbulb
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.2
      - IMAGE: espressif/idf:release-v5.3
      - IMAGE: espressif/idf:release-v5.4
  variables:
    EXAMPLE_DIR: examples/lighting/lightbulb

build_example_lvgl_freetype:
  extends:
    - .build_examples_template
    - .rules:build:example_lvgl_freetype
  parallel:
    matrix:
        - IMAGE: espressif/idf:release-v5.1
  variables:
    EXAMPLE_TARGET: esp32s3
    EXAMPLE_DIR: examples/hmi/lvgl_freetype

build_example_motor_bldc_fan_rainmaker:
  extends:
    - .build_examples_template
    - .rules:build:example_motor_bldc_fan_rainmaker
  variables:
    EXAMPLE_DIR: examples/motor/bldc_fan/rainmaker
    IMAGE: espressif/idf:release-v5.0

build_example_motor_drv10987:
  extends:
    - .build_examples_template
    - .rules:build:example_motor_drv10987
    - .build_idf_version_greater_equal_v5_0
  variables:
    EXAMPLE_DIR: examples/motor/drv10987

build_example_motor_foc_openloop_control:
  extends:
    - .build_examples_template
    - .rules:build:example_motor_foc_openloop_control
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: examples/motor/foc_openloop_control

build_example_motor_foc_velocity_control:
  extends:
    - .build_examples_template
    - .rules:build:example_motor_foc_velocity_control
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: examples/motor/foc_velocity_control

build_example_motor_foc_knob:
  extends:
    - .build_examples_template
    - .rules:build:example_motor_foc_knob
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: examples/motor/foc_knob_example

build_example_motor_servo_control:
  extends:
    - .build_examples_template
    - .rules:build:example_motor_servo_control
    - .build_idf_active_release_version
  variables:
    EXAMPLE_DIR: components/motor/servo/examples/servo_control

build_example_ota_simple_ota_example:
  extends:
    - .build_examples_template
    - .rules:build:example_ota_simple_ota_example
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v5.1
  variables:
    EXAMPLE_DIR: examples/ota/simple_ota_example
    WARNING_STR: "1/2 app partitions are too small"

build_example_perf_benchmark:
  extends:
    - .build_examples_template
    - .rules:build:example_perf_benchmark
  parallel:
    matrix:
        - IMAGE: espressif/idf:release-v5.3
  variables:
    EXAMPLE_DIR: examples/hmi/perf_benchmark

build_example_screen:
  extends:
    - .build_examples_template
    - .rules:build:example_screen
  variables:
    EXAMPLE_DIR: examples/screen
    IMAGE: espressif/idf:release-v4.4

build_example_sensors_sensor_control_led:
  extends:
    - .build_examples_template
    - .rules:build:example_sensors_sensor_control_led
  variables:
    EXAMPLE_DIR: examples/sensors/sensor_control_led
    IMAGE: espressif/idf:release-v4.4

build_example_sensors_sensor_hub_monitor:
  extends:
    - .build_examples_template
    - .rules:build:example_sensors_sensor_hub_monitor
    - .build_idf_active_release_version
  variables:
    EXAMPLE_DIR: examples/sensors/sensor_hub_monitor

build_example_touch_button:
  extends:
    - .build_examples_template
    - .rules:build:example_touch_touch_button
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.4
  variables:
    EXAMPLE_DIR: examples/touch/touch_button

build_example_touch_button_sensor:
  extends:
    - .build_examples_template
    - .rules:build:example_touch_touch_button_sensor
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.4
  variables:
    EXAMPLE_DIR: examples/touch/touch_button_sensor

build_example_touch_slider_sensor:
  extends:
    - .build_examples_template
    - .rules:build:example_touch_touch_slider_sensor
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.4
  variables:
    EXAMPLE_DIR: examples/touch/touch_slider_sensor

build_example_touch_touch_proximity:
  extends:
    - .build_examples_template
    - .rules:build:example_touch_touch_proximity
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.3
  variables:
    EXAMPLE_DIR: examples/touch/touch_proximity

build_example_ulp_lp_cpu_lp_environment_sensor:
  extends:
    - .build_examples_template
    - .rules:build:example_ulp_lp_cpu_lp_environment_sensor
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.2
  variables:
    EXAMPLE_DIR: examples/ulp/lp_cpu/lp_environment_sensor

build_example_usb_device_bootloader_uf2:
  extends:
    - .build_examples_template
    - .rules:build:example_usb_device_bootloader_uf2
    - .build_idf_version_greater_equal_v5_0
  variables:
    EXAMPLE_DIR: examples/usb/device/bootloader_uf2

build_example_usb_device_usb_dongle:
  extends:
    - .build_examples_template
    - .rules:build:example_usb_device_usb_dongle
    - .build_idf_version_greater_equal_v5_0
  variables:
    EXAMPLE_DIR: examples/usb/device/usb_dongle

build_example_usb_device_usb_uart_bridge:
  extends:
    - .build_examples_template
    - .rules:build:example_usb_device_usb_uart_bridge
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: examples/usb/device/usb_uart_bridge

build_example_usb_device_usb_uac:
  extends:
    - .build_examples_template
    - .rules:build:example_usb_device_usb_uac
    - .build_idf_version_greater_equal_v5_0
  variables:
    EXAMPLE_DIR: examples/usb/device/usb_uac

build_example_usb_device_usb_dual_uvc_device:
  extends:
    - .build_examples_template
    - .rules:build:example_usb_device_usb_dual_uvc_device
    - .build_idf_version_greater_equal_v5_0
  variables:
    EXAMPLE_DIR: examples/usb/device/usb_dual_uvc_device

build_example_usb_device_usb_extend_screen:
  extends:
    - .build_examples_template
    - .rules:build:example_usb_device_usb_extend_screen
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.3
      - IMAGE: espressif/idf:release-v5.4
  variables:
    EXAMPLE_DIR: examples/usb/device/usb_extend_screen

build_example_usb_device_usb_webcam:
  extends:
    - .build_examples_template
    - .rules:build:example_usb_device_usb_webcam
    - .build_idf_version_greater_equal_v5_0
  variables:
    EXAMPLE_DIR: examples/usb/device/usb_webcam

build_example_usb_device_usb_hid_device:
  extends:
    - .build_examples_template
    - .rules:build:example_usb_device_usb_hid_device
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: examples/usb/device/usb_hid_device

build_example_usb_device_usb_lcd_display:
  extends:
    - .build_examples_template
    - .rules:build:example_usb_device_usb_lcd_display
  variables:
    EXAMPLE_DIR: examples/usb/device/usb_lcd_display
    IMAGE: espressif/idf:release-v5.3

build_example_usb_device_usb_msc_wireless_disk:
  extends:
    - .build_examples_template
    - .rules:build:example_usb_device_usb_msc_wireless_disk
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: examples/usb/device/usb_msc_wireless_disk

build_example_usb_device_usb_surface_dial:
  extends:
    - .build_examples_template
    - .rules:build:example_usb_device_usb_surface_dial
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: examples/usb/device/usb_surface_dial

build_example_usb_device_usb_uf2_nvs:
  extends:
    - .build_examples_template
    - .rules:build:example_usb_device_usb_uf2_nvs
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.2
  variables:
    EXAMPLE_DIR: examples/usb/device/usb_uf2_nvs

build_example_usb_device_usb_uf2_ota:
  extends:
    - .build_examples_template
    - .rules:build:example_usb_device_usb_uf2_ota
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.2
  variables:
    EXAMPLE_DIR: examples/usb/device/usb_uf2_ota

build_example_usb_host_usb_camera_lcd_display:
  extends:
    - .build_examples_template
    - .rules:build:example_usb_host_usb_camera_lcd_display
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.1
        EXAMPLE_CONFIG: "sdkconfig.psram_octal_120m=default"
  variables:
    EXAMPLE_DIR: examples/usb/host/usb_camera_lcd_display

build_example_usb_host_usb_camera_mic_spk:
  extends:
    - .build_examples_template
    - .rules:build:example_usb_host_usb_camera_mic_spk
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.1
  variables:
    EXAMPLE_DIR: examples/usb/host/usb_camera_mic_spk

build_example_usb_host_usb_audio_player:
  extends:
    - .build_examples_template
    - .rules:build:example_usb_host_usb_audio_player
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: examples/usb/host/usb_audio_player

build_example_usb_host_usb_cdc_4g_module:
  extends:
    - .build_examples_template
    - .rules:build:example_usb_host_usb_cdc_4g_module
    - .build_idf_version_greater_equal_v5_0
  variables:
    EXAMPLE_DIR: examples/usb/host/usb_cdc_4g_module

build_example_usb_host_usb_cdc_basic:
  extends:
    - .build_examples_template
    - .rules:build:example_usb_host_usb_cdc_basic
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.1
  variables:
    EXAMPLE_DIR: examples/usb/host/usb_cdc_basic

build_example_usb_host_usb_hub_dual_camera:
  extends:
    - .build_examples_template
    - .rules:build:example_usb_host_usb_hub_dual_camera
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.4
  variables:
    EXAMPLE_DIR: examples/usb/host/usb_hub_dual_camera

build_example_usb_host_usb_ecm_4g_module:
  extends:
    - .build_examples_template
    - .rules:build:example_usb_host_usb_ecm_4g_module
    - .build_idf_version_greater_equal_v5_0
  variables:
    EXAMPLE_DIR: examples/usb/host/usb_ecm_4g_module

build_example_usb_host_usb_msc_ota:
  extends:
    - .build_examples_template
    - .rules:build:example_usb_host_usb_msc_ota
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v5.1
  variables:
    EXAMPLE_DIR: examples/usb/host/usb_msc_ota

build_example_usb_host_usb_rndis_4g_module:
  extends:
    - .build_examples_template
    - .rules:build:example_usb_host_usb_rndis_4g_module
    - .build_idf_version_greater_equal_v5_0
  variables:
    EXAMPLE_DIR: examples/usb/host/usb_rndis_4g_module

build_example_usb_otg_usb_host_device_mode_manual_switch:
  extends:
    - .build_examples_template
    - .rules:build:example_usb_host_usb_msc_ota
    - .build_idf_version_greater_equal_v5_0
  variables:
    EXAMPLE_DIR: examples/usb/otg/usb_host_device_mode_manual_switch

build_example_utilities_xz_decompress_file:
  extends:
    - .build_examples_template
    - .rules:build:example_utilities_xz_decompress_file
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: examples/utilities/xz_decompress_file

build_example_utilities_adc_tp_calibration:
  extends:
    - .build_examples_template
    - .rules:build:example_utilities_adc_tp_calibration
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.2
  variables:
    EXAMPLE_DIR: examples/utilities/adc_tp_calibration

build_example_vision_opencv_color_tracker:
  extends:
    - .build_examples_template
    - .rules:build:example_vision_opencv_color_tracker
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.4
  variables:
    EXAMPLE_DIR: examples/vision/opencv/color_tracker

build_components_audio_adc_mic_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:component_audio_adc_mic_test_apps
    - .build_idf_version_greater_equal_v5_0
  variables:
    EXAMPLE_DIR: components/audio/adc_mic/test_apps

build_components_audio_pwm_audio_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:component_audio_pwm_audio_test_apps
    - .build_idf_active_release_version
  variables:
    EXAMPLE_DIR: components/audio/pwm_audio/test_apps

build_components_avi_player_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_avi_player_test_apps
    - .build_idf_active_release_version
  variables:
    EXAMPLE_DIR: components/avi_player/test_apps

build_components_bluetooth_ble_hci_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_bluetooth_ble_hci_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.2
  variables:
    EXAMPLE_DIR: components/bluetooth/ble_hci/test_apps

build_components_button_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_button_test_apps
    - .build_idf_version_greater_equal_v5_0
  variables:
    EXAMPLE_DIR: components/button/test_apps

build_components_display_lcd_esp_lcd_axs15231b_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_display_lcd_esp_lcd_axs15231b_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.1
  variables:
    EXAMPLE_DIR: components/display/lcd/esp_lcd_axs15231b/test_apps

build_components_display_lcd_esp_lcd_ek79007_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_display_lcd_esp_lcd_ek79007_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.3
  variables:
    EXAMPLE_DIR: components/display/lcd/esp_lcd_ek79007/test_apps

build_components_display_lcd_esp_lcd_jd9165_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_display_lcd_esp_lcd_jd9165_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.3
  variables:
    EXAMPLE_DIR: components/display/lcd/esp_lcd_jd9165/test_apps

build_components_display_lcd_esp_lcd_jd9365_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_display_lcd_esp_lcd_jd9365_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.3
  variables:
    EXAMPLE_DIR: components/display/lcd/esp_lcd_jd9365/test_apps

build_components_display_lcd_esp_lcd_gc9b71_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_display_lcd_esp_lcd_gc9b71_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.1
  variables:
    EXAMPLE_DIR: components/display/lcd/esp_lcd_gc9b71/test_apps

build_components_display_lcd_esp_lcd_hx8399_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_display_lcd_esp_lcd_hx8399_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.3
  variables:
    EXAMPLE_DIR: components/display/lcd/esp_lcd_hx8399/test_apps

build_components_display_lcd_esp_lcd_panel_io_additions_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_display_lcd_esp_lcd_panel_io_additions_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: components/display/lcd/esp_lcd_panel_io_additions/test_apps

build_components_display_lcd_esp_lcd_nv3022b_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_display_lcd_esp_lcd_nv3022b_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.1
  variables:
    EXAMPLE_DIR: components/display/lcd/esp_lcd_nv3022b/test_apps

build_components_display_lcd_esp_lcd_sh8601_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_display_lcd_esp_lcd_sh8601_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.1
  variables:
    EXAMPLE_DIR: components/display/lcd/esp_lcd_sh8601/test_apps

build_components_display_lcd_esp_lcd_spd2010_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_display_lcd_esp_lcd_spd2010_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.1
  variables:
    EXAMPLE_DIR: components/display/lcd/esp_lcd_spd2010/test_apps

build_components_display_lcd_esp_lcd_st7701_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_display_lcd_esp_lcd_st7701_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.3
  variables:
    EXAMPLE_DIR: components/display/lcd/esp_lcd_st7701/test_apps

build_components_display_lcd_esp_lcd_st7703_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_display_lcd_esp_lcd_st7703_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.3
  variables:
    EXAMPLE_DIR: components/display/lcd/esp_lcd_st7703/test_apps

build_components_display_lcd_esp_lcd_st77903_qspi_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_display_lcd_esp_lcd_st77903_qspi_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.3
  variables:
    EXAMPLE_DIR: components/display/lcd/esp_lcd_st77903_qspi/test_apps

build_components_display_lcd_esp_lcd_st77903_rgb_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_display_lcd_esp_lcd_st77903_rgb_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.1
  variables:
    EXAMPLE_DIR: components/display/lcd/esp_lcd_st77903_rgb/test_apps

build_components_display_lcd_esp_lcd_st77916_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_display_lcd_esp_lcd_st77916_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.1
  variables:
    EXAMPLE_DIR: components/display/lcd/esp_lcd_st77916/test_apps

build_components_display_lcd_esp_lcd_st77922_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_display_lcd_esp_lcd_st77922_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.1
  variables:
    EXAMPLE_DIR: components/display/lcd/esp_lcd_st77922/test_apps

build_components_display_lcd_esp_lcd_usb_display_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_display_lcd_esp_lcd_usb_display_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.3
  variables:
    EXAMPLE_DIR: components/display/lcd/esp_lcd_usb_display/test_apps

build_components_display_lcd_touch_esp_lcd_touch_ili2118_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_display_lcd_touch_esp_lcd_touch_ili2118_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.1
  variables:
    EXAMPLE_DIR: components/display/lcd_touch/esp_lcd_touch_ili2118/test_apps

build_components_display_lcd_touch_esp_lcd_touch_spd2010_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_display_lcd_touch_esp_lcd_touch_spd2010_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: components/display/lcd_touch/esp_lcd_touch_spd2010/test_apps

build_components_display_lcd_touch_esp_lcd_touch_st7123_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_display_lcd_touch_esp_lcd_touch_st7123_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.1
  variables:
    EXAMPLE_DIR: components/display/lcd_touch/esp_lcd_touch_st7123/test_apps

build_components_display_tools_esp_lv_decoder_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_display_tools_esp_lv_decoder_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: components/display/tools/esp_lv_decoder/test_apps

build_components_display_tools_esp_lv_fs_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_display_tools_esp_lv_fs_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: components/display/tools/esp_lv_fs/test_apps

build_components_display_tools_esp_mmap_assets_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_display_tools_esp_mmap_assets_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.3
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: components/display/tools/esp_mmap_assets/test_apps

build_components_expander_io_expander_mcp23017_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_expander_io_expander_mcp23017_test_apps
    - .build_idf_active_release_version
  variables:
    EXAMPLE_DIR: components/expander/io_expander/mcp23017/test_apps

build_components_keyboard_button_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_keyboard_button_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.2
  variables:
    EXAMPLE_DIR: components/keyboard_button/test_apps

build_components_ir_ir_learn_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_ir_ir_learn_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: components/ir/ir_learn/test_apps

build_components_knob_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_knob_test
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: components/knob/test_apps

build_components_led_led_indicator_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_led_led_indicator_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: components/led/led_indicator/test_apps

build_components_motor_drv10987_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_motor_drv10987_test_apps
    - .build_idf_version_greater_equal_v5_0
  variables:
    EXAMPLE_DIR: components/motor/drv10987/test_apps

build_components_motor_esp_sensorless_bldc_control_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_motor_esp_sensorless_bldc_control_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: components/motor/esp_sensorless_bldc_control/test_apps

build_components_motor_esp_simplefoc_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_motor_esp_simplefoc_test_apps
    - .build_idf_version_greater_equal_v5_0
  variables:
    EXAMPLE_DIR: components/motor/esp_simplefoc/test_apps

build_components_motor_servo_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_motor_servo_test_apps
    - .build_idf_active_release_version
  variables:
    EXAMPLE_DIR: components/motor/servo/test_apps

build_components_ntc_driver_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_ntc_driver_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v5.1
  variables:
    EXAMPLE_DIR: components/sensors/ntc_driver/test_apps

build_components_sensors_power_monitor_ina236_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_sensors_power_monitor_ina236_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v5.1
  variables:
    EXAMPLE_DIR: components/sensors/power_monitor/ina236/test_apps

build_components_openai_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_openai_test_apps
  parallel:
    matrix:
      # TODO: Replace v4.4.6 with release/v4.4 when the bug is fixed.
      - IMAGE: espressif/idf:v4.4.6   # Due to a bug in the ESP32-S3 not being able to scan for AP in release/v4.4,
                                      # temporarily using version v4.4.6 and awaiting the next update in release/v4.4.
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: components/openai/test_apps

build_components_sensors_power_measure_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_sensors_power_measure_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v4.4
  variables:
    EXAMPLE_DIR: components/sensors/power_measure/test_apps

build_components_sensors_adc_mcp3201_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_sensors_adc_mcp3201_test_apps
    - .build_idf_active_release_version
  variables:
    EXAMPLE_DIR: components/sensors/adc/mcp3201/test_apps

build_components_sensors_battery_fuel_gauge_adc_battery_estimation_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_sensors_battery_fuel_gauge_adc_battery_estimation_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.4
  variables:
    EXAMPLE_DIR: components/sensors/battery_fuel_gauge/adc_battery_estimation/test_apps

build_components_sensors_battery_fuel_gauge_max17048_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_sensors_battery_fuel_gauge_max17048_test_apps
    - .build_idf_active_release_version
  variables:
    EXAMPLE_DIR: components/sensors/battery_fuel_gauge/max17048/test_apps

build_components_sensors_gesture_apds9960_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_sensors_gesture_apds9960_test_apps
    - .build_idf_active_release_version
  variables:
    EXAMPLE_DIR: components/sensors/gesture/apds9960/test_apps

build_components_sensors_humiture_aht20_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_sensors_humiture_aht20_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: components/sensors/humiture/aht20/test_apps

build_components_sensors_humiture_hdc2010_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_sensors_humiture_hdc2010_test_apps
    - .build_idf_active_release_version
  variables:
    EXAMPLE_DIR: components/sensors/humiture/hdc2010/test_apps

build_components_sensors_humiture_mvh3004d_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_sensors_humiture_mvh3004d_test_apps
    - .build_idf_active_release_version
  variables:
    EXAMPLE_DIR: components/sensors/humiture/mvh3004d/test_apps

build_components_sensors_humiture_sht3x_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_sensors_humiture_sht3x_test_apps
    - .build_idf_active_release_version
  variables:
    EXAMPLE_DIR: components/sensors/humiture/sht3x/test_apps

build_components_sensors_imu_lis2dh12_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_sensors_imu_lis2dh12_test_apps
    - .build_idf_active_release_version
  variables:
    EXAMPLE_DIR: components/sensors/imu/lis2dh12/test_apps

build_components_sensors_light_sensor_bh1750_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_sensors_light_sensor_bh1750_test_apps
    - .build_idf_active_release_version
  variables:
    EXAMPLE_DIR: components/sensors/light_sensor/bh1750/test_apps

build_components_sensors_light_sensor_veml6040_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_sensors_light_sensor_veml6040_test_apps
    - .build_idf_active_release_version
  variables:
    EXAMPLE_DIR: components/sensors/light_sensor/veml6040/test_apps


build_components_sensors_light_sensor_veml6075_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_sensors_light_sensor_veml6075_test_apps
    - .build_idf_active_release_version
  variables:
    EXAMPLE_DIR: components/sensors/light_sensor/veml6075/test_apps

build_components_sensors_pressure_bme280_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_sensors_pressure_bme280_test_apps
    - .build_idf_active_release_version
  variables:
    EXAMPLE_DIR: components/sensors/pressure/bme280/test_apps

build_components_sensors_radar_at581x_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_sensors_radar_at581x_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: components/sensors/radar/at581x/test_apps

build_components_sensor_hub_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_sensors_sensor_hub_test_apps
    - .build_idf_active_release_version
  variables:
    EXAMPLE_DIR: components/sensors/sensor_hub/test_apps

build_components_spi_bus_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_spi_bus_test_apps
    - .build_idf_active_release_version
  variables:
    EXAMPLE_DIR: components/spi_bus/test_apps

build_components_storage_eeprom_at24c02_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_storage_eeprom_at24c02_test_apps
    - .build_idf_active_release_version
  variables:
    EXAMPLE_DIR: components/storage/eeprom/at24c02/test_apps

build_components_touch_touch_proximity_sensor_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_touch_touch_proximity_sensor_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.3
  variables:
    EXAMPLE_DIR: components/touch/touch_proximity_sensor/test_apps

build_components_touch_touch_button_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_touch_touch_button_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.3
  variables:
    EXAMPLE_DIR: components/touch/touch_button/test_apps

build_components_touch_touch_button_sensor_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_touch_touch_button_sensor_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.3
  variables:
    EXAMPLE_DIR: components/touch/touch_button_sensor/test_apps

build_components_touch_touch_slider_sensor_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_touch_touch_slider_sensor_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.3
  variables:
    EXAMPLE_DIR: components/touch/touch_slider_sensor/test_apps

build_components_usb_esp_msc_ota_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_usb_esp_msc_ota_test_apps
  variables:
    IMAGE: espressif/idf:release-v5.1
    EXAMPLE_DIR: components/usb/esp_msc_ota/test_apps

build_components_usb_iot_usbh_rndis_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_usb_iot_usbh_rndis_test_apps
    - .build_idf_version_greater_equal_v5_0
  variables:
    EXAMPLE_DIR: components/usb/iot_usbh_rndis/test_apps

build_components_usb_usb_stream_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_usb_usb_stream_test
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v5.4
  variables:
    EXAMPLE_DIR: components/usb/usb_stream/test_apps

build_components_usb_iot_usbh_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_usb_iot_usbh_test
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: components/usb/iot_usbh/test_apps

build_components_usb_iot_usbh_cdc_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_usb_iot_usbh_cdc_test
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: components/usb/iot_usbh_cdc/test_apps

build_components_usb_iot_usbh_modem_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_usb_iot_usbh_modem_test
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.3
  variables:
    EXAMPLE_DIR: components/usb/iot_usbh_modem/test_apps

build_components_usb_usb_device_uac:
  extends:
    - .build_examples_template
    - .rules:build:components_usb_usb_device_uac
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: components/usb/usb_device_uac

build_components_usb_usb_device_uvc:
  extends:
    - .build_examples_template
    - .rules:build:components_usb_usb_device_uvc
    - .build_idf_active_release_version
  variables:
    EXAMPLE_DIR: components/usb/usb_device_uvc

build_components_led_lightbulb_driver_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_led_lightbulb_driver_test_apps
    - .build_idf_active_release_version
  variables:
    EXAMPLE_DIR: components/led/lightbulb_driver/test_apps

build_components_i2c_bus_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_i2c_bus_test_apps
    - .build_idf_active_release_version
  variables:
    EXAMPLE_DIR: components/i2c_bus/test_apps

build_tools_cmake_utilities_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:tools_cmake_utilities_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
  variables:
    EXAMPLE_DIR: tools/cmake_utilities/test_apps

build_example_relinker:
  extends:
    - .build_examples_template
    - .rules:build:example_relinker
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v5.3
  variables:
    EXAMPLE_DIR: examples/relinker

build_example_elf_loader_elf_loader_example:
  extends:
    - .build_examples_template
    - .rules:build:example_elf_loader_elf_loader_example
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.2
      - IMAGE: espressif/idf:release-v5.3
      - IMAGE: espressif/idf:release-v5.4
        EXAMPLE_CONFIG: "sdkconfig.ci=default"
  variables:
    EXAMPLE_DIR: examples/elf_loader/elf_loader_example

build_example_elf_loader_build_elf_file_example:
  extends:
    - .build_examples_template
    - .rules:build:example_elf_loader_build_elf_file_example
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v4.4
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v5.1
      - IMAGE: espressif/idf:release-v5.2
      - IMAGE: espressif/idf:release-v5.3
      - IMAGE: espressif/idf:release-v5.4
  variables:
    EXAMPLE_DIR: examples/elf_loader/build_elf_file_example

build_components_utilities_adc_tp_calibration_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_utilities_adc_tp_calibration_test_apps
    - .build_idf_active_release_version
  variables:
    EXAMPLE_DIR: components/utilities/adc_tp_calibration/test_apps

build_components_zero_detection_test_apps:
  extends:
    - .build_examples_template
    - .rules:build:components_zero_detection_test_apps
  parallel:
    matrix:
      - IMAGE: espressif/idf:release-v5.0
      - IMAGE: espressif/idf:release-v5.1
  variables:
    EXAMPLE_DIR: components/zero_detection/test_apps
