Skip to content

Commit bccbedd

Browse files
committed
Upload to the ESP Registry and support to build on the esp-idf
1 parent 2ca1b78 commit bccbedd

26 files changed

+407
-80
lines changed

.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

.flake8

Lines changed: 141 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,141 @@
1+
[flake8]
2+
3+
select =
4+
# Full lists are given in order to suppress all errors from other plugins
5+
# Full list of pyflakes error codes:
6+
F401, # module imported but unused
7+
F402, # import module from line N shadowed by loop variable
8+
F403, # 'from module import *' used; unable to detect undefined names
9+
F404, # future import(s) name after other statements
10+
F405, # name may be undefined, or defined from star imports: module
11+
F406, # 'from module import *' only allowed at module level
12+
F407, # an undefined __future__ feature name was imported
13+
F601, # dictionary key name repeated with different values
14+
F602, # dictionary key variable name repeated with different values
15+
F621, # too many expressions in an assignment with star-unpacking
16+
F622, # two or more starred expressions in an assignment (a, *b, *c = d)
17+
F631, # assertion test is a tuple, which are always True
18+
F701, # a break statement outside of a while or for loop
19+
F702, # a continue statement outside of a while or for loop
20+
F703, # a continue statement in a finally block in a loop
21+
F704, # a yield or yield from statement outside of a function
22+
F705, # a return statement with arguments inside a generator
23+
F706, # a return statement outside of a function/method
24+
F707, # an except: block as not the last exception handler
25+
F721, F722, # doctest syntax error syntax error in forward type annotation
26+
F811, # redefinition of unused name from line N
27+
F812, # list comprehension redefines name from line N
28+
F821, # undefined name name
29+
F822, # undefined name name in __all__
30+
F823, # local variable name referenced before assignment
31+
F831, # duplicate argument name in function definition
32+
F841, # local variable name is assigned to but never used
33+
F901, # raise NotImplemented should be raise NotImplementedError
34+
35+
# Full list of pycodestyle violations:
36+
E101, # indentation contains mixed spaces and tabs
37+
E111, # indentation is not a multiple of four
38+
E112, # expected an indented block
39+
E113, # unexpected indentation
40+
E114, # indentation is not a multiple of four (comment)
41+
E115, # expected an indented block (comment)
42+
E116, # unexpected indentation (comment)
43+
E121, # continuation line under-indented for hanging indent
44+
E122, # continuation line missing indentation or outdented
45+
E123, # closing bracket does not match indentation of opening bracket's line
46+
E124, # closing bracket does not match visual indentation
47+
E125, # continuation line with same indent as next logical line
48+
E126, # continuation line over-indented for hanging indent
49+
E127, # continuation line over-indented for visual indent
50+
E128, # continuation line under-indented for visual indent
51+
E129, # visually indented line with same indent as next logical line
52+
E131, # continuation line unaligned for hanging indent
53+
E133, # closing bracket is missing indentation
54+
E201, # whitespace after '('
55+
E202, # whitespace before ')'
56+
E203, # whitespace before ':'
57+
E211, # whitespace before '('
58+
E221, # multiple spaces before operator
59+
E222, # multiple spaces after operator
60+
E223, # tab before operator
61+
E224, # tab after operator
62+
E225, # missing whitespace around operator
63+
E226, # missing whitespace around arithmetic operator
64+
E227, # missing whitespace around bitwise or shift operator
65+
E228, # missing whitespace around modulo operator
66+
E231, # missing whitespace after ',', ';', or ':'
67+
E241, # multiple spaces after ','
68+
E242, # tab after ','
69+
E251, # unexpected spaces around keyword / parameter equals
70+
E261, # at least two spaces before inline comment
71+
E262, # inline comment should start with '# '
72+
E265, # block comment should start with '# '
73+
E266, # too many leading '#' for block comment
74+
E271, # multiple spaces after keyword
75+
E272, # multiple spaces before keyword
76+
E273, # tab after keyword
77+
E274, # tab before keyword
78+
E275, # missing whitespace after keyword
79+
E301, # expected 1 blank line, found 0
80+
E302, # expected 2 blank lines, found 0
81+
E303, # too many blank lines
82+
E304, # blank lines found after function decorator
83+
E305, # expected 2 blank lines after end of function or class
84+
E306, # expected 1 blank line before a nested definition
85+
E401, # multiple imports on one line
86+
E402, # module level import not at top of file
87+
E501, # line too long (82 > 79 characters)
88+
E502, # the backslash is redundant between brackets
89+
E701, # multiple statements on one line (colon)
90+
E702, # multiple statements on one line (semicolon)
91+
E703, # statement ends with a semicolon
92+
E704, # multiple statements on one line (def)
93+
E711, # comparison to None should be 'if cond is None:'
94+
E712, # comparison to True should be 'if cond is True:' or 'if cond:'
95+
E713, # test for membership should be 'not in'
96+
E714, # test for object identity should be 'is not'
97+
E721, # do not compare types, use 'isinstance()'
98+
E722, # do not use bare except, specify exception instead
99+
E731, # do not assign a lambda expression, use a def
100+
E741, # do not use variables named 'l', 'O', or 'I'
101+
E742, # do not define classes named 'l', 'O', or 'I'
102+
E743, # do not define functions named 'l', 'O', or 'I'
103+
E901, # SyntaxError or IndentationError
104+
E902, # IOError
105+
W191, # indentation contains tabs
106+
W291, # trailing whitespace
107+
W292, # no newline at end of file
108+
W293, # blank line contains whitespace
109+
W391, # blank line at end of file
110+
W503, # line break before binary operator
111+
W504, # line break after binary operator
112+
W505, # doc line too long (82 > 79 characters)
113+
W601, # .has_key() is deprecated, use 'in'
114+
W602, # deprecated form of raising exception
115+
W603, # '<>' is deprecated, use '!='
116+
W604, # backticks are deprecated, use 'repr()'
117+
W605, # invalid escape sequence 'x'
118+
W606, # 'async' and 'await' are reserved keywords starting with Python 3.7
119+
120+
# Full list of flake8 violations
121+
E999, # failed to compile a file into an Abstract Syntax Tree for the plugins that require it
122+
123+
# Full list of mccabe violations
124+
C901 # complexity value provided by the user
125+
126+
ignore =
127+
E221, # multiple spaces before operator
128+
E231, # missing whitespace after ',', ';', or ':'
129+
E241, # multiple spaces after ','
130+
W503, # line break before binary operator
131+
W504 # line break after binary operator
132+
133+
max-line-length = 160
134+
135+
show_source = True
136+
137+
statistics = True
138+
139+
exclude =
140+
.git,
141+
__pycache__,

