mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-07-30 18:57:28 +02:00
CI: Organize github workflow structure
This commit is contained in:
36
.github/workflows/build.yml
vendored
36
.github/workflows/build.yml
vendored
@ -1,36 +0,0 @@
|
|||||||
name: Build
|
|
||||||
|
|
||||||
on: [push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
idf_ver: ["latest", "release-v4.1", "release-v4.2", "release-v4.3", "release-v4.4"]
|
|
||||||
example: ["pppos_client", "modem_console", "ap_to_pppos", "simple_cmux_client"]
|
|
||||||
idf_target: ["esp32"]
|
|
||||||
exclude:
|
|
||||||
- idf_ver: "release-v4.1"
|
|
||||||
example: modem_console
|
|
||||||
- idf_ver: "release-v4.1"
|
|
||||||
example: ap_to_pppos
|
|
||||||
- idf_ver: "release-v4.1"
|
|
||||||
example: simple_cmux_client
|
|
||||||
- idf_ver: "release-v4.2"
|
|
||||||
example: simple_cmux_client
|
|
||||||
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
container: espressif/idf:${{ matrix.idf_ver }}
|
|
||||||
steps:
|
|
||||||
- name: Checkout esp-protocols
|
|
||||||
uses: actions/checkout@master
|
|
||||||
with:
|
|
||||||
path: esp-protocols
|
|
||||||
- name: Build ${{ matrix.example }} with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }}
|
|
||||||
env:
|
|
||||||
IDF_TARGET: ${{ matrix.idf_target }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
. ${IDF_PATH}/export.sh
|
|
||||||
cd $GITHUB_WORKSPACE/esp-protocols/components/esp_modem/examples/${{ matrix.example }}
|
|
||||||
idf.py build
|
|
@ -1,38 +0,0 @@
|
|||||||
name: Build mDNS
|
|
||||||
|
|
||||||
on: [push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
idf_ver: ["latest"]
|
|
||||||
idf_target: ["esp32", "esp32s2", "esp32c3"]
|
|
||||||
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
container: espressif/idf:${{ matrix.idf_ver }}
|
|
||||||
steps:
|
|
||||||
- name: Checkout esp-protocols
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
path: esp-protocols
|
|
||||||
- name: Build ${{ matrix.example }} with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }}
|
|
||||||
env:
|
|
||||||
IDF_TARGET: ${{ matrix.idf_target }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
. ${IDF_PATH}/export.sh
|
|
||||||
cd $GITHUB_WORKSPACE/esp-protocols/components/mdns/examples/
|
|
||||||
idf.py set-target ${{ matrix.idf_target }}
|
|
||||||
cat sdkconfig.ci.eth_def >> sdkconfig.defaults
|
|
||||||
idf.py build
|
|
||||||
rm sdkconfig.defaults
|
|
||||||
cat sdkconfig.ci.eth_custom_netif >> sdkconfig.defaults
|
|
||||||
idf.py build
|
|
||||||
rm sdkconfig.defaults
|
|
||||||
cat sdkconfig.ci.eth_socket >> sdkconfig.defaults
|
|
||||||
idf.py build
|
|
||||||
cd $GITHUB_WORKSPACE/esp-protocols/components/mdns/tests/test_apps/
|
|
||||||
idf.py set-target ${{ matrix.idf_target }}
|
|
||||||
idf.py build
|
|
@ -1,82 +0,0 @@
|
|||||||
name: Build Websockets
|
|
||||||
|
|
||||||
on: [push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
idf_ver: ["latest"]
|
|
||||||
idf_target: ["esp32"]
|
|
||||||
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
container: espressif/idf:${{ matrix.idf_ver }}
|
|
||||||
steps:
|
|
||||||
- name: Checkout esp-protocols
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
- name: Build ${{ matrix.example }} with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }}
|
|
||||||
env:
|
|
||||||
IDF_TARGET: ${{ matrix.idf_target }}
|
|
||||||
shell: bash
|
|
||||||
working-directory: components/esp_websocket_client/examples/
|
|
||||||
run: |
|
|
||||||
. ${IDF_PATH}/export.sh
|
|
||||||
cat sdkconfig.ci >> sdkconfig.defaults
|
|
||||||
idf.py build
|
|
||||||
- name: Merge binaries
|
|
||||||
working-directory: components/esp_websocket_client/examples/build
|
|
||||||
env:
|
|
||||||
IDF_TARGET: ${{ matrix.idf_target }}
|
|
||||||
shell: bash
|
|
||||||
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@v2
|
|
||||||
with:
|
|
||||||
name: examples_app_bin_${{ matrix.idf_target }}_${{ matrix.idf_ver }}
|
|
||||||
path: |
|
|
||||||
components/esp_websocket_client/examples/build/bootloader/bootloader.bin
|
|
||||||
components/esp_websocket_client/examples/build/partition_table/partition-table.bin
|
|
||||||
components/esp_websocket_client/examples/build/websocket_example.bin
|
|
||||||
components/esp_websocket_client/examples/build/websocket_example.elf
|
|
||||||
components/esp_websocket_client/examples/build/flasher_args.json
|
|
||||||
components/esp_websocket_client/examples/build/config/sdkconfig.h
|
|
||||||
components/esp_websocket_client/examples/build/config/sdkconfig.json
|
|
||||||
if-no-files-found: error
|
|
||||||
|
|
||||||
run-target:
|
|
||||||
name: Run Example Test on target
|
|
||||||
needs: build
|
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
idf_ver: ["latest"]
|
|
||||||
idf_target: ["esp32"]
|
|
||||||
runs-on:
|
|
||||||
- self-hosted
|
|
||||||
- ESP32-ETHERNET-KIT
|
|
||||||
container:
|
|
||||||
image: python:3.7-buster
|
|
||||||
options: --privileged # Privileged mode has access to serial ports
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v3
|
|
||||||
- uses: actions/download-artifact@v2
|
|
||||||
with:
|
|
||||||
name: examples_app_bin_${{ matrix.idf_target }}_${{ matrix.idf_ver }}
|
|
||||||
path: components/esp_websocket_client/examples/build/
|
|
||||||
- name: Install Python packages
|
|
||||||
env:
|
|
||||||
PIP_EXTRA_INDEX_URL: "https://www.piwheels.org/simple"
|
|
||||||
run: |
|
|
||||||
pip install -r $GITHUB_WORKSPACE/components/esp_websocket_client/examples/requirements.txt
|
|
||||||
- name: Run Example Test on target
|
|
||||||
working-directory: components/esp_websocket_client/examples
|
|
||||||
run: |
|
|
||||||
pytest --log-cli-level DEBUG --junit-xml=./test_app_results_${{ matrix.idf_target }}_${{ matrix.idf_ver }}.xml --target=${{ matrix.idf_target }}
|
|
||||||
- uses: actions/upload-artifact@v2
|
|
||||||
if: always()
|
|
||||||
with:
|
|
||||||
name: examples_results_${{ matrix.idf_target }}_${{ matrix.idf_ver }}
|
|
||||||
path: examples/*.xml
|
|
29
.github/workflows/build_asio.yml
vendored
29
.github/workflows/build_asio.yml
vendored
@ -1,29 +0,0 @@
|
|||||||
name: Build ASIO
|
|
||||||
|
|
||||||
on: [push, pull_request]
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build:
|
|
||||||
strategy:
|
|
||||||
matrix:
|
|
||||||
idf_ver: ["latest"]
|
|
||||||
idf_target: ["esp32", "esp32s2"]
|
|
||||||
example: ["asio_chat", "async_request", "socks4", "ssl_client_server", "tcp_echo_server", "udp_echo_server"]
|
|
||||||
|
|
||||||
runs-on: ubuntu-20.04
|
|
||||||
container: espressif/idf:${{ matrix.idf_ver }}
|
|
||||||
steps:
|
|
||||||
- name: Checkout esp-protocols
|
|
||||||
uses: actions/checkout@v3
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
path: esp-protocols
|
|
||||||
- name: Build ${{ matrix.example }} with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }}
|
|
||||||
env:
|
|
||||||
IDF_TARGET: ${{ matrix.idf_target }}
|
|
||||||
shell: bash
|
|
||||||
run: |
|
|
||||||
. ${IDF_PATH}/export.sh
|
|
||||||
cd $GITHUB_WORKSPACE/esp-protocols/components/asio/examples/${{ matrix.example }}
|
|
||||||
idf.py set-target ${{ matrix.idf_target }}
|
|
||||||
idf.py build
|
|
2
.github/workflows/host-test.yml
vendored
2
.github/workflows/host-test.yml
vendored
@ -4,7 +4,7 @@ on: [push, pull_request]
|
|||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
host_test:
|
host_test:
|
||||||
name: Build and test
|
name: Build and Test on Host
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
container: espressif/idf:release-v4.3
|
container: espressif/idf:release-v4.3
|
||||||
env:
|
env:
|
||||||
|
169
.github/workflows/target-test.yml
vendored
Normal file
169
.github/workflows/target-test.yml
vendored
Normal file
@ -0,0 +1,169 @@
|
|||||||
|
name: Build and Run Target tests
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build_esp_modem:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
idf_ver: ["latest", "release-v4.1", "release-v4.2", "release-v4.3", "release-v4.4"]
|
||||||
|
example: ["pppos_client", "modem_console", "ap_to_pppos", "simple_cmux_client"]
|
||||||
|
idf_target: ["esp32"]
|
||||||
|
exclude:
|
||||||
|
- idf_ver: "release-v4.1"
|
||||||
|
example: modem_console
|
||||||
|
- idf_ver: "release-v4.1"
|
||||||
|
example: ap_to_pppos
|
||||||
|
- idf_ver: "release-v4.1"
|
||||||
|
example: simple_cmux_client
|
||||||
|
- idf_ver: "release-v4.2"
|
||||||
|
example: simple_cmux_client
|
||||||
|
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
container: espressif/idf:${{ matrix.idf_ver }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout esp-protocols
|
||||||
|
uses: actions/checkout@master
|
||||||
|
with:
|
||||||
|
path: esp-protocols
|
||||||
|
- name: Build ${{ matrix.example }} with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }}
|
||||||
|
env:
|
||||||
|
IDF_TARGET: ${{ matrix.idf_target }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
. ${IDF_PATH}/export.sh
|
||||||
|
cd $GITHUB_WORKSPACE/esp-protocols/components/esp_modem/examples/${{ matrix.example }}
|
||||||
|
idf.py build
|
||||||
|
|
||||||
|
build_mdns:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
idf_ver: ["latest"]
|
||||||
|
idf_target: ["esp32", "esp32s2", "esp32c3"]
|
||||||
|
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
container: espressif/idf:${{ matrix.idf_ver }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout esp-protocols
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
path: esp-protocols
|
||||||
|
- name: Build ${{ matrix.example }} with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }}
|
||||||
|
env:
|
||||||
|
IDF_TARGET: ${{ matrix.idf_target }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
. ${IDF_PATH}/export.sh
|
||||||
|
cd $GITHUB_WORKSPACE/esp-protocols/components/mdns/examples/
|
||||||
|
idf.py set-target ${{ matrix.idf_target }}
|
||||||
|
cat sdkconfig.ci.eth_def >> sdkconfig.defaults
|
||||||
|
idf.py build
|
||||||
|
rm sdkconfig.defaults
|
||||||
|
cat sdkconfig.ci.eth_custom_netif >> sdkconfig.defaults
|
||||||
|
idf.py build
|
||||||
|
rm sdkconfig.defaults
|
||||||
|
cat sdkconfig.ci.eth_socket >> sdkconfig.defaults
|
||||||
|
idf.py build
|
||||||
|
cd $GITHUB_WORKSPACE/esp-protocols/components/mdns/tests/test_apps/
|
||||||
|
idf.py set-target ${{ matrix.idf_target }}
|
||||||
|
idf.py build
|
||||||
|
|
||||||
|
build_asio:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
idf_ver: ["latest"]
|
||||||
|
idf_target: ["esp32", "esp32s2"]
|
||||||
|
example: ["asio_chat", "async_request", "socks4", "ssl_client_server", "tcp_echo_server", "udp_echo_server"]
|
||||||
|
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
container: espressif/idf:${{ matrix.idf_ver }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout esp-protocols
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
path: esp-protocols
|
||||||
|
- name: Build ${{ matrix.example }} with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }}
|
||||||
|
env:
|
||||||
|
IDF_TARGET: ${{ matrix.idf_target }}
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
. ${IDF_PATH}/export.sh
|
||||||
|
cd $GITHUB_WORKSPACE/esp-protocols/components/asio/examples/${{ matrix.example }}
|
||||||
|
idf.py set-target ${{ matrix.idf_target }}
|
||||||
|
idf.py build
|
||||||
|
|
||||||
|
build_websocket:
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
idf_ver: ["latest"]
|
||||||
|
idf_target: ["esp32"]
|
||||||
|
|
||||||
|
runs-on: ubuntu-20.04
|
||||||
|
container: espressif/idf:${{ matrix.idf_ver }}
|
||||||
|
steps:
|
||||||
|
- name: Checkout esp-protocols
|
||||||
|
uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
submodules: recursive
|
||||||
|
- name: Build ${{ matrix.example }} with IDF-${{ matrix.idf_ver }} for ${{ matrix.idf_target }}
|
||||||
|
env:
|
||||||
|
IDF_TARGET: ${{ matrix.idf_target }}
|
||||||
|
shell: bash
|
||||||
|
working-directory: components/esp_websocket_client/examples/
|
||||||
|
run: |
|
||||||
|
. ${IDF_PATH}/export.sh
|
||||||
|
cat sdkconfig.ci >> sdkconfig.defaults
|
||||||
|
idf.py build
|
||||||
|
- name: Merge binaries
|
||||||
|
working-directory: components/esp_websocket_client/examples/build
|
||||||
|
env:
|
||||||
|
IDF_TARGET: ${{ matrix.idf_target }}
|
||||||
|
shell: bash
|
||||||
|
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@v2
|
||||||
|
with:
|
||||||
|
name: examples_app_bin_${{ matrix.idf_target }}_${{ matrix.idf_ver }}
|
||||||
|
path: components/esp_websocket_client/examples/build/
|
||||||
|
if-no-files-found: error
|
||||||
|
|
||||||
|
run-target:
|
||||||
|
name: Run Websocket Example Test on target
|
||||||
|
needs: build_websocket
|
||||||
|
strategy:
|
||||||
|
fail-fast: false
|
||||||
|
matrix:
|
||||||
|
idf_ver: ["latest"]
|
||||||
|
idf_target: ["esp32"]
|
||||||
|
runs-on:
|
||||||
|
- self-hosted
|
||||||
|
- ESP32-ETHERNET-KIT
|
||||||
|
container:
|
||||||
|
image: python:3.7-buster
|
||||||
|
options: --privileged # Privileged mode has access to serial ports
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
- uses: actions/download-artifact@v2
|
||||||
|
with:
|
||||||
|
name: examples_app_bin_${{ matrix.idf_target }}_${{ matrix.idf_ver }}
|
||||||
|
path: components/esp_websocket_client/examples/build/
|
||||||
|
- name: Install Python packages
|
||||||
|
env:
|
||||||
|
PIP_EXTRA_INDEX_URL: "https://www.piwheels.org/simple"
|
||||||
|
run: |
|
||||||
|
pip install -r $GITHUB_WORKSPACE/components/esp_websocket_client/examples/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
|
||||||
|
working-directory: components/esp_websocket_client/examples
|
||||||
|
run: |
|
||||||
|
cp sdkconfig.ci sdkconfig.defaults
|
||||||
|
pytest --log-cli-level DEBUG --junit-xml=./test_app_results_${{ matrix.idf_target }}_${{ matrix.idf_ver }}.xml --target=${{ matrix.idf_target }}
|
||||||
|
- uses: actions/upload-artifact@v2
|
||||||
|
if: always()
|
||||||
|
with:
|
||||||
|
name: examples_results_${{ matrix.idf_target }}_${{ matrix.idf_ver }}
|
||||||
|
path: examples/*.xml
|
Reference in New Issue
Block a user