forked from espressif/esp-protocols
49 lines
1.5 KiB
YAML
49 lines
1.5 KiB
YAML
name: "examples: build/host-tests"
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
types: [opened, synchronize, reopened, labeled]
|
|
|
|
jobs:
|
|
build_all_examples:
|
|
if: contains(github.event.pull_request.labels.*.name, 'examples') || github.event_name == 'push'
|
|
name: Build examples
|
|
strategy:
|
|
matrix:
|
|
idf_ver: ["latest", "release-v5.1"]
|
|
runs-on: ubuntu-22.04
|
|
container: espressif/idf:${{ matrix.idf_ver }}
|
|
steps:
|
|
- name: Checkout esp-protocols
|
|
uses: actions/checkout@v4
|
|
- name: Build with IDF-${{ matrix.idf_ver }}
|
|
shell: bash
|
|
run: |
|
|
. ${IDF_PATH}/export.sh
|
|
python -m pip install idf-build-apps
|
|
# Build default configs for all targets
|
|
python ./ci/build_apps.py examples -m examples/.build-test-rules.yml -d -c
|
|
|
|
build_and_run_on_host:
|
|
if: contains(github.event.pull_request.labels.*.name, 'examples') || github.event_name == 'push'
|
|
name: Build and run examples on linux
|
|
strategy:
|
|
matrix:
|
|
idf_ver: ["latest"]
|
|
runs-on: ubuntu-22.04
|
|
container: espressif/idf:${{ matrix.idf_ver }}
|
|
steps:
|
|
- name: Checkout esp-protocols
|
|
uses: actions/checkout@v4
|
|
- name: Build with IDF-${{ matrix.idf_ver }}
|
|
shell: bash
|
|
run: |
|
|
. ${IDF_PATH}/export.sh
|
|
python -m pip install idf-build-apps
|
|
python ./ci/build_apps.py examples/mqtt -l -t linux
|
|
timeout 5 ./examples/mqtt/build_linux_default/esp_mqtt_demo.elf | tee test.log || true
|
|
grep 'MQTT_EVENT_DATA' test.log
|