Skip to content

Commit f33469d

Browse files
committed
ci: apply idf-ci build run
removed script: - tools/ci/dynamic_pipelines/scripts/child_pipeline_build_apps.py -> idf-ci build run - tools/ci/ci_build_apps.py -> idf-build-apps build moved from remove from idf_pytest/constants.py to .idf_build_apps.toml - DEFAULT_FULL_BUILD_TEST_COMPONENTS - DEFAULT_FULL_BUILD_TEST_FILEPATTERNS - DEFAULT_IGNORE_WARNING_FILEPATH - DEFAULT_BUILD_LOG_FILENAME - DEFAULT_SIZE_JSON_FILENAME
1 parent c80d0ad commit f33469d

File tree

26 files changed

+124
-477
lines changed

26 files changed

+124
-477
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ managed_components
100100
pytest-embedded/
101101
# legacy one
102102
pytest_embedded_log/
103-
list_job*.txt
103+
app_info_*.txt
104104
size_info*.txt
105105
XUNIT_RESULT*.xml
106106
.manifest_sha

.gitlab/ci/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ We're using the latest version of [idf-build-apps][idf-build-apps]. Please refer
250250
In ESP-IDF CI, there's a few more special rules are additionally supported to disable the check app dependencies feature:
251251

252252
- Add MR labels `BUILD_AND_TEST_ALL_APPS`
253+
- Pipeline variable `IDF_CI_SELECT_ALL_PYTEST_CASES=1`
253254
- Run in protected branches
254255

255256
## Upload/Download Artifacts to Internal Minio Server

.gitlab/ci/build.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -34,13 +34,12 @@
3434
variables:
3535
IDF_TOOLCHAIN: clang
3636
TEST_BUILD_OPTS_EXTRA: ""
37-
TEST_DIR: tools/test_apps/system/clang_build_test
3837
PYTEST_IGNORE_COLLECT_IMPORT_ERROR: "1"
3938
script:
4039
# CI specific options start from "--parallel-count xxx". could ignore when running locally
41-
- run_cmd python tools/ci/ci_build_apps.py $TEST_DIR -v
40+
- run_cmd idf-build-apps build
41+
-p tools/test_apps/system/clang_build_test
4242
-t $IDF_TARGET
43-
--copy-sdkconfig
4443
--parallel-count ${CI_NODE_TOTAL:-1}
4544
--parallel-index ${CI_NODE_INDEX:-1}
4645
--modified-components ${MR_MODIFIED_COMPONENTS}
@@ -105,7 +104,7 @@ gcc_static_analyzer:
105104
ANALYZING_APP: "examples/get-started/hello_world"
106105
script:
107106
- echo "CONFIG_COMPILER_STATIC_ANALYZER=y" >> ${ANALYZING_APP}/sdkconfig.defaults
108-
- python -m idf_build_apps build -v -p ${ANALYZING_APP} -t all
107+
- idf-build-apps build -p ${ANALYZING_APP}
109108

110109
########################################
111110
# Clang Build Apps Without Tests Cases #

.gitlab/ci/host-test.yml

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -297,12 +297,11 @@ test_pytest_qemu:
297297
INSTALL_EXTRA_TOOLS: "qemu-riscv32"
298298
IDF_TOOLCHAIN: [gcc, clang]
299299
script:
300-
- run_cmd python tools/ci/ci_build_apps.py . -v
300+
- run_cmd idf-ci build run
301+
--build-system cmake
301302
--target $IDF_TARGET
302-
--pytest-apps
303+
--only-test-related
303304
-m qemu
304-
--collect-app-info "list_job_${CI_JOB_NAME_SLUG}.txt"
305-
--modified-components ${MR_MODIFIED_COMPONENTS}
306305
--modified-files ${MR_MODIFIED_FILES}
307306
- python tools/ci/get_known_failure_cases_file.py
308307
- run_cmd pytest
@@ -312,7 +311,6 @@ test_pytest_qemu:
312311
--embedded-services idf,qemu
313312
--junitxml=XUNIT_RESULT.xml
314313
--ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME}
315-
--app-info-filepattern \"list_job_*.txt\"
316314
--qemu-extra-args \"-global driver=timer.$IDF_TARGET.timg,property=wdt_disable,value=true\"
317315

318316
test_pytest_linux:
@@ -327,21 +325,18 @@ test_pytest_linux:
327325
reports:
328326
junit: XUNIT_RESULT.xml
329327
script:
330-
- run_cmd python tools/ci/ci_build_apps.py components examples tools/test_apps -v
328+
- run_cmd idf-ci build run
329+
--build-system cmake
330+
-p components -p examples -p tools/test_apps
331331
--target linux
332-
--pytest-apps
333-
-m host_test
334-
--collect-app-info "list_job_${CI_JOB_NAME_SLUG}.txt"
335-
--modified-components ${MR_MODIFIED_COMPONENTS}
332+
--only-test-related
336333
--modified-files ${MR_MODIFIED_FILES}
337334
- python tools/ci/get_known_failure_cases_file.py
338335
- run_cmd pytest
339336
--target linux
340-
-m host_test
341337
--embedded-services idf
342338
--junitxml=XUNIT_RESULT.xml
343339
--ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME}
344-
--app-info-filepattern \"list_job_*.txt\"
345340

