From a8d9edfae22f8704876f1b11788d695119b6c317 Mon Sep 17 00:00:00 2001 From: Suren Gabrielyan Date: Mon, 29 Jan 2024 19:34:42 +0400 Subject: [PATCH] ci(common): updated github actions(checkout, upload, download) v3 to 4, Ubuntu 20.04 to v22.04 --- .github/workflows/asio__build-target-test.yml | 12 ++++++------ .github/workflows/console_cmd_ifconfig__build.yml | 4 ++-- .github/workflows/console_cmd_ping__build.yml | 4 ++-- .github/workflows/console_cmd_wifi__build.yml | 4 ++-- .github/workflows/console_simple_init__build.yml | 4 ++-- .github/workflows/examples_build-host-test.yml | 8 ++++---- .github/workflows/mdns__build-target-test.yml | 12 ++++++------ .github/workflows/mdns__host-tests.yml | 8 ++++---- .github/workflows/modem__build-host-tests.yml | 14 ++++++++++---- .github/workflows/modem__target-test.yml | 4 ++-- .github/workflows/mqtt_cxx__build.yml | 4 ++-- .github/workflows/pre_commit_check.yml | 2 +- .github/workflows/publish-docs-component.yml | 2 +- .github/workflows/run-host-tests.yml | 8 ++++---- .github/workflows/websocket__build-target-test.yml | 12 ++++++------ components/esp_modem/test/host_test/CMakeLists.txt | 2 +- .../esp_modem/test/host_test/main/test_modem.cpp | 3 +-- 17 files changed, 56 insertions(+), 51 deletions(-) diff --git a/.github/workflows/asio__build-target-test.yml b/.github/workflows/asio__build-target-test.yml index 55c60cc5034..fd1c7fdd4ff 100644 --- a/.github/workflows/asio__build-target-test.yml +++ b/.github/workflows/asio__build-target-test.yml @@ -16,13 +16,13 @@ jobs: idf_ver: ["latest", "release-v5.0", "release-v5.1"] idf_target: ["esp32", "esp32s2"] 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 }} env: TEST_DIR: components/asio/examples steps: - name: Checkout esp-protocols - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive - name: Build ${{ matrix.example }} with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }} @@ -43,7 +43,7 @@ jobs: run: | . ${IDF_PATH}/export.sh 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: name: examples_app_bin_${{ matrix.idf_target }}_${{ matrix.idf_ver }}_${{ matrix.example }} path: | @@ -76,8 +76,8 @@ jobs: steps: - name: Clear repository run: sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE - - uses: actions/checkout@v3 - - uses: actions/download-artifact@v3 + - uses: actions/checkout@v4 + - uses: actions/download-artifact@v4 with: name: examples_app_bin_${{ matrix.idf_target }}_${{ matrix.idf_ver }}_${{ matrix.example }} path: ${{ env.TEST_DIR }}/${{ matrix.example }}/build @@ -93,7 +93,7 @@ jobs: working-directory: ${{ env.TEST_DIR }}/${{ matrix.example }} 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 }} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: always() with: name: examples_results_${{ matrix.idf_target }}_${{ matrix.idf_ver }}_${{ matrix.example }} diff --git a/.github/workflows/console_cmd_ifconfig__build.yml b/.github/workflows/console_cmd_ifconfig__build.yml index c5d21626a26..cc0d418897d 100644 --- a/.github/workflows/console_cmd_ifconfig__build.yml +++ b/.github/workflows/console_cmd_ifconfig__build.yml @@ -16,11 +16,11 @@ jobs: idf_ver: ["latest", "release-v5.0"] idf_target: ["esp32"] 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 }} steps: - name: Checkout esp-protocols - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive - name: Build ${{ matrix.test.app }} with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }} diff --git a/.github/workflows/console_cmd_ping__build.yml b/.github/workflows/console_cmd_ping__build.yml index 37f9f120a4a..f8bc7d8e25e 100644 --- a/.github/workflows/console_cmd_ping__build.yml +++ b/.github/workflows/console_cmd_ping__build.yml @@ -16,11 +16,11 @@ jobs: idf_ver: ["latest", "release-v5.0"] idf_target: ["esp32"] 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 }} steps: - name: Checkout esp-protocols - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive - name: Build ${{ matrix.test.app }} with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }} diff --git a/.github/workflows/console_cmd_wifi__build.yml b/.github/workflows/console_cmd_wifi__build.yml index 8031184332f..07ab0c6af2b 100644 --- a/.github/workflows/console_cmd_wifi__build.yml +++ b/.github/workflows/console_cmd_wifi__build.yml @@ -16,11 +16,11 @@ jobs: idf_ver: ["latest", "release-v5.0"] idf_target: ["esp32"] 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 }} steps: - name: Checkout esp-protocols - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive - name: Build ${{ matrix.test.app }} with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }} diff --git a/.github/workflows/console_simple_init__build.yml b/.github/workflows/console_simple_init__build.yml index 53cfc45b7e7..9d5d2d500b0 100644 --- a/.github/workflows/console_simple_init__build.yml +++ b/.github/workflows/console_simple_init__build.yml @@ -16,11 +16,11 @@ jobs: idf_ver: ["latest", "release-v5.0"] idf_target: ["esp32"] 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 }} steps: - name: Checkout esp-protocols - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive - name: Build ${{ matrix.test.app }} with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }} diff --git a/.github/workflows/examples_build-host-test.yml b/.github/workflows/examples_build-host-test.yml index 15d30c7ccda..1d099a40747 100644 --- a/.github/workflows/examples_build-host-test.yml +++ b/.github/workflows/examples_build-host-test.yml @@ -14,11 +14,11 @@ jobs: strategy: matrix: idf_ver: ["latest", "release-v5.1"] - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 container: espressif/idf:${{ matrix.idf_ver }} steps: - name: Checkout esp-protocols - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build with IDF-${{ matrix.idf_ver }} shell: bash run: | @@ -33,11 +33,11 @@ jobs: strategy: matrix: idf_ver: ["latest"] - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 container: espressif/idf:${{ matrix.idf_ver }} steps: - name: Checkout esp-protocols - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build with IDF-${{ matrix.idf_ver }} shell: bash run: | diff --git a/.github/workflows/mdns__build-target-test.yml b/.github/workflows/mdns__build-target-test.yml index eca051d6978..5caa610709e 100644 --- a/.github/workflows/mdns__build-target-test.yml +++ b/.github/workflows/mdns__build-target-test.yml @@ -15,11 +15,11 @@ jobs: matrix: 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" } ] - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 container: espressif/idf:${{ matrix.idf_ver }} steps: - name: Checkout esp-protocols - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Build ${{ matrix.test.app }} with IDF-${{ matrix.idf_ver }} shell: bash run: | @@ -34,7 +34,7 @@ jobs: $GITHUB_WORKSPACE/ci/clean_build_artifacts.sh `pwd`/$dir zip -qur artifacts.zip $dir done - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: mdns_bin_esp32_${{ matrix.idf_ver }}_${{ matrix.test.app }} path: components/mdns/${{ matrix.test.path }}/artifacts.zip @@ -58,8 +58,8 @@ jobs: steps: - name: Clear repository run: sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE - - uses: actions/checkout@v3 - - uses: actions/download-artifact@v3 + - uses: actions/checkout@v4 + - uses: actions/download-artifact@v4 with: name: mdns_bin_${{ matrix.idf_target }}_${{ matrix.idf_ver }}_${{ matrix.test.app }} path: components/mdns/${{ matrix.test.path }}/ci/ @@ -77,7 +77,7 @@ jobs: 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 }} done - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: always() with: name: results_${{ matrix.test.app }}_${{ matrix.idf_target }}_${{ matrix.idf_ver }}.xml diff --git a/.github/workflows/mdns__host-tests.yml b/.github/workflows/mdns__host-tests.yml index 3fa7cd35ada..81bb3ef6887 100644 --- a/.github/workflows/mdns__host-tests.yml +++ b/.github/workflows/mdns__host-tests.yml @@ -11,12 +11,12 @@ jobs: host_test_mdns: if: contains(github.event.pull_request.labels.*.name, 'mdns') || github.event_name == 'push' name: Host test - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 container: espressif/idf:release-v5.1 steps: - name: Checkout esp-protocols - uses: actions/checkout@master + uses: actions/checkout@v4 with: path: esp-protocols @@ -40,11 +40,11 @@ jobs: idf_ver: ["latest"] idf_target: ["esp32"] - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 container: espressif/idf:${{ matrix.idf_ver }} steps: - name: Checkout esp-protocols - uses: actions/checkout@master + uses: actions/checkout@v4 with: path: esp-protocols - name: Install Necessary Libs diff --git a/.github/workflows/modem__build-host-tests.yml b/.github/workflows/modem__build-host-tests.yml index 8f9c150da00..59261008d3a 100644 --- a/.github/workflows/modem__build-host-tests.yml +++ b/.github/workflows/modem__build-host-tests.yml @@ -27,13 +27,19 @@ jobs: example: "simple_cmux_client" 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 }} 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 with: 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 }} 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 }} @@ -54,11 +60,11 @@ jobs: idf_ver: ["release-v5.0", "release-v5.1", "latest"] test: ["target", "target_ota", "target_iperf"] - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 container: espressif/idf:${{ matrix.idf_ver }} steps: - name: Checkout esp-protocols - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: protocols - name: Build ${{ matrix.test }} with IDF-${{ matrix.idf_ver }} diff --git a/.github/workflows/modem__target-test.yml b/.github/workflows/modem__target-test.yml index f7f5cf78118..5d55b3e7f4f 100644 --- a/.github/workflows/modem__target-test.yml +++ b/.github/workflows/modem__target-test.yml @@ -20,13 +20,13 @@ jobs: - idf_ver: "latest" idf_target: "esp32s2" 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 }} env: TEST_DIR: components/esp_modem/${{ matrix.test.path }} steps: - name: Checkout esp-protocols - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive - name: Build esp-modem target tests with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }} diff --git a/.github/workflows/mqtt_cxx__build.yml b/.github/workflows/mqtt_cxx__build.yml index 20cfcf7f5d4..770629cf909 100644 --- a/.github/workflows/mqtt_cxx__build.yml +++ b/.github/workflows/mqtt_cxx__build.yml @@ -16,11 +16,11 @@ jobs: idf_ver: ["latest", "release-v5.0"] idf_target: ["esp32"] 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 }} steps: - name: Checkout esp-protocols - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive - name: Build ${{ matrix.test.app }} with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }} diff --git a/.github/workflows/pre_commit_check.yml b/.github/workflows/pre_commit_check.yml index 7638c498f74..56d0ff772bd 100644 --- a/.github/workflows/pre_commit_check.yml +++ b/.github/workflows/pre_commit_check.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: ref: ${{ github.base_ref }} fetch-depth: 20 diff --git a/.github/workflows/publish-docs-component.yml b/.github/workflows/publish-docs-component.yml index 46d1871f2ba..0b7d39ba32b 100644 --- a/.github/workflows/publish-docs-component.yml +++ b/.github/workflows/publish-docs-component.yml @@ -20,7 +20,7 @@ jobs: if: github.repository == 'espressif/esp-protocols' steps: - name: Checkout esp-protocols - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: persist-credentials: false fetch-depth: 0 diff --git a/.github/workflows/run-host-tests.yml b/.github/workflows/run-host-tests.yml index ffb70f6a218..a4f8a54b8b1 100644 --- a/.github/workflows/run-host-tests.yml +++ b/.github/workflows/run-host-tests.yml @@ -34,14 +34,14 @@ on: jobs: build: name: Build App - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 permissions: checks: write contents: write container: espressif/idf:${{inputs.idf_version}} steps: - name: Checkout esp-protocols - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: path: esp-protocols - name: Build ${{ inputs.app_name }} with IDF-${{ inputs.idf_version }} @@ -63,7 +63,7 @@ jobs: fi if [ "${{ inputs.publish_unit_test_result }}" == "true" ]; then - ./build/${{inputs.app_name}}.elf --reporter JUnit::out=result-junit.xml --reporter console::out=-::colour-mode=ansi + ./build/${{inputs.app_name}}.elf --reporter JUnit::out=junit.xml --reporter console::out=-::colour-mode=ansi else ./build/${{inputs.app_name}}.elf fi @@ -119,7 +119,7 @@ jobs: run: cat code-coverage-results.md >> $GITHUB_STEP_SUMMARY if: ${{ inputs.run_coverage }} - name: Upload files to artifacts for run-target job - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: ${{ inputs.run_coverage }} with: name: ${{inputs.app_name}}_coverage_report diff --git a/.github/workflows/websocket__build-target-test.yml b/.github/workflows/websocket__build-target-test.yml index d8ca9b4dd6d..de55c40c65e 100644 --- a/.github/workflows/websocket__build-target-test.yml +++ b/.github/workflows/websocket__build-target-test.yml @@ -15,13 +15,13 @@ jobs: matrix: idf_ver: ["release-v5.0", "release-v5.1", "latest"] 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 }} env: TEST_DIR: components/esp_websocket_client/${{ matrix.test.path }} steps: - name: Checkout esp-protocols - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: recursive - 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 zip -qur artifacts.zip $dir done - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: websocket_bin_esp32_${{ matrix.idf_ver }}_${{ matrix.test.app }} path: ${{ env.TEST_DIR }}/artifacts.zip @@ -60,8 +60,8 @@ jobs: env: TEST_DIR: components/esp_websocket_client/${{ matrix.test.path }} steps: - - uses: actions/checkout@v3 - - uses: actions/download-artifact@v3 + - uses: actions/checkout@v4 + - uses: actions/download-artifact@v4 with: name: websocket_bin_esp32_${{ matrix.idf_ver }}_${{ matrix.test.app }} path: ${{ env.TEST_DIR }}/ci/ @@ -79,7 +79,7 @@ jobs: 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 }} done - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: always() with: name: results_${{ matrix.test.app }}_${{ matrix.idf_target }}_${{ matrix.idf_ver }}.xml diff --git a/components/esp_modem/test/host_test/CMakeLists.txt b/components/esp_modem/test/host_test/CMakeLists.txt index e508eb92f59..8c603a21e55 100644 --- a/components/esp_modem/test/host_test/CMakeLists.txt +++ b/components/esp_modem/test/host_test/CMakeLists.txt @@ -6,7 +6,7 @@ set(EXTRA_COMPONENT_DIRS # Add esp_modem component and linux port components ../.. ../../port/linux) -set(COMPONENTS esp_modem main) +set(COMPONENTS main) project(host_modem_test) idf_component_get_property(esp_modem esp_modem COMPONENT_LIB) diff --git a/components/esp_modem/test/host_test/main/test_modem.cpp b/components/esp_modem/test/host_test/main/test_modem.cpp index d5d37641012..af2c009b70f 100644 --- a/components/esp_modem/test/host_test/main/test_modem.cpp +++ b/components/esp_modem/test/host_test/main/test_modem.cpp @@ -10,7 +10,6 @@ #include #include "cxx_include/esp_modem_api.hpp" #include "LoopbackTerm.h" -#include using namespace esp_modem; @@ -361,7 +360,7 @@ extern "C" int app_main(void) // Use more descriptive error handling if (result != 0) { - printf("Test failed with result %d. Refer to the Catch2 documentation for error details.\n", result); + printf("Test failed with result %d.\n", result); } else { printf("All tests passed successfully.\n"); }