Skip to content

Commit cb682a7

Browse files
authored
Merge pull request #516 from david-cermak/feat/wifi_remote
New component `esp_wifi_remote`
2 parents 1750a3f + d053d67 commit cb682a7

Some content is hidden

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

45 files changed

+5257
-4
lines changed
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: "esp_wifi_remote: build-tests"
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
types: [opened, synchronize, reopened, labeled]
9+
10+
jobs:
11+
wifi_remote_api_compat:
12+
if: contains(github.event.pull_request.labels.*.name, 'wifi_remote') || github.event_name == 'push'
13+
name: Check API compatibility of WiFi Remote
14+
strategy:
15+
matrix:
16+
idf_ver: ["latest"]
17+
runs-on: ubuntu-20.04
18+
container: espressif/idf:${{ matrix.idf_ver }}
19+
steps:
20+
- name: Checkout esp-protocols
21+
uses: actions/checkout@v3
22+
- name: Check that headers are the same as generated
23+
shell: bash
24+
run: |
25+
${IDF_PATH}/install.sh --enable-pytest
26+
. ${IDF_PATH}/export.sh
27+
cd ./components/esp_wifi_remote/scripts
28+
python generate_and_check.py
29+
30+
build_wifi_remote:
31+
if: contains(github.event.pull_request.labels.*.name, 'wifi_remote') || github.event_name == 'push'
32+
name: Build WiFi Remote
33+
strategy:
34+
matrix:
35+
idf_ver: ["latest"]
36+
test: [ { app: smoke_test, path: "test/smoke_test" }]
37+
runs-on: ubuntu-20.04
38+
container: espressif/idf:${{ matrix.idf_ver }}
39+
steps:
40+
- name: Checkout esp-protocols
41+
uses: actions/checkout@v3
42+
- name: ccache
43+
uses: hendrikmuhs/[email protected]
44+
with:
45+
key: ${{ matrix.idf_ver }}
46+
- name: Build ${{ matrix.test.app }} with IDF-${{ matrix.idf_ver }}
47+
shell: bash
48+
run: |
49+
${IDF_PATH}/install.sh --enable-pytest
50+
. ${IDF_PATH}/export.sh
51+
python ./ci/build_apps.py ./components/esp_wifi_remote/${{matrix.test.path}} -vv --preserve-all

.pre-commit-config.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ repos:
5151
rev: c0013808882a15a0c0c2c1a9b5c903866c53a653
5252
hooks:
5353
- id: astyle_py
54-
args: ['--style=otbs', '--attach-namespaces', '--attach-classes', '--indent=spaces=4', '--convert-tabs', '--align-pointer=name', '--align-reference=name', '--keep-one-line-statements', '--pad-header', '--pad-oper']
54+
args: ['--style=otbs', '--attach-namespaces', '--attach-classes', '--indent=spaces=4', '--convert-tabs', '--align-pointer=name', '--align-reference=name', '--keep-one-line-statements', '--pad-header', '--pad-oper', '--exclude-list=ci/ignore_astyle.txt']
5555
- repo: https://github.com/commitizen-tools/commitizen
5656
rev: v2.42.1
5757
hooks:
@@ -61,8 +61,8 @@ repos:
6161
- repo: local
6262
hooks:
6363
- id: commit message scopes
64-
name: "commit message must be scoped with: mdns, modem, websocket, asio, mqtt_cxx, console, common, eppp"
65-
entry: '\A(?!(feat|fix|ci|bump|test|docs)\((mdns|modem|common|console|websocket|asio|mqtt_cxx|examples|eppp)\)\:)'
64+
name: "commit message must be scoped with: mdns, modem, websocket, asio, mqtt_cxx, console, common, eppp, wifi_remote"
65+
entry: '\A(?!(feat|fix|ci|bump|test|docs)\((mdns|modem|common|console|websocket|asio|mqtt_cxx|examples|eppp|wifi_remote)\)\:)'
6666
language: pygrep
6767
args: [--multiline]
6868
stages: [commit-msg]

ci/changelog.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,13 +83,14 @@ def main():
8383
changelog += '\n### {}\n\n'.format(sections[section])
8484
for it in item:
8585
changelog += '- {}\n'.format(it)
86-
changelog += '\n'
8786
filename = os.path.join(root_path, 'components', component, 'CHANGELOG.md')
8887
# Check if the changelog file exists.
8988
if not os.path.exists(filename):
9089
# File does not exist, create it
9190
with open(filename, 'w') as file:
9291
file.write('# Changelog\n\n')
92+
else:
93+
changelog += '\n'
9394
# insert the actual changelog to the beginning of the file, just after the title (2nd line)
9495
with open(filename, 'r') as orig_changelog:
9596
changelog_title = orig_changelog.readline(

ci/ignore_astyle.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# The below file is generated from esp_wifi_types_native.h in IDF, which doesn't follow atyle
2+
components/esp_wifi_remote/include/esp_wifi_types_native.h

components/esp_wifi_remote/.cz.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
commitizen:
3+
bump_message: 'bump(wifi_remote): $current_version -> $new_version'
4+
pre_bump_hooks: python ../../ci/changelog.py esp_wifi_remote
5+
tag_format: wifi_remote-v$version
6+
version: 0.1.12
7+
version_files:
8+
- idf_component.yml
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changelog
2+
3+
## [0.1.12](https://github.com/espressif/esp-protocols/commits/wifi_remote-v0.1.12)
4+
5+
### Features
6+
7+
- Added generation step for wifi_remote based on IDF ([dfb00358](https://github.com/espressif/esp-protocols/commit/dfb00358))
8+
- Move to esp-protocols ([edc3c2d](https://github.com/espressif/esp-protocols/commit/edc3c2d))
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
if(NOT CONFIG_ESP_WIFI_ENABLED)
2+
set(src_wifi_is_remote esp_wifi_remote.c esp_wifi_with_remote.c)
3+
endif()
4+
5+
idf_component_register(INCLUDE_DIRS include
6+
SRCS ${src_wifi_is_remote}
7+
esp_wifi_remote_net.c
8+
esp_wifi_remote_weak.c
9+
REQUIRES esp_event esp_netif
10+
PRIV_REQUIRES esp_wifi)
11+
12+
idf_component_optional_requires(PRIVATE esp_hosted)
13+
14+
idf_component_get_property(wifi esp_wifi COMPONENT_LIB)
15+
target_link_libraries(${wifi} PUBLIC ${COMPONENT_LIB})

0 commit comments

Comments
 (0)