Skip to content

Commit f74f6a7

Browse files
committed
feat(repo): support build on the esp-idf
1 parent a66b165 commit f74f6a7

File tree

238 files changed

+8788
-1845
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

238 files changed

+8788
-1845
lines changed

.build-rules.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
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+
# Test apps
7+
test_apps/lcd/3wire_spi_rgb:
8+
disable:
9+
- if: SOC_LCD_RGB_SUPPORTED != 1
10+
- if: IDF_TARGET == "esp32p4"
11+
temporary: true
12+
reason: not ready
13+
14+
test_apps/lcd/qspi:
15+
disable:
16+
- if: SOC_GPSPI_SUPPORTED != 1
17+
18+
test_apps/lcd/rgb:
19+
disable:
20+
- if: SOC_LCD_RGB_SUPPORTED != 1
21+
- if: IDF_TARGET == "esp32p4"
22+
temporary: true
23+
reason: not ready
24+
25+
test_apps/lcd/spi:
26+
disable:
27+
- if: SOC_GPSPI_SUPPORTED != 1
28+
29+
test_apps/lvgl_port:
30+
enable:
31+
- if: INCLUDE_DEFAULT == 1
32+
33+
test_apps/panel:
34+
enable:
35+
- if: INCLUDE_DEFAULT == 1
36+
37+
test_apps/touch/i2c:
38+
disable:
39+
- if: SOC_I2C_SUPPORTED != 1
40+
41+
test_apps/touch/spi:
42+
disable:
43+
- if: SOC_GPSPI_SUPPORTED != 1
44+
45+
# Examples
46+
# examples/esp_idf/esp_brookesia_phone_m5stace_core_s3:
47+
# enable:
48+
# - if: IDF_TARGET in ["esp32s3"]

.codespellrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[codespell]
2+
skip = ./src/touch/base/esp_lcd_touch_xpt2046.c

.github/scripts/check_lib_versions.sh

100644100755
Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,6 @@ check_version_format() {
1313
return 0
1414
}
1515

16-
if [ $# -lt 1 ]; then
17-
latest_version="0.0.0"
18-
echo "Don't get the lastest version, use \"0.0.0\" as default"
19-
else
20-
# Get the first input parameter as the version to be compared
21-
latest_version="$1"
22-
# Check the version format
23-
check_version_format "${latest_version}"
24-
result=$?
25-
if [ ${result} -ne 0 ]; then
26-
echo "The latest release version (${latest_version}) format is incorrect."
27-
exit 1
28-
fi
29-
fi
30-
31-
# Specify the directory path
32-
target_directory="./"
33-
34-
echo "Checking directory: ${target_directory}"
35-
3616
# Function: Check if a file exists
3717
# Input parameters: $1 The file to check
3818
# Return value: 0 if the file exists, 1 if the file does not exist
@@ -68,6 +48,32 @@ compare_versions() {
6848
return 0
6949
}
7050

51+
# Get the latest release version
52+
latest_version="v0.0.0"
53+
for i in "$@"; do
54+
case $i in
55+
--latest_version=*)
56+
latest_version="${i#*=}"
57+
shift
58+
;;
59+
*)
60+
;;
61+
esac
62+
done
63+
# Check the version format
64+
check_version_format "${latest_version}"
65+
result=$?
66+
if [ ${result} -ne 0 ]; then
67+
echo "The latest release version (${latest_version}) format is incorrect."
68+
exit 1
69+
fi
70+
echo "Get the latest release version: ${latest_version}"
71+
72+
# Specify the directory path
73+
target_directory="./"
74+
75+
echo "Checking directory: ${target_directory}"
76+
7177
echo "Checking file: library.properties"
7278
# Check if "library.properties" file exists
7379
check_file_exists "${target_directory}/library.properties"

.github/workflows/check_lib_versions.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
types: [opened, reopened, synchronize]
66

77
jobs:
8-
check_versions:
8+
check_lib_versions:
99
runs-on: ubuntu-latest
1010
steps:
1111
- uses: actions/checkout@v2
@@ -26,5 +26,4 @@ jobs:
2626
echo "prerelease: ${{ steps.last_release.outputs.prerelease }}"
2727
echo "url: ${{ steps.last_release.outputs.url }}"
2828
- name: Check & Compare versions
29-
run: bash ./.github/scripts/check_lib_versions.sh ${{ steps.last_release.outputs.tag_name }}
30-
29+
run: bash ./.github/scripts/check_lib_versions.sh --latest_version=${{ steps.last_release.outputs.tag_name }}

.github/workflows/issue_comment.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Sync issue comments to JIRA
2+
3+
# This workflow will be triggered when new issue comment is created (including PR comments)
4+
on: issue_comment
5+
6+
# Limit to single concurrent run for workflows which can create Jira issues.
7+
# Same concurrency group is used in new_issues.yml
8+
concurrency: jira_issues
9+
10+
jobs:
11+
sync_issue_comments_to_jira:
12+
name: Sync Issue Comments to Jira
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Sync issue comments to JIRA
17+
uses: espressif/github-actions/sync_issues_to_jira@master
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
JIRA_PASS: ${{ secrets.JIRA_PASS }}
21+
JIRA_PROJECT: ${{ secrets.JIRA_PROJECT }}
22+
JIRA_COMPONENT: ${{ secrets.JIRA_COMPONENT }}
23+
JIRA_URL: ${{ secrets.JIRA_URL }}
24+
JIRA_USER: ${{ secrets.JIRA_USER }}

