Merge pull request #1137 from david-cermak/fix/mdns_browse_sync_end_race #1998
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: "lws: build-tests" | |
| on: | |
| push: | |
| branches: | |
| - master | |
| pull_request: | |
| types: [opened, synchronize, reopened, labeled] | |
| jobs: | |
| build_lws: | |
| if: contains(github.event.pull_request.labels.*.name, 'lws') || github.event_name == 'push' | |
| name: Libwebsockets build | |
| strategy: | |
| matrix: | |
| idf_ver: ["release-v5.3", "release-v5.4", "release-v5.5", "release-v6.0"] | |
| test: [ { app: example, path: "examples/client" }] | |
| runs-on: ubuntu-22.04 | |
| container: espressif/idf:${{ matrix.idf_ver }} | |
| env: | |
| TEST_DIR: components/libwebsockets/${{ matrix.test.path }} | |
| steps: | |
| - name: Checkout esp-protocols | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - name: Build ${{ matrix.example }} with IDF-${{ matrix.idf_ver }} | |
| shell: bash | |
| run: | | |
| . ${IDF_PATH}/export.sh | |
| 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@v4 | |
| with: | |
| name: lws_target_esp32_${{ matrix.idf_ver }}_${{ matrix.test.app }} | |
| path: ${{ env.TEST_DIR }}/artifacts.zip | |
| if-no-files-found: error | |
| run-target-lws: | |
| # Skip running on forks since it won't have access to secrets | |
| if: | | |
| github.repository == 'espressif/esp-protocols' && | |
| ( contains(github.event.pull_request.labels.*.name, 'lws') || github.event_name == 'push' ) | |
| name: Target test | |
| needs: build_lws | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| idf_ver: ["release-v5.3", "release-v5.4", "release-v5.5", "release-v6.0"] | |
| idf_target: ["esp32"] | |
| test: [ { app: example, path: "examples/client" }] | |
| runs-on: | |
| - self-hosted | |
| - ESP32-ETHERNET-KIT | |
| env: | |
| TEST_DIR: components/libwebsockets/${{ matrix.test.path }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/download-artifact@v4 | |
| with: | |
| name: lws_target_esp32_${{ matrix.idf_ver }}_${{ matrix.test.app }} | |
| path: ${{ env.TEST_DIR }}/ci/ | |
| - name: Run Example Test on target | |
| working-directory: ${{ env.TEST_DIR }} | |
| run: | | |
| export PYENV_ROOT="$HOME/.pyenv" | |
| export PATH="$PYENV_ROOT/bin:$PATH" | |
| eval "$(pyenv init --path)" | |
| eval "$(pyenv init -)" | |
| if ! pyenv versions --bare | grep -q '^3\.12\.6$'; then | |
| echo "Installing Python 3.12.6..." | |
| pyenv install -s 3.12.6 | |
| fi | |
| if ! pyenv virtualenvs --bare | grep -q '^myenv$'; then | |
| echo "Creating pyenv virtualenv 'myenv'..." | |
| pyenv virtualenv 3.12.6 myenv | |
| fi | |
| pyenv activate myenv | |
| python --version | |
| pip install --only-binary cryptography --extra-index-url https://dl.espressif.com/pypi/ -r $GITHUB_WORKSPACE/ci/requirements.txt | |
| 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@v4 | |
| if: always() | |
| with: | |
| name: results_${{ matrix.test.app }}_${{ matrix.idf_target }}_${{ matrix.idf_ver }}.xml | |
| path: components/libwebsockets/${{ matrix.test.path }}/*.xml |