Skip to content

Commit dfb0035

Browse files
committed
feat(wifi_remote): Added generation step for wifi_remote based on IDF
1 parent edc3c2d commit dfb0035

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

+4887
-658
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: 1 addition & 1 deletion
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:

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: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,15 @@
11
if(NOT CONFIG_ESP_WIFI_ENABLED)
2-
set(src_wifi_is_remote esp_wifi_remote.c)
2+
set(src_wifi_is_remote esp_wifi_remote.c esp_wifi_with_remote.c)
33
endif()
44

55
idf_component_register(INCLUDE_DIRS include
6-
SRCS wifi_remote_rpc.c wifi_remote_net.c wifi_remote_init.c ${src_wifi_is_remote}
6+
SRCS ${src_wifi_is_remote}
7+
esp_wifi_remote_net.c
8+
esp_wifi_remote_weak.c
79
REQUIRES esp_event esp_netif
8-
PRIV_REQUIRES esp_wifi esp_hosted)
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)