Skip to content

Commit

Permalink
CI: Update IDF version for tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
espzav committed May 30, 2024
1 parent e0452bc commit ca82cb8
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 17 deletions.
10 changes: 8 additions & 2 deletions .build-test-rules.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,16 @@ examples:
- if: IDF_VERSION_MAJOR < 5 and IDF_TARGET in ["esp32c2", "esp32p4", "esp32c5", "esp32c6"]
reason: Example depends on target, which is supported only for IDF >= 5.0

components/lcd/esp_lcd_gc9503:
disable:
- if: IDF_VERSION_MAJOR < 5 or (IDF_VERSION_MAJOR == 5 and IDF_VERSION_MINOR == 0 and ESP_IDF_VERSION_PATCH < 5) or (IDF_VERSION_MAJOR == 5 and IDF_VERSION_MINOR == 1 and ESP_IDF_VERSION_PATCH == 1)
reason: Supported from version 5.0.5 and not supported in version 5.1.1

components/lcd/esp_lcd_gc9503/test_apps:
disable:
- if: IDF_VERSION_MAJOR < 5
reason: Component is supported only for IDF >= 5.0
- if: IDF_VERSION_MAJOR < 5 or (IDF_VERSION_MAJOR == 5 and IDF_VERSION_MINOR == 0 and ESP_IDF_VERSION_PATCH < 5) or (IDF_VERSION_MAJOR == 5 and IDF_VERSION_MINOR == 1 and ESP_IDF_VERSION_PATCH == 1)
reason: Supported from version 5.0.5 and not supported in version 5.1.1

components/lcd/esp_lcd_ssd1681:
disable:
- if: IDF_VERSION_MAJOR < 5
Expand Down
26 changes: 17 additions & 9 deletions .github/ci/update_readme_dependencies.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
from py_markdown_table.markdown_table import markdown_table
from typing import Any

DEPENDENCIES_START = '<!-- Autogenerated start: Dependencies -->\n'
DEPENDENCIES_END = '<!-- Autogenerated end: Dependencies -->\n'
DEPENDENCIES_START = '<!-- Autogenerated start: Dependencies -->'
DEPENDENCIES_END = '<!-- Autogenerated end: Dependencies -->'
TABLE_HEADER = '### Capabilities and dependencies\n'
ESP_REGISTRY_URL = 'https://components.espressif.com/components/'
CAPABILITIES_PREFIX = '#define BSP_CAPS_'
Expand Down Expand Up @@ -103,6 +103,13 @@ def get_capabilities_table(header_path, manifest):
return table_data


def index_regexp(yourlist, yourstring):
for i, line in enumerate(yourlist):
if yourstring in line:
return i
return -1


def check_bsp_readme(bsp_path) -> Any:
# Get list of capabilities and dependencies of this BSP
bsp_name = bsp_path.stem if not bsp_path.stem.endswith('_noglib') else bsp_path.stem[:-7]
Expand All @@ -121,19 +128,20 @@ def check_bsp_readme(bsp_path) -> Any:
with open(readme_path, 'r+', newline='\n') as readme:
content = readme.readlines()
# Find or create 'Dependencies section' in the README.md
try:
start_idx = content.index(DEPENDENCIES_START)
end_idx = content.index(DEPENDENCIES_END)
start_idx = index_regexp(content, DEPENDENCIES_START)
end_idx = index_regexp(content, DEPENDENCIES_END)

if start_idx >= 0 or end_idx >= 0:
if set(table_md.splitlines()) == set([line[:-1] for line in content[start_idx + 1:end_idx]]):
return # The table exists and is correct, we can return here
else:
print("[{}] Incorrect component table, updating...".format(str(bsp_path)))
del content[start_idx + 1:end_idx]
except ValueError:
else:
print("[{}] First run on this file. Creating components section...".format(str(bsp_path)))
content.append(DEPENDENCIES_START)
content.append(DEPENDENCIES_END)
start_idx = content.index(DEPENDENCIES_START)
content.append(DEPENDENCIES_START + '\n')
content.append(DEPENDENCIES_END + '\n')
start_idx = index_regexp(content, DEPENDENCIES_START)

# Write the generated table to the README.md
content.insert(start_idx + 1, table_md)
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-examples-gh-pages-on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
build:
strategy:
matrix:
idf_ver: ["v5.1.1"]
idf_ver: ["v5.3.0"]
runs-on: ubuntu-latest
container: espressif/idf:${{ matrix.idf_ver }}
steps:
Expand Down
9 changes: 9 additions & 0 deletions .github/workflows/build_example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,15 @@ jobs:
- idf_ver: "release-v4.4"
parallel_count: 1
parallel_index: 1
- idf_ver: "release-v5.1"
parallel_count: 1
parallel_index: 1
- idf_ver: "release-v5.2"
parallel_count: 1
parallel_index: 1
- idf_ver: "release-v5.3"
parallel_count: 1
parallel_index: 1
runs-on: ubuntu-20.04
container: espressif/idf:${{ matrix.idf_ver }}
steps:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/build_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ jobs:
build:
strategy:
matrix:
idf_ver: ["release-v4.3", "release-v4.4", "latest"]
idf_ver: ["release-v4.4", "release-v5.1", "release-v5.2", "release-v5.3", "latest"]
idf_target: ["esp32", "esp32s2", "esp32c3", "esp32s3", "esp32p4"]
exclude:
- idf_ver: "release-v4.3"
idf_target: esp32p4 # ESP32P4 support started with version 5.2
- idf_ver: "release-v4.4"
idf_target: esp32p4 # ESP32P4 support started with version 5.2
- idf_ver: "release-v4.3"
idf_target: esp32s3 # ESP32S3 support started with version 4.4
- idf_ver: "release-v5.0"
idf_target: esp32p4 # ESP32P4 support started with version 5.2
- idf_ver: "release-v5.1"
idf_target: esp32p4 # ESP32P4 support started with version 5.2
runs-on: ubuntu-20.04
container: espressif/idf:${{ matrix.idf_ver }}
steps:
Expand Down
5 changes: 5 additions & 0 deletions test_app/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,11 @@ elseif("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_LESS "5.3")
list(APPEND EXCLUDE_COMPONENTS "esp_lcd_ili9881c")
endif()

# Test rgb lcd components only in IDF 5.0.5 or greater
if("${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}" VERSION_LESS "5.0.4")
list(APPEND EXCLUDE_COMPONENTS "esp_lcd_gc9503")
endif()

# Test rgb lcd components only in esp32s3
if(NOT "${IDF_TARGET}" STREQUAL "esp32s3")
list(APPEND EXCLUDE_COMPONENTS "esp_lcd_gc9503")
Expand Down

0 comments on commit ca82cb8

Please sign in to comment.