.github/scripts/check_versions.sh renamed to .github/scripts/check_lib_versions.sh

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/build_test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
build:
1010
strategy:
1111
matrix:
12-
idf_ver: ["v4.4.5", "v5.0", "v5.1"]
12+
idf_ver: ["release-v5.1", "release-v5.2", "release-v5.3"]
1313
idf_target: ["esp32", "esp32s2", "esp32c3", "esp32s3"]
1414
runs-on: ubuntu-20.04
1515
container: espressif/idf:${{ matrix.idf_ver }}
@@ -25,4 +25,4 @@ jobs:
2525
export PEDANTIC_FLAGS="-DIDF_CI_BUILD -Werror -Werror=deprecated-declarations -Werror=unused-variable -Werror=unused-but-set-variable -Werror=unused-function"
2626
export EXTRA_CFLAGS="${PEDANTIC_FLAGS} -Wstrict-prototypes"
2727
export EXTRA_CXXFLAGS="${PEDANTIC_FLAGS}"
28-
idf.py build
28+
idf.py build

.github/workflows/check_versions.yml renamed to .github/workflows/check_lib_versions.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
name: Check Versions
1+
name: Check Library Versions
22

33
on:
44
pull_request:
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_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 }}

.github/workflows/pre-commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,4 @@ jobs:
1111
steps:
1212
- uses: actions/checkout@v2
1313
- uses: actions/setup-python@v2
14-
- uses: pre-commit/action@v2.0.3
14+
- uses: pre-commit/action@v2.0.3
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_IO_Expander"
19+
namespace: "espressif"
20+
api_token: ${{ secrets.IDF_COMPONENT_API_TOKEN }}

0 commit comments

Comments
 (0)