.github/workflows/new_issues.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Sync issues to Jira
2+
3+
# This workflow will be triggered when a new issue is opened
4+
on: issues
5+
6+
# Limit to single concurrent run for workflows which can create Jira issues.
7+
# Same concurrency group is used in issue_comment.yml
8+
concurrency: jira_issues
9+
10+
jobs:
11+
sync_issues_to_jira:
12+
name: Sync issues to Jira
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Sync GitHub issues to Jira project
17+
uses: espressif/github-actions/sync_issues_to_jira@master
18+
env:
19+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
20+
JIRA_PASS: ${{ secrets.JIRA_PASS }}
21+
JIRA_PROJECT: ${{ secrets.JIRA_PROJECT }}
22+
JIRA_COMPONENT: ${{ secrets.JIRA_COMPONENT }}
23+
JIRA_URL: ${{ secrets.JIRA_URL }}
24+
JIRA_USER: ${{ secrets.JIRA_USER }}

.github/workflows/new_prs.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Sync remain PRs to Jira
2+
3+
# This workflow will be triggered every hour, to sync remaining PRs (i.e. PRs with zero comment) to Jira project
4+
# Note that, PRs can also get synced when new PR comment is created
5+
on:
6+
schedule:
7+
- cron: "0 * * * *"
8+
9+
# Limit to single concurrent run for workflows which can create Jira issues.
10+
# Same concurrency group is used in issue_comment.yml
11+
concurrency: jira_issues
12+
13+
jobs:
14+
sync_prs_to_jira:
15+
name: Sync PRs to Jira
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v2
19+
- name: Sync PRs to Jira project
20+
uses: espressif/github-actions/sync_issues_to_jira@master
21+
with:
22+
cron_job: true
23+
env:
24+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25+
JIRA_PASS: ${{ secrets.JIRA_PASS }}
26+
JIRA_PROJECT: ${{ secrets.JIRA_PROJECT }}
27+
JIRA_COMPONENT: ${{ secrets.JIRA_COMPONENT }}
28+
JIRA_URL: ${{ secrets.JIRA_URL }}
29+
JIRA_USER: ${{ secrets.JIRA_USER }}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Push components to Espressif Component Service
2+
3+
on:
4+
workflow_dispatch:
5+
release:
6+
types: [published]
7+
8+
jobs:
9+
upload_components:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@master
13+
with:
14+
submodules: 'recursive'
15+
- name: Upload components to component service
16+
uses: espressif/upload-components-ci-action@v1
17+
with:
18+
name: "ESP32_Display_Panel"
19+
namespace: "espressif"
20+
api_token: ${{ secrets.IDF_COMPONENT_API_TOKEN }}

.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: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
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.1
50+
- IMAGE: espressif/idf:release-v5.2
51+
- IMAGE: espressif/idf:release-v5.3
52+
53+
# Test apps
54+
build_test_apps_lcd_3wire_spi_rgb:
55+
extends:
56+
- .build_examples_template
57+
- .build_idf_active_release_version
58+
- .rules:build:test_apps_lcd_3wire_spi_rgb
59+
variables:
60+
EXAMPLE_DIR: test_apps/lcd/3wire_spi_rgb
61+
62+
build_test_apps_lcd_qspi:
63+
extends:
64+
- .build_examples_template
65+
- .build_idf_active_release_version
66+
- .rules:build:test_apps_lcd_qspi
67+
variables:
68+
EXAMPLE_DIR: test_apps/lcd/qspi
69+
70+
build_test_apps_lcd_rgb:
71+
extends:
72+
- .build_examples_template
73+
- .build_idf_active_release_version
74+
- .rules:build:test_apps_lcd_rgb
75+
variables:
76+
EXAMPLE_DIR: test_apps/lcd/rgb
77+
78+
build_test_apps_lcd_spi:
79+
extends:
80+
- .build_examples_template
81+
- .build_idf_active_release_version
82+
- .rules:build:test_apps_lcd_spi
83+
variables:
84+
EXAMPLE_DIR: test_apps/lcd/spi
85+
86+
build_test_apps_lvgl_port:
87+
extends:
88+
- .build_examples_template
89+
- .build_idf_active_release_version
90+
- .rules:build:test_apps_lvgl_port
91+
variables:
92+
EXAMPLE_DIR: test_apps/lvgl_port
93+
94+
build_test_apps_panel:
95+
extends:
96+
- .build_examples_template
97+
- .build_idf_active_release_version
98+
- .rules:build:test_apps_panel
99+
variables:
100+
EXAMPLE_DIR: test_apps/panel
101+
102+
build_test_apps_touch_i2c:
103+
extends:
104+
- .build_examples_template
105+
- .build_idf_active_release_version
106+
- .rules:build:test_apps_touch_i2c
107+
variables:
108+
EXAMPLE_DIR: test_apps/touch/i2c
109+
110+
build_test_apps_touch_spi:
111+
extends:
112+
- .build_examples_template
113+
- .build_idf_active_release_version
114+
- .rules:build:test_apps_touch_spi
115+
variables:
116+
EXAMPLE_DIR: test_apps/touch/spi
117+
118+
# Examples
119+
# build_example_esp_brookesia_phone_m5stace_core_s3:
120+
# extends:
121+
# - .build_examples_template
122+
# - .build_esp32_s3_idf_release_version
123+
# - .rules:build:example_esp_brookesia_phone_m5stace_core_s3
124+
# variables:
125+
# EXAMPLE_DIR: examples/esp_idf/esp_brookesia_phone_m5stace_core_s3

0 commit comments

Comments
 (0)