@@ -13,20 +13,20 @@ jobs:
1313 name : Build
1414 strategy :
1515 matrix :
16- idf_ver : ["latest", "release-v5.0 ", "release-v5.1 ", "release-v5.2 ", "release-v5.3 ", "release-v5.4 "]
16+ idf_ver : ["latest", "release-v5.1 ", "release-v5.2 ", "release-v5.3 ", "release-v5.4 ", "release-v5.5", "release-v6.0 "]
1717 idf_target : ["esp32", "esp32s2"]
18- example : ["asio_chat", "async_request", "socks4", "ssl_client_server", "tcp_echo_server", "udp_echo_server"]
18+ example : ["asio_chat", "async_request", "socks4", "ssl_client_server", "tcp_echo_server", "udp_echo_server", "unit" ]
1919 runs-on : ubuntu-22.04
2020 container : espressif/idf:${{ matrix.idf_ver }}
2121 env :
22- TEST_DIR : components/asio/examples
22+ APP_DIR : ${{ matrix.example == 'unit' && ' components/asio/tests/unit' || format('components/asio/ examples/{0}', matrix.example) }}
2323 steps :
2424 - name : Checkout esp-protocols
2525 uses : actions/checkout@v4
2626 with :
2727 submodules : recursive
2828 - name : Build ${{ matrix.example }} with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }}
29- working-directory : ${{ env.TEST_DIR }}/${{ matrix.example }}
29+ working-directory : ${{ env.APP_DIR }}
3030 env :
3131 IDF_TARGET : ${{ matrix.idf_target }}
3232 shell : bash
@@ -35,25 +35,12 @@ jobs:
3535 test -f sdkconfig.ci && cat sdkconfig.ci >> sdkconfig.defaults || echo "No sdkconfig.ci"
3636 idf.py set-target ${{ matrix.idf_target }}
3737 idf.py build
38- - name : Merge binaries with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }} for ${{ matrix.example }}
39- working-directory : ${{ env.TEST_DIR }}/${{ matrix.example }}/build
40- env :
41- IDF_TARGET : ${{ matrix.idf_target }}
42- shell : bash
43- run : |
44- . ${IDF_PATH}/export.sh
45- esptool.py --chip ${{ matrix.idf_target }} merge_bin --fill-flash-size 4MB -o flash_image.bin @flash_args
38+ $GITHUB_WORKSPACE/ci/clean_build_artifacts.sh `pwd`/build
39+ zip -qur artifacts.zip build
4640 - uses : actions/upload-artifact@v4
4741 with :
4842 name : examples_app_bin_${{ matrix.idf_target }}_${{ matrix.idf_ver }}_${{ matrix.example }}
49- path : |
50- ${{ env.TEST_DIR }}/${{ matrix.example }}/build/bootloader/bootloader.bin
51- ${{ env.TEST_DIR }}/${{ matrix.example }}/build//partition_table/partition-table.bin
52- ${{ env.TEST_DIR }}/${{ matrix.example }}/build/*.bin
53- ${{ env.TEST_DIR }}/${{ matrix.example }}/build/*.elf
54- ${{ env.TEST_DIR }}/${{ matrix.example }}/build/flasher_args.json
55- ${{ env.TEST_DIR }}/${{ matrix.example }}/build/config/sdkconfig.h
56- ${{ env.TEST_DIR }}/${{ matrix.example }}/build/config/sdkconfig.json
43+ path : ${{ env.APP_DIR }}/artifacts.zip
5744 if-no-files-found : error
5845
5946 target_tests_asio :
@@ -64,25 +51,25 @@ jobs:
6451 name : Target tests
6552 strategy :
6653 matrix :
67- idf_ver : ["latest", "release-v5.1 ", "release-v5.2 ", "release-v5.3 ", "release-v5.4 "]
54+ idf_ver : ["latest", "release-v5.3 ", "release-v5.4 ", "release-v5.5 ", "release-v6.0 "]
6855 idf_target : ["esp32"]
69- example : ["asio_chat", "tcp_echo_server", "udp_echo_server", "ssl_client_server"]
56+ example : ["asio_chat", "tcp_echo_server", "udp_echo_server", "ssl_client_server", "unit" ]
7057 needs : build_asio
7158 runs-on :
7259 - self-hosted
7360 - ESP32-ETHERNET-KIT
7461 env :
75- TEST_DIR : components/asio/examples
62+ APP_DIR : ${{ matrix.example == 'unit' && ' components/asio/tests/unit' || format('components/asio/ examples/{0}', matrix.example) }}
7663 steps :
7764 - name : Clear repository
7865 run : sudo rm -fr $GITHUB_WORKSPACE && mkdir $GITHUB_WORKSPACE
7966 - uses : actions/checkout@v4
8067 - uses : actions/download-artifact@v4
8168 with :
8269 name : examples_app_bin_${{ matrix.idf_target }}_${{ matrix.idf_ver }}_${{ matrix.example }}
83- path : ${{ env.TEST_DIR }}/${{ matrix.example }}/build
70+ path : ${{ env.APP_DIR }}
8471 - name : Run Example Test ${{ matrix.example }} on target
85- working-directory : ${{ env.TEST_DIR }}/${{ matrix.example }}
72+ working-directory : ${{ env.APP_DIR }}
8673 run : |
8774 export PYENV_ROOT="$HOME/.pyenv"
8875 export PATH="$PYENV_ROOT/bin:$PATH"
9885 fi
9986 pyenv activate myenv
10087 python --version
88+ unzip artifacts.zip -d .
10189 python -m pytest --log-cli-level DEBUG --junit-xml=./examples_results_${{ matrix.idf_target }}_${{ matrix.idf_ver }}_${{ matrix.config }}.xml --target=${{ matrix.idf_target }}
10290 - uses : actions/upload-artifact@v4
10391 if : always()
10492 with :
10593 name : examples_results_${{ matrix.idf_target }}_${{ matrix.idf_ver }}_${{ matrix.example }}
106- path : ${{ env.TEST_DIR }}/${{ matrix.example }}/*.xml
94+ path : ${{ env.APP_DIR }}/*.xml
0 commit comments