forked from espressif/esp-protocols
fix(ci): Add IDF v5.1 in IDF tests for websockets
This commit is contained in:
@ -13,45 +13,32 @@ jobs:
|
|||||||
name: Build
|
name: Build
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
idf_ver: ["release-v5.0", "latest"]
|
idf_ver: ["release-v5.0", "release-v5.1", "latest"]
|
||||||
idf_target: ["esp32"]
|
test: [ { app: example, path: "examples" } ]
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
container: espressif/idf:${{ matrix.idf_ver }}
|
container: espressif/idf:${{ matrix.idf_ver }}
|
||||||
env:
|
env:
|
||||||
TEST_DIR: components/esp_websocket_client/examples
|
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@v3
|
||||||
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 }}
|
||||||
env:
|
|
||||||
IDF_TARGET: ${{ matrix.idf_target }}
|
|
||||||
shell: bash
|
|
||||||
working-directory: ${{ env.TEST_DIR }}
|
|
||||||
run: |
|
|
||||||
. ${IDF_PATH}/export.sh
|
|
||||||
cat sdkconfig.ci >> sdkconfig.defaults
|
|
||||||
idf.py build
|
|
||||||
- name: Merge binaries
|
|
||||||
working-directory: ${{ env.TEST_DIR }}/build
|
|
||||||
env:
|
|
||||||
IDF_TARGET: ${{ matrix.idf_target }}
|
|
||||||
shell: bash
|
shell: bash
|
||||||
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
|
python -m pip install idf-build-apps
|
||||||
|
python ./ci/build_apps.py ${TEST_DIR}
|
||||||
|
cd ${TEST_DIR}
|
||||||
|
for dir in `ls -d build_esp32_*`; do
|
||||||
|
$GITHUB_WORKSPACE/ci/clean_build_artifacts.sh `pwd`/$dir
|
||||||
|
zip -qur artifacts.zip $dir
|
||||||
|
done
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: examples_app_bin_${{ matrix.idf_target }}_${{ matrix.idf_ver }}
|
name: websocket_bin_esp32_${{ matrix.idf_ver }}_${{ matrix.test.app }}
|
||||||
path: |
|
path: ${{ env.TEST_DIR }}/artifacts.zip
|
||||||
${{ env.TEST_DIR }}/build/bootloader/bootloader.bin
|
|
||||||
${{ env.TEST_DIR }}/build/partition_table/partition-table.bin
|
|
||||||
${{ env.TEST_DIR }}/build/*.bin
|
|
||||||
${{ env.TEST_DIR }}/build/*.elf
|
|
||||||
${{ env.TEST_DIR }}/build/flasher_args.json
|
|
||||||
${{ env.TEST_DIR }}/build/config/sdkconfig.h
|
|
||||||
${{ env.TEST_DIR }}/build/config/sdkconfig.json
|
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
|
|
||||||
run-target-websocket:
|
run-target-websocket:
|
||||||
@ -64,32 +51,36 @@ jobs:
|
|||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
idf_ver: ["release-v5.0", "latest"]
|
idf_ver: ["release-v5.0", "release-v5.1", "latest"]
|
||||||
idf_target: ["esp32"]
|
idf_target: ["esp32"]
|
||||||
|
test: [ { app: example, path: "examples" } ]
|
||||||
runs-on:
|
runs-on:
|
||||||
- self-hosted
|
- self-hosted
|
||||||
- ESP32-ETHERNET-KIT
|
- ESP32-ETHERNET-KIT
|
||||||
env:
|
env:
|
||||||
TEST_DIR: components/esp_websocket_client/examples
|
TEST_DIR: components/esp_websocket_client/${{ matrix.test.path }}
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
- uses: actions/download-artifact@v3
|
- uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: examples_app_bin_${{ matrix.idf_target }}_${{ matrix.idf_ver }}
|
name: websocket_bin_esp32_${{ matrix.idf_ver }}_${{ matrix.test.app }}
|
||||||
path: ${{ env.TEST_DIR }}/build/
|
path: ${{ env.TEST_DIR }}/ci/
|
||||||
- name: Install Python packages
|
- name: Install Python packages
|
||||||
env:
|
env:
|
||||||
PIP_EXTRA_INDEX_URL: "https://www.piwheels.org/simple"
|
PIP_EXTRA_INDEX_URL: "https://www.piwheels.org/simple"
|
||||||
run: |
|
run: |
|
||||||
pip install --only-binary cryptography --extra-index-url https://dl.espressif.com/pypi/ -r $GITHUB_WORKSPACE/ci/requirements.txt
|
pip install --only-binary cryptography --extra-index-url https://dl.espressif.com/pypi/ -r $GITHUB_WORKSPACE/ci/requirements.txt
|
||||||
- name: Download Example Test to target
|
|
||||||
run: python -m esptool --chip ${{ matrix.idf_target }} write_flash 0x0 components/esp_websocket_client/examples/build/flash_image.bin
|
|
||||||
- name: Run Example Test on target
|
- name: Run Example Test on target
|
||||||
working-directory: ${{ env.TEST_DIR }}
|
working-directory: ${{ env.TEST_DIR }}
|
||||||
run: |
|
run: |
|
||||||
python -m pytest --log-cli-level DEBUG --junit-xml=./examples_results_${{ matrix.idf_target }}_${{ matrix.idf_ver }}.xml --target=${{ matrix.idf_target }}
|
unzip ci/artifacts.zip -d ci
|
||||||
|
for dir in `ls -d ci/build_*`; do
|
||||||
|
rm -rf build sdkconfig.defaults
|
||||||
|
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@v3
|
||||||
if: always()
|
if: always()
|
||||||
with:
|
with:
|
||||||
name: examples_results_${{ matrix.idf_target }}_${{ matrix.idf_ver }}
|
name: results_${{ matrix.test.app }}_${{ matrix.idf_target }}_${{ matrix.idf_ver }}.xml
|
||||||
path: ${{ env.TEST_DIR }}/*.xml
|
path: components/esp_websocket_client/${{ matrix.test.path }}/*.xml
|
||||||
|
Reference in New Issue
Block a user