Skip to content

Commit b4925ab

Browse files
committed
feat: update
1 parent 879fe8b commit b4925ab

15 files changed

+1236
-7
lines changed

.build-rules.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# Note: All operators are binary operators. For more than two operands, you may use the nested parentheses trick.
2+
# For example:
3+
# * A == 1 or (B == 2 and C in [1,2,3])
4+
# * (A == 1 and B == 2) or (C not in ["3", "4", 5])
5+
6+
# Componet test_apps
7+
test_apps:
8+
enable:
9+
- if: IDF_TARGET in ["esp32s3", "esp32p4"]
10+
11+
# Examples
12+
examples/esp_idf/esp_brookesia_phone_m5stace_core_s3:
13+
enable:
14+
- if: IDF_TARGET in ["esp32s3"]
15+
16+
examples/esp_idf/esp_brookesia_phone_p4_function_ev_board:
17+
enable:
18+
- if: IDF_TARGET in ["esp32p4"]
19+
20+
examples/esp_idf/esp_brookesia_phone_s3_box:
21+
enable:
22+
- if: IDF_TARGET in ["esp32s3"]
23+
24+
examples/esp_idf/esp_brookesia_phone_s3_box_3:
25+
enable:
26+
- if: IDF_TARGET in ["esp32s3"]
27+
28+
examples/esp_idf/esp_brookesia_phone_s3_lcd_ev_board:
29+
enable:
30+
- if: IDF_TARGET in ["esp32s3"]

.gitlab-ci.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
stages:
2+
- pre_check
3+
- build
4+
- deploy
5+
6+
workflow:
7+
rules:
8+
# Disable those non-protected push triggered pipelines
9+
- if: '$CI_COMMIT_REF_NAME != "master" && $CI_COMMIT_BRANCH !~ /^release\/v/ && $CI_COMMIT_TAG !~ /^v\d+\.\d+(\.\d+)?($|-)/ && $CI_PIPELINE_SOURCE == "push"'
10+
when: never
11+
# when running merged result pipelines, it would create a temp commit id. use $CI_MERGE_REQUEST_SOURCE_BRANCH_SHA instead of $CI_COMMIT_SHA.
12+
# Please use PIPELINE_COMMIT_SHA at all places that require a commit sha
13+
- if: $CI_OPEN_MERGE_REQUESTS != null
14+
variables:
15+
PIPELINE_COMMIT_SHA: $CI_MERGE_REQUEST_SOURCE_BRANCH_SHA
16+
- if: $CI_OPEN_MERGE_REQUESTS == null
17+
variables:
18+
PIPELINE_COMMIT_SHA: $CI_COMMIT_SHA
19+
- when: always
20+
21+
variables:
22+
COMPONENT_PATH: "$CI_PROJECT_DIR"
23+
24+
include:
25+
- '.gitlab/ci/rules.yml'
26+
- '.gitlab/ci/pre_check.yml'
27+
- '.gitlab/ci/build.yml'
28+
- '.gitlab/ci/deploy.yml'

