Skip to content

Commit

Permalink
Merge pull request #660 from david-cermak/feat/wifi_remote_flat
Browse files Browse the repository at this point in the history
[wifi_remote]: Make flat version structure across IDF releases
  • Loading branch information
david-cermak authored Sep 26, 2024
2 parents 8475adf + c454ec0 commit d6347a9
Show file tree
Hide file tree
Showing 41 changed files with 4,608 additions and 829 deletions.
41 changes: 38 additions & 3 deletions .github/workflows/wifi_remote__build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
name: Check API compatibility of WiFi Remote
strategy:
matrix:
idf_ver: ["latest"]
idf_ver: ["latest", "release-v5.3"]
runs-on: ubuntu-20.04
container: espressif/idf:${{ matrix.idf_ver }}
steps:
Expand All @@ -24,15 +24,16 @@ jobs:
run: |
. ${IDF_PATH}/export.sh
pip install idf-component-manager idf-build-apps --upgrade
cp -r ./components/esp_wifi_remote ./components/esp_wifi_remote_base
cd ./components/esp_wifi_remote/scripts
python generate_and_check.py
python generate_and_check.py --base-dir ../../esp_wifi_remote_base
build_wifi_remote:
if: contains(github.event.pull_request.labels.*.name, 'wifi_remote') || github.event_name == 'push'
name: Build WiFi Remote Test
strategy:
matrix:
idf_ver: ["latest"]
idf_ver: ["latest", "release-v5.3"]
test: [ { app: smoke_test, path: "test/smoke_test" }]
runs-on: ubuntu-20.04
container: espressif/idf:${{ matrix.idf_ver }}
Expand All @@ -48,6 +49,7 @@ jobs:
run: |
. ${IDF_PATH}/export.sh
pip install idf-component-manager idf-build-apps --upgrade
python ./components/esp_wifi_remote/scripts/generate_slave_configs.py ./components/esp_wifi_remote/${{matrix.test.path}}
python ./ci/build_apps.py ./components/esp_wifi_remote/${{matrix.test.path}} -vv --preserve-all
build_wifi_remote_example:
Expand Down Expand Up @@ -75,3 +77,36 @@ jobs:
. ${IDF_PATH}/export.sh
pip install idf-component-manager idf-build-apps --upgrade
python ./ci/build_apps.py ./components/esp_wifi_remote/${{matrix.example.path}} -vv --preserve-all
build_idf_examples_with_wifi_remote:
if: contains(github.event.pull_request.labels.*.name, 'wifi_remote') || github.event_name == 'push'
name: Build IDF examples with WiFi Remote
strategy:
matrix:
idf_ver: ["latest", "release-v5.3"]
idf_target: ["esp32p4", "esp32h2", "esp32s3"]
test: [ { app: idf_mqtt_example, path: "examples/protocols/mqtt/tcp" }]
runs-on: ubuntu-20.04
container: espressif/idf:${{ matrix.idf_ver }}
steps:
- name: Checkout esp-protocols
uses: actions/checkout@v3
- name: ccache
uses: hendrikmuhs/[email protected]
with:
key: ${{ matrix.idf_ver }}
- name: Build ${{ matrix.test.app }} with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }}
shell: bash
run: |
. ${IDF_PATH}/export.sh
pip install idf-component-manager idf-build-apps --upgrade
export OVERRIDE_PATH=`pwd`/components/esp_wifi_remote
echo ${OVERRIDE_PATH}
sed -i '/espressif\/esp_wifi_remote:/a \ \ \ \ override_path: "${OVERRIDE_PATH}"' ${IDF_PATH}/${{matrix.test.path}}/main/idf_component.yml
cat ${IDF_PATH}/${{matrix.test.path}}/main/idf_component.yml
export PEDANTIC_FLAGS="-DIDF_CI_BUILD -Werror -Werror=deprecated-declarations -Werror=unused-variable -Werror=unused-but-set-variable -Werror=unused-function"
export EXTRA_CFLAGS="${PEDANTIC_FLAGS} -Wstrict-prototypes"
export EXTRA_CXXFLAGS="${PEDANTIC_FLAGS}"
cd ${IDF_PATH}/${{matrix.test.path}}
idf-build-apps find --config sdkconfig.ci* -vv --target ${{ matrix.idf_target }}
idf-build-apps build --config sdkconfig.ci* -vv --target ${{ matrix.idf_target }}
8 changes: 5 additions & 3 deletions components/esp_wifi_remote/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
set(IDF_VER_DIR "idf_v${IDF_VERSION_MAJOR}.${IDF_VERSION_MINOR}")

if(NOT CONFIG_ESP_WIFI_ENABLED)
set(src_wifi_is_remote esp_wifi_remote.c esp_wifi_with_remote.c esp_wifi_remote_net.c)
set(src_wifi_is_remote esp_wifi_remote.c ${IDF_VER_DIR}/esp_wifi_with_remote.c esp_wifi_remote_net.c)
endif()

if(CONFIG_ESP_WIFI_REMOTE_LIBRARY_EPPP)
set(src_wifi_remote_eppp eppp/wifi_remote_rpc_client.cpp eppp/wifi_remote_rpc_server.cpp eppp/eppp_init.c)
else()
set(src_wifi_remote_weak esp_wifi_remote_weak.c)
set(src_wifi_remote_weak ${IDF_VER_DIR}/esp_wifi_remote_weak.c)
endif()

idf_component_register(INCLUDE_DIRS include
idf_component_register(INCLUDE_DIRS include ${IDF_VER_DIR}/include
SRCS ${src_wifi_remote_weak}
${src_wifi_remote_eppp}
${src_wifi_is_remote}
Expand Down
Loading

0 comments on commit d6347a9

Please sign in to comment.