mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-30 02:37:31 +02:00
Merge pull request #454 from gabsuren/modem/latest_version
feat(modem): host test support of the latest ESP-IDF release (IDF-7828)
This commit is contained in:
12
.github/workflows/asio__build-target-test.yml
vendored
12
.github/workflows/asio__build-target-test.yml
vendored
@ -16,13 +16,13 @@ jobs:
|
|||||||
idf_ver: ["latest", "release-v5.0", "release-v5.1"]
|
idf_ver: ["latest", "release-v5.0", "release-v5.1"]
|
||||||
idf_target: ["esp32", "esp32s2"]
|
idf_target: ["esp32", "esp32s2"]
|
||||||
example: ["asio_chat", "async_request", "socks4", "ssl_client_server", "tcp_echo_server", "udp_echo_server"]
|
example: ["asio_chat", "async_request", "socks4", "ssl_client_server", "tcp_echo_server", "udp_echo_server"]
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
container: espressif/idf:${{ matrix.idf_ver }}
|
container: espressif/idf:${{ matrix.idf_ver }}
|
||||||
env:
|
env:
|
||||||
TEST_DIR: components/asio/examples
|
TEST_DIR: components/asio/examples
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout esp-protocols
|
- name: Checkout esp-protocols
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: Build ${{ matrix.example }} with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }}
|
- name: Build ${{ matrix.example }} with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }}
|
||||||
@ -43,7 +43,7 @@ jobs:
|
|||||||
run: |
|
run: |
|
||||||
. ${IDF_PATH}/export.sh
|
. ${IDF_PATH}/export.sh
|
||||||
esptool.py --chip ${{ matrix.idf_target }} merge_bin --fill-flash-size 4MB -o flash_image.bin @flash_args
|
esptool.py --chip ${{ matrix.idf_target }} merge_bin --fill-flash-size 4MB -o flash_image.bin @flash_args
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: examples_app_bin_${{ matrix.idf_target }}_${{ matrix.idf_ver }}_${{ matrix.example }}
|
name: examples_app_bin_${{ matrix.idf_target }}_${{ matrix.idf_ver }}_${{ matrix.example }}
|
||||||
path: |
|
path: |
|
||||||
@ -76,8 +76,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Clear repository
|
- name: Clear repository
|
||||||
run: sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
|
run: sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: examples_app_bin_${{ matrix.idf_target }}_${{ matrix.idf_ver }}_${{ matrix.example }}
|
name: examples_app_bin_${{ matrix.idf_target }}_${{ matrix.idf_ver }}_${{ matrix.example }}
|
||||||
path: ${{ env.TEST_DIR }}/${{ matrix.example }}/build
|
path: ${{ env.TEST_DIR }}/${{ matrix.example }}/build
|
||||||
@ -93,7 +93,7 @@ jobs:
|
|||||||
working-directory: ${{ env.TEST_DIR }}/${{ matrix.example }}
|
working-directory: ${{ env.TEST_DIR }}/${{ matrix.example }}
|
||||||
run: |
|
run: |
|
||||||
python -m pytest --log-cli-level DEBUG --junit-xml=./examples_results_${{ matrix.idf_target }}_${{ matrix.idf_ver }}_${{ matrix.config }}.xml --target=${{ matrix.idf_target }}
|
python -m pytest --log-cli-level DEBUG --junit-xml=./examples_results_${{ matrix.idf_target }}_${{ matrix.idf_ver }}_${{ matrix.config }}.xml --target=${{ matrix.idf_target }}
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
name: examples_results_${{ matrix.idf_target }}_${{ matrix.idf_ver }}_${{ matrix.example }}
|
name: examples_results_${{ matrix.idf_target }}_${{ matrix.idf_ver }}_${{ matrix.example }}
|
||||||
|
@ -16,11 +16,11 @@ jobs:
|
|||||||
idf_ver: ["latest", "release-v5.0"]
|
idf_ver: ["latest", "release-v5.0"]
|
||||||
idf_target: ["esp32"]
|
idf_target: ["esp32"]
|
||||||
test: [ { app: ifconfig-basic, path: "components/console_cmd_ifconfig/examples"}]
|
test: [ { app: ifconfig-basic, path: "components/console_cmd_ifconfig/examples"}]
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
container: espressif/idf:${{ matrix.idf_ver }}
|
container: espressif/idf:${{ matrix.idf_ver }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout esp-protocols
|
- name: Checkout esp-protocols
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: Build ${{ matrix.test.app }} with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }}
|
- name: Build ${{ matrix.test.app }} with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }}
|
||||||
|
@ -16,11 +16,11 @@ jobs:
|
|||||||
idf_ver: ["latest", "release-v5.0"]
|
idf_ver: ["latest", "release-v5.0"]
|
||||||
idf_target: ["esp32"]
|
idf_target: ["esp32"]
|
||||||
test: [ { app: ping-basic, path: "components/console_cmd_ping/examples" }]
|
test: [ { app: ping-basic, path: "components/console_cmd_ping/examples" }]
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
container: espressif/idf:${{ matrix.idf_ver }}
|
container: espressif/idf:${{ matrix.idf_ver }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout esp-protocols
|
- name: Checkout esp-protocols
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: Build ${{ matrix.test.app }} with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }}
|
- name: Build ${{ matrix.test.app }} with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }}
|
||||||
|
@ -16,11 +16,11 @@ jobs:
|
|||||||
idf_ver: ["latest", "release-v5.0"]
|
idf_ver: ["latest", "release-v5.0"]
|
||||||
idf_target: ["esp32"]
|
idf_target: ["esp32"]
|
||||||
test: [ { app: wifi-basic, path: "components/console_cmd_wifi/examples" }]
|
test: [ { app: wifi-basic, path: "components/console_cmd_wifi/examples" }]
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
container: espressif/idf:${{ matrix.idf_ver }}
|
container: espressif/idf:${{ matrix.idf_ver }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout esp-protocols
|
- name: Checkout esp-protocols
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: Build ${{ matrix.test.app }} with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }}
|
- name: Build ${{ matrix.test.app }} with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }}
|
||||||
|
@ -16,11 +16,11 @@ jobs:
|
|||||||
idf_ver: ["latest", "release-v5.0"]
|
idf_ver: ["latest", "release-v5.0"]
|
||||||
idf_target: ["esp32"]
|
idf_target: ["esp32"]
|
||||||
test: [ { app: console_basic, path: "components/console_simple_init/examples" }]
|
test: [ { app: console_basic, path: "components/console_simple_init/examples" }]
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
container: espressif/idf:${{ matrix.idf_ver }}
|
container: espressif/idf:${{ matrix.idf_ver }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout esp-protocols
|
- name: Checkout esp-protocols
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: Build ${{ matrix.test.app }} with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }}
|
- name: Build ${{ matrix.test.app }} with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }}
|
||||||
|
@ -14,11 +14,11 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
idf_ver: ["latest", "release-v5.1"]
|
idf_ver: ["latest", "release-v5.1"]
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
container: espressif/idf:${{ matrix.idf_ver }}
|
container: espressif/idf:${{ matrix.idf_ver }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout esp-protocols
|
- name: Checkout esp-protocols
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Build with IDF-${{ matrix.idf_ver }}
|
- name: Build with IDF-${{ matrix.idf_ver }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@ -33,11 +33,11 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
idf_ver: ["latest"]
|
idf_ver: ["latest"]
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
container: espressif/idf:${{ matrix.idf_ver }}
|
container: espressif/idf:${{ matrix.idf_ver }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout esp-protocols
|
- name: Checkout esp-protocols
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Build with IDF-${{ matrix.idf_ver }}
|
- name: Build with IDF-${{ matrix.idf_ver }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
|
12
.github/workflows/mdns__build-target-test.yml
vendored
12
.github/workflows/mdns__build-target-test.yml
vendored
@ -15,11 +15,11 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
idf_ver: ["latest", "release-v5.0"]
|
idf_ver: ["latest", "release-v5.0"]
|
||||||
test: [ { app: example, path: "examples/query_advertise" }, { app: unit_test, path: "tests/unit_test" }, { app: test_app, path: "tests/test_apps" } ]
|
test: [ { app: example, path: "examples/query_advertise" }, { app: unit_test, path: "tests/unit_test" }, { app: test_app, path: "tests/test_apps" } ]
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
container: espressif/idf:${{ matrix.idf_ver }}
|
container: espressif/idf:${{ matrix.idf_ver }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout esp-protocols
|
- name: Checkout esp-protocols
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
- name: Build ${{ matrix.test.app }} with IDF-${{ matrix.idf_ver }}
|
- name: Build ${{ matrix.test.app }} with IDF-${{ matrix.idf_ver }}
|
||||||
shell: bash
|
shell: bash
|
||||||
run: |
|
run: |
|
||||||
@ -34,7 +34,7 @@ jobs:
|
|||||||
$GITHUB_WORKSPACE/ci/clean_build_artifacts.sh `pwd`/$dir
|
$GITHUB_WORKSPACE/ci/clean_build_artifacts.sh `pwd`/$dir
|
||||||
zip -qur artifacts.zip $dir
|
zip -qur artifacts.zip $dir
|
||||||
done
|
done
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: mdns_bin_esp32_${{ matrix.idf_ver }}_${{ matrix.test.app }}
|
name: mdns_bin_esp32_${{ matrix.idf_ver }}_${{ matrix.test.app }}
|
||||||
path: components/mdns/${{ matrix.test.path }}/artifacts.zip
|
path: components/mdns/${{ matrix.test.path }}/artifacts.zip
|
||||||
@ -58,8 +58,8 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Clear repository
|
- name: Clear repository
|
||||||
run: sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
|
run: sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: mdns_bin_${{ matrix.idf_target }}_${{ matrix.idf_ver }}_${{ matrix.test.app }}
|
name: mdns_bin_${{ matrix.idf_target }}_${{ matrix.idf_ver }}_${{ matrix.test.app }}
|
||||||
path: components/mdns/${{ matrix.test.path }}/ci/
|
path: components/mdns/${{ matrix.test.path }}/ci/
|
||||||
@ -77,7 +77,7 @@ jobs:
|
|||||||
mv $dir build
|
mv $dir build
|
||||||
python -m pytest --log-cli-level DEBUG --junit-xml=./results_${{ matrix.test.app }}_${{ matrix.idf_target }}_${{ matrix.idf_ver }}_${dir#"ci/build_"}.xml --target=${{ matrix.idf_target }}
|
python -m pytest --log-cli-level DEBUG --junit-xml=./results_${{ matrix.test.app }}_${{ matrix.idf_target }}_${{ matrix.idf_ver }}_${dir#"ci/build_"}.xml --target=${{ matrix.idf_target }}
|
||||||
done
|
done
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
name: results_${{ matrix.test.app }}_${{ matrix.idf_target }}_${{ matrix.idf_ver }}.xml
|
name: results_${{ matrix.test.app }}_${{ matrix.idf_target }}_${{ matrix.idf_ver }}.xml
|
||||||
|
8
.github/workflows/mdns__host-tests.yml
vendored
8
.github/workflows/mdns__host-tests.yml
vendored
@ -11,12 +11,12 @@ jobs:
|
|||||||
host_test_mdns:
|
host_test_mdns:
|
||||||
if: contains(github.event.pull_request.labels.*.name, 'mdns') || github.event_name == 'push'
|
if: contains(github.event.pull_request.labels.*.name, 'mdns') || github.event_name == 'push'
|
||||||
name: Host test
|
name: Host test
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
container: espressif/idf:release-v5.1
|
container: espressif/idf:release-v5.1
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout esp-protocols
|
- name: Checkout esp-protocols
|
||||||
uses: actions/checkout@master
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: esp-protocols
|
path: esp-protocols
|
||||||
|
|
||||||
@ -40,11 +40,11 @@ jobs:
|
|||||||
idf_ver: ["latest"]
|
idf_ver: ["latest"]
|
||||||
idf_target: ["esp32"]
|
idf_target: ["esp32"]
|
||||||
|
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
container: espressif/idf:${{ matrix.idf_ver }}
|
container: espressif/idf:${{ matrix.idf_ver }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout esp-protocols
|
- name: Checkout esp-protocols
|
||||||
uses: actions/checkout@master
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: esp-protocols
|
path: esp-protocols
|
||||||
- name: Install Necessary Libs
|
- name: Install Necessary Libs
|
||||||
|
31
.github/workflows/modem__build-host-tests.yml
vendored
31
.github/workflows/modem__build-host-tests.yml
vendored
@ -27,13 +27,19 @@ jobs:
|
|||||||
example: "simple_cmux_client"
|
example: "simple_cmux_client"
|
||||||
warning: "Warning: The smallest app partition is nearly full"
|
warning: "Warning: The smallest app partition is nearly full"
|
||||||
|
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
container: espressif/idf:${{ matrix.idf_ver }}
|
container: espressif/idf:${{ matrix.idf_ver }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout esp-protocols
|
- name: Check out code (v3) # @v4 failed due to Node 20's requirement, incompatible with older IDF versions
|
||||||
|
if: matrix.idf_ver != 'latest' && matrix.idf_ver < 'release-v5.0'
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
with:
|
with:
|
||||||
path: protocols
|
path: protocols
|
||||||
|
- name: Check out code (v4)
|
||||||
|
if: matrix.idf_ver == 'latest' || matrix.idf_ver >= 'release-v5.0'
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
path: protocols
|
||||||
- if: ${{ matrix.skip_config }}
|
- if: ${{ matrix.skip_config }}
|
||||||
run: rm -f $GITHUB_WORKSPACE/protocols/components/esp_modem/examples/${{ matrix.example }}/sdkconfig.ci.${{ matrix.skip_config }}*
|
run: rm -f $GITHUB_WORKSPACE/protocols/components/esp_modem/examples/${{ matrix.example }}/sdkconfig.ci.${{ matrix.skip_config }}*
|
||||||
- name: Build ${{ matrix.example }} with IDF-${{ matrix.idf_ver }}
|
- name: Build ${{ matrix.example }} with IDF-${{ matrix.idf_ver }}
|
||||||
@ -54,11 +60,11 @@ jobs:
|
|||||||
idf_ver: ["release-v5.0", "release-v5.1", "latest"]
|
idf_ver: ["release-v5.0", "release-v5.1", "latest"]
|
||||||
test: ["target", "target_ota", "target_iperf"]
|
test: ["target", "target_ota", "target_iperf"]
|
||||||
|
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
container: espressif/idf:${{ matrix.idf_ver }}
|
container: espressif/idf:${{ matrix.idf_ver }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout esp-protocols
|
- name: Checkout esp-protocols
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: protocols
|
path: protocols
|
||||||
- name: Build ${{ matrix.test }} with IDF-${{ matrix.idf_ver }}
|
- name: Build ${{ matrix.test }} with IDF-${{ matrix.idf_ver }}
|
||||||
@ -76,10 +82,25 @@ jobs:
|
|||||||
if: contains(github.event.pull_request.labels.*.name, 'modem') || github.event_name == 'push'
|
if: contains(github.event.pull_request.labels.*.name, 'modem') || github.event_name == 'push'
|
||||||
uses: "./.github/workflows/run-host-tests.yml"
|
uses: "./.github/workflows/run-host-tests.yml"
|
||||||
with:
|
with:
|
||||||
idf_version: "release-v4.3"
|
idf_version: "latest"
|
||||||
app_name: "host_modem_test"
|
app_name: "host_modem_test"
|
||||||
app_path: "esp-protocols/components/esp_modem/test/host_test"
|
app_path: "esp-protocols/components/esp_modem/test/host_test"
|
||||||
component_path: "esp-protocols/components/esp_modem"
|
component_path: "esp-protocols/components/esp_modem"
|
||||||
upload_artifacts: true
|
upload_artifacts: true
|
||||||
|
run_executable: true
|
||||||
|
run_coverage: true
|
||||||
pre_run_script: "esp-protocols/components/esp_modem/test/host_test/env.sh"
|
pre_run_script: "esp-protocols/components/esp_modem/test/host_test/env.sh"
|
||||||
publish_unit_test_result: true
|
publish_unit_test_result: true
|
||||||
|
|
||||||
|
build_linux_example:
|
||||||
|
if: contains(github.event.pull_request.labels.*.name, 'modem') || github.event_name == 'push'
|
||||||
|
uses: "./.github/workflows/run-host-tests.yml"
|
||||||
|
with:
|
||||||
|
idf_version: "latest"
|
||||||
|
app_name: "linux_modem"
|
||||||
|
app_path: "esp-protocols/components/esp_modem/examples/linux_modem"
|
||||||
|
component_path: "esp-protocols/components/esp_modem"
|
||||||
|
upload_artifacts: true
|
||||||
|
run_executable: false
|
||||||
|
run_coverage: false
|
||||||
|
pre_run_script: "esp-protocols/components/esp_modem/test/host_test/env.sh"
|
||||||
|
4
.github/workflows/modem__target-test.yml
vendored
4
.github/workflows/modem__target-test.yml
vendored
@ -20,13 +20,13 @@ jobs:
|
|||||||
- idf_ver: "latest"
|
- idf_ver: "latest"
|
||||||
idf_target: "esp32s2"
|
idf_target: "esp32s2"
|
||||||
test: { app: usb_a7670_s2, path: examples/pppos_client }
|
test: { app: usb_a7670_s2, path: examples/pppos_client }
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
container: espressif/idf:${{ matrix.idf_ver }}
|
container: espressif/idf:${{ matrix.idf_ver }}
|
||||||
env:
|
env:
|
||||||
TEST_DIR: components/esp_modem/${{ matrix.test.path }}
|
TEST_DIR: components/esp_modem/${{ matrix.test.path }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout esp-protocols
|
- name: Checkout esp-protocols
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: Build esp-modem target tests with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }}
|
- name: Build esp-modem target tests with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }}
|
||||||
|
4
.github/workflows/mqtt_cxx__build.yml
vendored
4
.github/workflows/mqtt_cxx__build.yml
vendored
@ -16,11 +16,11 @@ jobs:
|
|||||||
idf_ver: ["latest", "release-v5.0"]
|
idf_ver: ["latest", "release-v5.0"]
|
||||||
idf_target: ["esp32"]
|
idf_target: ["esp32"]
|
||||||
test: [ { app: mqtt-basic, path: "components/esp_mqtt_cxx/examples" }]
|
test: [ { app: mqtt-basic, path: "components/esp_mqtt_cxx/examples" }]
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
container: espressif/idf:${{ matrix.idf_ver }}
|
container: espressif/idf:${{ matrix.idf_ver }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout esp-protocols
|
- name: Checkout esp-protocols
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: Build ${{ matrix.test.app }} with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }}
|
- name: Build ${{ matrix.test.app }} with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }}
|
||||||
|
2
.github/workflows/pre_commit_check.yml
vendored
2
.github/workflows/pre_commit_check.yml
vendored
@ -12,7 +12,7 @@ jobs:
|
|||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
ref: ${{ github.base_ref }}
|
ref: ${{ github.base_ref }}
|
||||||
fetch-depth: 20
|
fetch-depth: 20
|
||||||
|
2
.github/workflows/publish-docs-component.yml
vendored
2
.github/workflows/publish-docs-component.yml
vendored
@ -20,7 +20,7 @@ jobs:
|
|||||||
if: github.repository == 'espressif/esp-protocols'
|
if: github.repository == 'espressif/esp-protocols'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout esp-protocols
|
- name: Checkout esp-protocols
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
persist-credentials: false
|
persist-credentials: false
|
||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
24
.github/workflows/run-host-tests.yml
vendored
24
.github/workflows/run-host-tests.yml
vendored
@ -18,6 +18,12 @@ on:
|
|||||||
upload_artifacts:
|
upload_artifacts:
|
||||||
type: boolean
|
type: boolean
|
||||||
required: true
|
required: true
|
||||||
|
run_executable:
|
||||||
|
type: boolean
|
||||||
|
required: true
|
||||||
|
run_coverage:
|
||||||
|
type: boolean
|
||||||
|
required: true
|
||||||
pre_run_script:
|
pre_run_script:
|
||||||
type: string
|
type: string
|
||||||
required: false
|
required: false
|
||||||
@ -28,14 +34,14 @@ on:
|
|||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build App
|
name: Build App
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
permissions:
|
permissions:
|
||||||
checks: write
|
checks: write
|
||||||
contents: write
|
contents: write
|
||||||
container: espressif/idf:${{inputs.idf_version}}
|
container: espressif/idf:${{inputs.idf_version}}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout esp-protocols
|
- name: Checkout esp-protocols
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
path: esp-protocols
|
path: esp-protocols
|
||||||
- name: Build ${{ inputs.app_name }} with IDF-${{ inputs.idf_version }}
|
- name: Build ${{ inputs.app_name }} with IDF-${{ inputs.idf_version }}
|
||||||
@ -51,7 +57,11 @@ jobs:
|
|||||||
# The sdkconfig.ci.linux specifies Linux as the build target with apropriate settings.
|
# The sdkconfig.ci.linux specifies Linux as the build target with apropriate settings.
|
||||||
cp sdkconfig.ci.linux sdkconfig.defaults
|
cp sdkconfig.ci.linux sdkconfig.defaults
|
||||||
idf.py build
|
idf.py build
|
||||||
./build/${{inputs.app_name}}.elf -r junit -o junit.xml
|
if [ "${{ inputs.run_executable}}" == "false" ]; then
|
||||||
|
echo "Executeable wasn't run"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
./build/${{inputs.app_name}}.elf
|
||||||
- name: Publish Unit Test Result
|
- name: Publish Unit Test Result
|
||||||
uses: EnricoMi/publish-unit-test-result-action@v2
|
uses: EnricoMi/publish-unit-test-result-action@v2
|
||||||
if: ${{ inputs.publish_unit_test_result }}
|
if: ${{ inputs.publish_unit_test_result }}
|
||||||
@ -59,6 +69,7 @@ jobs:
|
|||||||
files: ${{inputs.component_path}}/**/*junit.xml
|
files: ${{inputs.component_path}}/**/*junit.xml
|
||||||
- name: Build with Coverage Enabled
|
- name: Build with Coverage Enabled
|
||||||
shell: bash
|
shell: bash
|
||||||
|
if: ${{ inputs.run_coverage }}
|
||||||
run: |
|
run: |
|
||||||
component=$(basename ${{ inputs.component_path }})
|
component=$(basename ${{ inputs.component_path }})
|
||||||
if [ -f "${{ inputs.pre_run_script }}" ]; then
|
if [ -f "${{ inputs.pre_run_script }}" ]; then
|
||||||
@ -74,6 +85,7 @@ jobs:
|
|||||||
./build/${{inputs.app_name}}.elf
|
./build/${{inputs.app_name}}.elf
|
||||||
- name: Run Coverage
|
- name: Run Coverage
|
||||||
shell: bash
|
shell: bash
|
||||||
|
if: ${{ inputs.run_coverage }}
|
||||||
run: |
|
run: |
|
||||||
apt-get update && apt-get install -y python3-pip rsync
|
apt-get update && apt-get install -y python3-pip rsync
|
||||||
python -m pip install gcovr
|
python -m pip install gcovr
|
||||||
@ -86,6 +98,7 @@ jobs:
|
|||||||
cp index.html ${{inputs.app_name}}_coverage_report
|
cp index.html ${{inputs.app_name}}_coverage_report
|
||||||
cp -rf ${{inputs.app_name}}_coverage_report ${{inputs.app_name}}_coverage.xml $GITHUB_WORKSPACE
|
cp -rf ${{inputs.app_name}}_coverage_report ${{inputs.app_name}}_coverage.xml $GITHUB_WORKSPACE
|
||||||
- name: Code Coverage Summary Report
|
- name: Code Coverage Summary Report
|
||||||
|
if: ${{ inputs.run_coverage }}
|
||||||
uses: irongut/CodeCoverageSummary@v1.3.0
|
uses: irongut/CodeCoverageSummary@v1.3.0
|
||||||
with:
|
with:
|
||||||
filename: esp-protocols/**/${{inputs.app_name}}_coverage.xml
|
filename: esp-protocols/**/${{inputs.app_name}}_coverage.xml
|
||||||
@ -99,9 +112,10 @@ jobs:
|
|||||||
thresholds: '60 80'
|
thresholds: '60 80'
|
||||||
- name: Write to Job Summary
|
- name: Write to Job Summary
|
||||||
run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY
|
run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY
|
||||||
|
if: ${{ inputs.run_coverage }}
|
||||||
- name: Upload files to artifacts for run-target job
|
- name: Upload files to artifacts for run-target job
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v4
|
||||||
if: ${{inputs.upload_artifacts}}
|
if: ${{ inputs.run_coverage }}
|
||||||
with:
|
with:
|
||||||
name: ${{inputs.app_name}}_coverage_report
|
name: ${{inputs.app_name}}_coverage_report
|
||||||
path: |
|
path: |
|
||||||
|
@ -17,4 +17,6 @@ jobs:
|
|||||||
app_name: "websocket"
|
app_name: "websocket"
|
||||||
app_path: "esp-protocols/components/esp_websocket_client/examples/linux"
|
app_path: "esp-protocols/components/esp_websocket_client/examples/linux"
|
||||||
component_path: "esp-protocols/components/esp_websocket_client"
|
component_path: "esp-protocols/components/esp_websocket_client"
|
||||||
|
run_executable: true
|
||||||
upload_artifacts: true
|
upload_artifacts: true
|
||||||
|
run_coverage: true
|
||||||
|
@ -15,13 +15,13 @@ jobs:
|
|||||||
matrix:
|
matrix:
|
||||||
idf_ver: ["release-v5.0", "release-v5.1", "latest"]
|
idf_ver: ["release-v5.0", "release-v5.1", "latest"]
|
||||||
test: [ { app: example, path: "examples/target" }, { app: unit_test, path: "test" } ]
|
test: [ { app: example, path: "examples/target" }, { app: unit_test, path: "test" } ]
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-22.04
|
||||||
container: espressif/idf:${{ matrix.idf_ver }}
|
container: espressif/idf:${{ matrix.idf_ver }}
|
||||||
env:
|
env:
|
||||||
TEST_DIR: components/esp_websocket_client/${{ matrix.test.path }}
|
TEST_DIR: components/esp_websocket_client/${{ matrix.test.path }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout esp-protocols
|
- name: Checkout esp-protocols
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
submodules: recursive
|
submodules: recursive
|
||||||
- name: Build ${{ matrix.example }} with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }}
|
- name: Build ${{ matrix.example }} with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }}
|
||||||
@ -35,7 +35,7 @@ jobs:
|
|||||||
$GITHUB_WORKSPACE/ci/clean_build_artifacts.sh `pwd`/$dir
|
$GITHUB_WORKSPACE/ci/clean_build_artifacts.sh `pwd`/$dir
|
||||||
zip -qur artifacts.zip $dir
|
zip -qur artifacts.zip $dir
|
||||||
done
|
done
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: websocket_bin_esp32_${{ matrix.idf_ver }}_${{ matrix.test.app }}
|
name: websocket_bin_esp32_${{ matrix.idf_ver }}_${{ matrix.test.app }}
|
||||||
path: ${{ env.TEST_DIR }}/artifacts.zip
|
path: ${{ env.TEST_DIR }}/artifacts.zip
|
||||||
@ -60,8 +60,8 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
TEST_DIR: components/esp_websocket_client/${{ matrix.test.path }}
|
TEST_DIR: components/esp_websocket_client/${{ matrix.test.path }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v4
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: websocket_bin_esp32_${{ matrix.idf_ver }}_${{ matrix.test.app }}
|
name: websocket_bin_esp32_${{ matrix.idf_ver }}_${{ matrix.test.app }}
|
||||||
path: ${{ env.TEST_DIR }}/ci/
|
path: ${{ env.TEST_DIR }}/ci/
|
||||||
@ -79,7 +79,7 @@ jobs:
|
|||||||
mv $dir build
|
mv $dir build
|
||||||
python -m pytest --log-cli-level DEBUG --junit-xml=./results_${{ matrix.test.app }}_${{ matrix.idf_target }}_${{ matrix.idf_ver }}_${dir#"ci/build_"}.xml --target=${{ matrix.idf_target }}
|
python -m pytest --log-cli-level DEBUG --junit-xml=./results_${{ matrix.test.app }}_${{ matrix.idf_target }}_${{ matrix.idf_ver }}_${dir#"ci/build_"}.xml --target=${{ matrix.idf_target }}
|
||||||
done
|
done
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v4
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
name: results_${{ matrix.test.app }}_${{ matrix.idf_target }}_${{ matrix.idf_ver }}.xml
|
name: results_${{ matrix.test.app }}_${{ matrix.idf_target }}_${{ matrix.idf_ver }}.xml
|
||||||
|
@ -22,8 +22,7 @@ using namespace esp_modem;
|
|||||||
|
|
||||||
[[maybe_unused]] constexpr auto TAG = "linux_modem_main";
|
[[maybe_unused]] constexpr auto TAG = "linux_modem_main";
|
||||||
|
|
||||||
|
extern "C" void app_main(void)
|
||||||
int main()
|
|
||||||
{
|
{
|
||||||
// init the DTE
|
// init the DTE
|
||||||
esp_modem_dte_config_t dte_config = {
|
esp_modem_dte_config_t dte_config = {
|
||||||
|
@ -3,19 +3,14 @@
|
|||||||
idf_version=$1
|
idf_version=$1
|
||||||
component=$2
|
component=$2
|
||||||
|
|
||||||
if [[ "$idf_version" == "release-v4.3" ]] && [[ "$component" == "esp_modem" ]]; then
|
lwip=lwip-2.1.2
|
||||||
lwip=lwip-2.1.2
|
lwip_uri=http://download.savannah.nongnu.org/releases/lwip
|
||||||
lwip_uri=http://download.savannah.nongnu.org/releases/lwip
|
lwip_contrib=contrib-2.1.0
|
||||||
lwip_contrib=contrib-2.1.0
|
|
||||||
|
|
||||||
wget --no-verbose ${lwip_uri}/${lwip}.zip
|
wget --no-verbose ${lwip_uri}/${lwip}.zip
|
||||||
unzip -oq ${lwip}.zip
|
unzip -oq ${lwip}.zip
|
||||||
wget --no-verbose ${lwip_uri}/${lwip_contrib}.zip
|
wget --no-verbose ${lwip_uri}/${lwip_contrib}.zip
|
||||||
unzip -oq ${lwip_contrib}.zip
|
unzip -oq ${lwip_contrib}.zip
|
||||||
|
|
||||||
apt-get update && apt-get install -y gcc-8 g++-8
|
export LWIP_PATH=`pwd`/$lwip
|
||||||
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-8 800 --slave /usr/bin/g++ g++ /usr/bin/g++-8
|
export LWIP_CONTRIB_PATH=`pwd`/$lwip_contrib
|
||||||
rm /usr/bin/gcov && ln -s /usr/bin/gcov-8 /usr/bin/gcov
|
|
||||||
export LWIP_PATH=`pwd`/$lwip
|
|
||||||
export LWIP_CONTRIB_PATH=`pwd`/$lwip_contrib
|
|
||||||
fi
|
|
||||||
|
@ -1,11 +1,12 @@
|
|||||||
idf_component_register(SRCS "test_modem.cpp" "LoopbackTerm.cpp"
|
idf_component_register(SRCS "test_modem.cpp" "LoopbackTerm.cpp"
|
||||||
INCLUDE_DIRS "$ENV{IDF_PATH}/tools/catch"
|
REQUIRES esp_modem WHOLE_ARCHIVE)
|
||||||
REQUIRES esp_modem)
|
|
||||||
|
|
||||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||||
find_package(Threads REQUIRED)
|
find_package(Threads REQUIRED)
|
||||||
target_link_libraries(${COMPONENT_LIB} PRIVATE Threads::Threads)
|
target_link_libraries(${COMPONENT_LIB} PRIVATE Threads::Threads)
|
||||||
|
|
||||||
|
target_link_libraries(${COMPONENT_LIB} PRIVATE Catch2WithMain)
|
||||||
|
|
||||||
set_target_properties(${COMPONENT_LIB} PROPERTIES
|
set_target_properties(${COMPONENT_LIB} PROPERTIES
|
||||||
CXX_STANDARD 17
|
CXX_STANDARD 17
|
||||||
CXX_STANDARD_REQUIRED ON
|
CXX_STANDARD_REQUIRED ON
|
||||||
|
@ -0,0 +1,5 @@
|
|||||||
|
dependencies:
|
||||||
|
espressif/catch2:
|
||||||
|
version: '*'
|
||||||
|
idf:
|
||||||
|
version: ">=5.0"
|
@ -1,14 +1,16 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
|
* SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
* SPDX-License-Identifier: Unlicense OR CC0-1.0
|
||||||
*/
|
*/
|
||||||
#define CATCH_CONFIG_MAIN // This tells the catch header to generate a main
|
#define CATCH_CONFIG_MAIN // This tells the catch header to generate a main
|
||||||
#include <memory>
|
#include <memory>
|
||||||
#include <future>
|
#include <future>
|
||||||
#include "catch.hpp"
|
#include <catch2/catch_test_macros.hpp>
|
||||||
|
#include <catch2/catch_session.hpp>
|
||||||
#include "cxx_include/esp_modem_api.hpp"
|
#include "cxx_include/esp_modem_api.hpp"
|
||||||
#include "LoopbackTerm.h"
|
#include "LoopbackTerm.h"
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
using namespace esp_modem;
|
using namespace esp_modem;
|
||||||
|
|
||||||
@ -346,3 +348,25 @@ TEST_CASE("CMUX manual mode transitions", "[esp_modem][transitions]")
|
|||||||
CHECK(dce->set_mode(esp_modem::modem_mode::UNDEF) == true); // Succeeds from any state
|
CHECK(dce->set_mode(esp_modem::modem_mode::UNDEF) == true); // Succeeds from any state
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define CATCH_CONFIG_RUNNER
|
||||||
|
extern "C" int app_main(void)
|
||||||
|
{
|
||||||
|
// Define the argument count and arguments for Catch2, including JUnit reporting
|
||||||
|
int argc = 5;
|
||||||
|
const char *argv[] = {"esp_modem", "-r", "junit", "-o", "junit.xml", nullptr};
|
||||||
|
|
||||||
|
// Run the Catch2 session and store the result
|
||||||
|
int result = Catch::Session().run(argc, argv);
|
||||||
|
|
||||||
|
// Use more descriptive error handling
|
||||||
|
if (result != 0) {
|
||||||
|
printf("Test failed with result %d.\n", result);
|
||||||
|
} else {
|
||||||
|
printf("All tests passed successfully.\n");
|
||||||
|
}
|
||||||
|
|
||||||
|
// Check for the junit.xml file in the current working directory
|
||||||
|
// Exit the application with the test result as the status code
|
||||||
|
std::exit(result);
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user