.gitlab/ci/build.yml

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
.build_template: &build_template
2+
stage: build
3+
tags:
4+
- build
5+
image: ${IMAGE}
6+
variables:
7+
# Enable ccache for all build jobs. See configure_ci_environment.sh for more ccache related settings.
8+
IDF_CCACHE_ENABLE: "1"
9+
BATCH_BUILD: "1"
10+
V: "0"
11+
WARNING_STR: ""
12+
13+
.build_examples_template: &build_examples_template
14+
<<: *build_template
15+
artifacts:
16+
when: always
17+
paths:
18+
- "**/build*/size.json"
19+
- "**/build*/build_log.txt"
20+
- "**/build*/*.bin"
21+
# upload to s3 server to save the artifacts size
22+
- "**/build*/*.map"
23+
- "**/build*/*.elf"
24+
- "**/build*/flasher_args.json"
25+
- "**/build*/flash_args"
26+
- "**/build*/flash_project_args"
27+
- "**/build*/config/sdkconfig.json"
28+
- "**/build*/bootloader/*.bin"
29+
- "**/build*/bootloader/*.elf"
30+
- "**/build*/partition_table/*.bin"
31+
- "**/build*/mmap_build/*.bin"
32+
- "**/build*/**/*.bin"
33+
- size_info.txt
34+
expire_in: 1 week
35+
variables:
36+
IDF_CI_BUILD: "1"
37+
# By configuring this macro, you can append the compiled configuration file.
38+
# For example, using "sdkconf.etc=default" specifies the default sdkconfig file.
39+
EXAMPLE_CONFIG: "="
40+
script:
41+
- pip install "idf-component-manager"
42+
- pip install idf_build_apps
43+
- python .gitlab/tools/build_apps.py ${EXAMPLE_DIR} --config ${EXAMPLE_CONFIG} -t all -vv
44+
45+
# Target ESP-IDF versions
46+
.build_idf_active_release_version:
47+
parallel:
48+
matrix:
49+
- IMAGE: espressif/idf:release-v5.0
50+
- IMAGE: espressif/idf:release-v5.1
51+
- IMAGE: espressif/idf:release-v5.2
52+
- IMAGE: espressif/idf:release-v5.3
53+
54+
.build_esp32_s3_idf_release_version:
55+
parallel:
56+
matrix:
57+
- IMAGE: espressif/idf:release-v5.1
58+
- IMAGE: espressif/idf:release-v5.2
59+
- IMAGE: espressif/idf:release-v5.3
60+
61+
.build_esp32_p4_idf_release_version:
62+
parallel:
63+
matrix:
64+
- IMAGE: espressif/idf:release-v5.3
65+
66+
# Test apps
67+
build_test_apps_lcd_3wire_spi_rgb:
68+
extends:
69+
- .build_examples_template
70+
- .build_esp32_s3_idf_release_version
71+
- .rules:build:test_apps_lcd_3wire_spi_rgb
72+
variables:
73+
EXAMPLE_DIR: test_apps/lcd/3wire_spi_rgb
74+
75+
build_test_apps_lcd_qspi:
76+
extends:
77+
- .build_examples_template
78+
- .build_idf_active_release_version
79+
- .rules:build:test_apps_lcd_qspi
80+
variables:
81+
EXAMPLE_DIR: test_apps/lcd/qspi
82+
83+
build_test_apps_lcd_rgb:
84+
extends:
85+
- .build_examples_template
86+
- .build_esp32_s3_idf_release_version
87+
- .rules:build:test_apps_lcd_rgb
88+
variables:
89+
EXAMPLE_DIR: test_apps/lcd/rgb
90+
91+
build_test_apps_lcd_spi:
92+
extends:
93+
- .build_examples_template
94+
- .build_idf_active_release_version
95+
- .rules:build:test_apps_lcd_spi
96+
variables:
97+
EXAMPLE_DIR: test_apps/lcd/spi
98+
99+
# Examples
100+
# build_example_esp_brookesia_phone_m5stace_core_s3:
101+
# extends:
102+
# - .build_examples_template
103+
# - .build_esp32_s3_idf_release_version
104+
# - .rules:build:example_esp_brookesia_phone_m5stace_core_s3
105+
# variables:
106+
# EXAMPLE_DIR: examples/esp_idf/esp_brookesia_phone_m5stace_core_s3

.gitlab/ci/deploy.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
push_to_github:
2+
stage: deploy
3+
only:
4+
- master
5+
- /^release\/v/
6+
# when: on_success
7+
image: $CI_DOCKER_REGISTRY/esp32-ci-env
8+
tags:
9+
- github_sync
10+
variables:
11+
GIT_STRATEGY: clone
12+
SUBMODULES_TO_FETCH: "none"
13+
dependencies: []
14+
before_script:
15+
- echo "skip default before_script"
16+
script:
17+
- mkdir -p ~/.ssh
18+
- chmod 700 ~/.ssh
19+
- echo -n $GH_PUSH_KEY > ~/.ssh/id_rsa_base64
20+
- base64 --decode --ignore-garbage ~/.ssh/id_rsa_base64 > ~/.ssh/id_rsa
21+
- chmod 600 ~/.ssh/id_rsa
22+
- echo -e "Host github.com\n\tStrictHostKeyChecking no\n" >> ~/.ssh/config
23+
- git remote remove github &>/dev/null || true
24+
- git remote add github [email protected]:esp-arduino-libs/ESP32_Display_Panel.git
25+
- ${COMPONENT_PATH}/.gitlab/tools/push_to_github.sh