346341
test_pytest_macos:
347342
extends:
@@ -364,20 +359,19 @@ test_pytest_macos:
364359
# GitLab sets the project dir to this template `<builds_dir>/<namespace>/<project_name>`
365360
IDF_PATH: "/Users/espressif/builds/espressif/esp-idf"
366361
script:
367-
- run_cmd python tools/ci/ci_build_apps.py components examples tools/test_apps -v
362+
- run_cmd idf-ci build run
363+
-p components -p examples -p tools/test_apps
364+
--build-system cmake
368365
--target linux
369-
--pytest-apps
366+
--only-test-related
370367
-m \"host_test and macos\"
371-
--collect-app-info "list_job_${CI_JOB_NAME_SLUG}.txt"
372-
--modified-components ${MR_MODIFIED_COMPONENTS}
373368
--modified-files ${MR_MODIFIED_FILES}
374369
- python tools/ci/get_known_failure_cases_file.py
375370
- run_cmd pytest
376371
--target linux
377372
-m \"host_test and macos\"
378373
--junitxml=XUNIT_RESULT.xml
379374
--ignore-result-files ${KNOWN_FAILURE_CASES_FILE_NAME}
380-
--app-info-filepattern \"list_job_*.txt\"
381375

382376
test_idf_pytest_plugin:
383377
extends:

.gitlab/ci/pre_check.yml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -122,15 +122,6 @@ check_test_scripts_build_test_rules:
122122
# requires basic pytest dependencies
123123
- python tools/ci/check_build_test_rules.py check-test-scripts examples/ tools/test_apps components
124124

125-
check_configure_ci_environment_parsing:
126-
extends:
127-
- .pre_check_template
128-
- .before_script:build
129-
- .rules:build
130-
script:
131-
- cd tools/ci
132-
- python -m unittest ci_build_apps.py
133-
134125
pipeline_variables:
135126
extends:
136127
- .pre_check_template

.gitlab/ci/rules.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@
5353
- "tools/ci/ignore_build_warnings.txt"
5454
- "tools/ci/test_build_system*.sh"
5555
- "tools/ci/test_build_system*.py"
56-
- "tools/ci/ci_build_apps.py"
5756
- "tools/test_build_system/**/*"
5857

5958
.patterns-build_system_win: &patterns-build_system_win

.idf_build_apps.toml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
config_rules = [
2+
'sdkconfig.ci=default',
3+
'sdkconfig.ci.*=',
4+
'=default',
5+
]
6+
7+
extra_pythonpaths = [
8+
'$IDF_PATH/tools/ci/python_packages',
9+
'$IDF_PATH/tools/ci',
10+
'$IDF_PATH/tools',
11+
]
12+
build_system = "idf_ci_local.app:IdfCMakeApp"
13+
14+
recursive = true
15+
check_warnings = true
16+
keep_going = true
17+
copy_sdkconfig = true
18+
ignore_warning_files = [
19+
'$IDF_PATH/tools/ci/ignore_build_warnings.txt',
20+
]
21+
22+
build_dir = "build_@t_@w"
23+
build_log_filename = "build.log"
24+
size_json_filename = "size.json"
25+
26+
verbose = 1 # INFO
27+
28+
# collect
29+
collect_app_info_filename = "app_info_${CI_JOB_NAME_SLUG}.txt"
30+
collect_size_info_filename = "size_info_${CI_JOB_NAME_SLUG}.txt" # TODO remove this file when ci-dashboard is ready
31+
junitxml = "build_summary_${CI_JOB_NAME_SLUG}.xml"
32+
33+
# manifest
34+
# check_manifest_rules = true # FIXME
35+
manifest_rootpath = "$IDF_PATH"
36+
manifest_filepatterns = [
37+
'**/.build-test-rules.yml',
38+
]
39+
40+
# dependency-driven build
41+
deactivate_dependency_driven_build_by_components = [
42+
'cxx',
43+
'esp_common',
44+
'esp_hw_support',
45+
'esp_rom',
46+
'esp_system',
47+
'esp_timer',
48+
'freertos',
49+
'hal',
50+
'heap',
51+
'log',
52+
'newlib',
53+
'riscv',
54+
'soc',
55+
'xtensa',
56+
]
57+
58+
deactivate_dependency_driven_build_by_filepatterns = [
59+
# tools
60+
'tools/cmake/**/*',
61+
'tools/tools.json',
62+
# ci
63+
'tools/ci/ignore_build_warnings.txt',
64+
]

.idf_ci.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[local_runtime_envs]
2+
EXTRA_CFLAGS = "-Werror -Werror=deprecated-declarations -Werror=unused-variable -Werror=unused-but-set-variable -Werror=unused-function -Wstrict-prototypes"
3+
EXTRA_CXXFLAGS = "-Werror -Werror=deprecated-declarations -Werror=unused-variable -Werror=unused-but-set-variable -Werror=unused-function"
4+
LDGEN_CHECK_MAPPING = "1"
5+
IDF_CI_BUILD = "1"

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ repos:
2525
- pytest-ignore-test-results~=0.3
2626
- pytest-rerunfailures
2727
- pytest-timeout
28-
- idf-build-apps~=2.8
28+
- idf-build-apps~=2.11
2929
- python-gitlab
3030
- minio
3131
- click
@@ -163,7 +163,7 @@ repos:
163163
require_serial: true
164164
additional_dependencies:
165165
- PyYAML == 5.3.1
166-
- idf-build-apps>=2.8,<3
166+
- idf-build-apps~=2.11
167167
- id: sort-yaml-files
168168
name: sort yaml files
169169
entry: tools/ci/sort_yaml.py

components/esp_tee/test_apps/tee_test_fw/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ bash install.sh --enable-ci
2323
- For example, to execute the TEE test suite for ESP32-C6 with all the available `sdkconfig` files, run the following steps. The required test applications will be built and flashed automatically onto the DUT by the `pytest` framework.
2424

2525
```bash
26-
python $IDF_PATH/tools/ci/ci_build_apps.py . --target esp32c6 -v --pytest-apps
26+
idf-ci build run --target esp32c6 --only-test-related
2727
pytest --target esp32c6
2828
```

0 commit comments

Comments
 (0)