.gitlab/ci/pre_check.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
.pre_check_template:
2+
stage: pre_check
3+
image: python:3.9
4+
tags: ["build", "amd64", "internet"]
5+
dependencies: []
6+
7+
check_pre_commit:
8+
extends:
9+
- .pre_check_template
10+
before_script:
11+
- pip install pre-commit
12+
script:
13+
- pre-commit run --show-diff-on-failure --color=always --all-files
14+
15+
check_readme_links:
16+
extends:
17+
- .pre_check_template
18+
- .rules:pre_check:readme
19+
allow_failure: true
20+
script:
21+
- python ${CI_PROJECT_DIR}/.gitlab/tools/check_readme_links.py

.gitlab/ci/rules.yml

Lines changed: 182 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,182 @@
1+
############
2+
# Patterns #
3+
############
4+
5+
# build system, if changed, build all apps
6+
.patterns-build_system: &patterns-build_system
7+
# For test
8+
- ".gitlab/**/*"
9+
- ".build-rules.yml"
10+
- "conftest.py"
11+
- "pytest.ini"
12+
13+
# component folder
14+
.patterns-component: &patterns-component
15+
- "src/**/*"
16+
- "CMakeLists.txt"
17+
- "esp_brookesia_conf.h"
18+
- "idf_component.yml"
19+
- "Kconfig"
20+
21+
# docs folder
22+
.patterns-docs_md: &patterns-docs_md
23+
- "**/*.md"
24+
25+
# test_apps folder
26+
.patterns-test_apps_lcd_3wire_spi_rgb: &patterns-test_apps_lcd_3wire_spi_rgb
27+
- "test_apps/lcd/3wire_spi_rgb/**/*"
28+
29+
.patterns-test_apps_lcd_qspi: &patterns-test_apps_lcd_qspi
30+
- "test_apps/lcd/qspi/**/*"
31+
32+
.patterns-test_apps_lcd_rgb: &patterns-test_apps_lcd_rgb
33+
- "test_apps/lcd/rgb/**/*"
34+
35+
.patterns-test_apps_lcd_spi: &patterns-test_apps_lcd_spi
36+
- "test_apps/lcd/spi/**/*"
37+
38+
.patterns-test_apps_panel: &patterns-test_apps_panel
39+
- "test_apps/panel/**/*"
40+
41+
.patterns-test_apps_touch_i2c: &patterns-test_apps_touch_i2c
42+
- "test_apps/touch/i2c/**/*"
43+
44+
.patterns-test_apps_touch_spi: &patterns-test_apps_touch_spi
45+
- "test_apps/touch/spi/**/*"
46+
47+
# examples folder
48+
# .patterns-example_esp_brookesia_phone_m5stace_core_s3: &patterns-example_esp_brookesia_phone_m5stace_core_s3
49+
# - "examples/esp_idf/esp_brookesia_phone_m5stace_core_s3/**/*"
50+
51+
##############
52+
# if anchors #
53+
##############
54+
.if-protected: &if-protected
55+
if: '($CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_BRANCH =~ /^release\/v/ || $CI_COMMIT_TAG =~ /^v\d+\.\d+(\.\d+)?($|-)/)'
56+
57+
.if-dev-push: &if-dev-push
58+
if: '$CI_COMMIT_REF_NAME != "master" && $CI_COMMIT_BRANCH !~ /^release\/v/ && $CI_COMMIT_TAG !~ /^v\d+\.\d+(\.\d+)?($|-)/ && ($CI_PIPELINE_SOURCE == "push" || $CI_PIPELINE_SOURCE == "merge_request_event")'
59+
60+
##################
61+
# Auto Generated #
62+
##################
63+
.if-trigger-job: &if-trigger-job
64+
if: '$BOT_DYNAMIC_TEST_JOBS && $BOT_DYNAMIC_TEST_JOBS =~ $CI_JOB_NAME'
65+
66+
.if-label-build: &if-label-build
67+
if: '$BOT_LABEL_BUILD || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*build(?:,[^,\n\r]+)*$/i'
68+
69+
.if-label-target_test: &if-label-target_test
70+
if: '$BOT_LABEL_TARGET_TEST || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*target_test(?:,[^,\n\r]+)*$/i'
71+
72+
.if-label-pre_check: &if-label-pre_check
73+
if: '$BOT_LABEL_PRE_CHECK || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*pre_check(?:,[^,\n\r]+)*$/i'
74+
75+
.if_label-deploy: &if-label-deploy
76+
if: '$BOT_LABEL_DEPLOY || $CI_MERGE_REQUEST_LABELS =~ /^(?:[^,\n\r]+,)*deploy(?:,[^,\n\r]+)*$/i'
77+
78+
# rules for test_apps
79+
.rules:build:test_apps_lcd_3wire_spi_rgb:
80+
rules:
81+
- <<: *if-protected
82+
- <<: *if-label-build
83+
- <<: *if-label-target_test
84+
- <<: *if-trigger-job
85+
- <<: *if-dev-push
86+
changes: *patterns-build_system
87+
- <<: *if-dev-push
88+
changes: *patterns-component
89+
- <<: *if-dev-push
90+
changes: *patterns-test_apps_lcd_3wire_spi_rgb
91+
92+
.rules:build:test_apps_lcd_qspi:
93+
rules:
94+
- <<: *if-protected
95+
- <<: *if-label-build
96+
- <<: *if-label-target_test
97+
- <<: *if-trigger-job
98+
- <<: *if-dev-push
99+
changes: *patterns-build_system
100+
- <<: *if-dev-push
101+
changes: *patterns-component
102+
- <<: *if-dev-push
103+
changes: *patterns-test_apps_lcd_qspi
104+
105+
.rules:build:test_apps_lcd_rgb:
106+
rules:
107+
- <<: *if-protected
108+
- <<: *if-label-build
109+
- <<: *if-label-target_test
110+
- <<: *if-trigger-job
111+
- <<: *if-dev-push
112+
changes: *patterns-build_system
113+
- <<: *if-dev-push
114+
changes: *patterns-component
115+
- <<: *if-dev-push
116+
changes: *patterns-test_apps_lcd_rgb
117+
118+
.rules:build:test_apps_lcd_spi:
119+
rules:
120+
- <<: *if-protected
121+
- <<: *if-label-build
122+
- <<: *if-label-target_test
123+
- <<: *if-trigger-job
124+
- <<: *if-dev-push
125+
changes: *patterns-build_system
126+
- <<: *if-dev-push
127+
changes: *patterns-component
128+
- <<: *if-dev-push
129+
changes: *patterns-test_apps_lcd_spi
130+
131+
.rules:build:test_apps_panel:
132+
rules:
133+
- <<: *if-protected
134+
- <<: *if-label-build
135+
- <<: *if-label-target_test
136+
- <<: *if-trigger-job
137+
- <<: *if-dev-push
138+
changes: *patterns-build_system
139+
- <<: *if-dev-push
140+
changes: *patterns-component
141+
- <<: *if-dev-push
142+
changes: *patterns-test_apps_panel
143+
144+
.rules:build:test_apps_touch_i2c:
145+
rules:
146+
- <<: *if-protected
147+
- <<: *if-label-build
148+
- <<: *if-label-target_test
149+
- <<: *if-trigger-job
150+
- <<: *if-dev-push
151+
changes: *patterns-build_system
152+
- <<: *if-dev-push
153+
changes: *patterns-component
154+
- <<: *if-dev-push
155+
changes: *patterns-test_apps_touch_i2c
156+
157+
.rules:build:test_apps_touch_spi:
158+
rules:
159+
- <<: *if-protected
160+
- <<: *if-label-build
161+
- <<: *if-label-target_test
162+
- <<: *if-trigger-job
163+
- <<: *if-dev-push
164+
changes: *patterns-build_system
165+
- <<: *if-dev-push
166+
changes: *patterns-component
167+
- <<: *if-dev-push
168+
changes: *patterns-test_apps_touch_spi
169+
170+
# rules for examples
171+
# .rules:build:example_esp_brookesia_phone_m5stace_core_s3:
172+
# rules:
173+
# - <<: *if-protected
174+
# - <<: *if-label-build
175+
# - <<: *if-label-target_test
176+
# - <<: *if-trigger-job
177+
# - <<: *if-dev-push
178+
# changes: *patterns-component
179+
# - <<: *if-dev-push
180+
# changes: *patterns-example_esp_brookesia_phone_m5stace_core_s3
181+
# - <<: *if-dev-push
182+
# changes: *patterns-build_system

0 commit comments

Comments
 (0)