@@ -49,3 +49,109 @@ jobs:
4949 grep esp_wifi_remote_init ${dir}sample.map | grep libwifi_remote_over_at.a || exit 1
5050 echo -e "esp_wifi_remote_init linked from libwifi_remote_over_at"
5151 done
52+
53+
54+ build_wrmt_over_at_slave :
55+ if : contains(github.event.pull_request.labels.*.name, 'at') || github.event_name == 'push'
56+ name : Build WRMT-AT Slave
57+ runs-on : ubuntu-latest
58+ steps :
59+ - name : Checkout code
60+ uses : actions/checkout@v3
61+ - name : Checkout esp-protocols
62+ uses : actions/checkout@v3
63+ with :
64+ repository : espressif/esp-protocols
65+ ref : mqtt_cxx-v0.5.0
66+ path : protocols
67+ - name : Checkout idf
68+ uses : actions/checkout@v3
69+ with :
70+ repository : espressif/esp-idf
71+ ref : 8ad0d3d8f2faab752635bee36070313c47c07a13
72+ path : idf
73+ - name : Build modem_sim from esp-protocols
74+ shell : bash
75+ run : |
76+ export IDF_PATH=$GITHUB_WORKSPACE/idf
77+ ${IDF_PATH}/install.sh
78+ cd $GITHUB_WORKSPACE/protocols/common_components/modem_sim
79+ ./install.sh PLATFORM_ESP32C6 ESP32C6-4MB 22 23
80+ source export.sh
81+ idf.py build
82+ shopt -s extglob # enable extended globs for selective cleanup
83+ rm -rf build/!(*.bin|*.elf|*.map|bootloader|partition_table|customized_partitions|flasher_args.json|download.config|factory)
84+ if [ -d build/bootloader ]; then rm -rf build/bootloader/!(*.bin); fi
85+ if [ -d build/partition_table ]; then rm -rf build/partition_table/!(*.bin); fi
86+ shopt -u extglob
87+ zip -qur artifacts.zip build
88+ ls -la
89+ mv artifacts.zip ${GITHUB_WORKSPACE}/
90+ - uses : actions/upload-artifact@v4
91+ with :
92+ name : wrmt_over_at_slave
93+ path : artifacts.zip
94+ if-no-files-found : error
95+
96+ build_wrmt_over_at_host :
97+ name : Build WRMT-AT Host
98+ strategy :
99+ matrix :
100+ idf_ver : ["latest"]
101+ runs-on : ubuntu-latest
102+ container : espressif/idf:${{ matrix.idf_ver }}
103+ steps :
104+ - name : Checkout code
105+ uses : actions/checkout@v3
106+ - name : Build with IDF-${{ matrix.idf_ver }}
107+ shell : bash
108+ run : |
109+ ${IDF_PATH}/install.sh --enable-ci
110+ . ${IDF_PATH}/export.sh
111+ cd ./components/esp_wifi_remote/examples/mqtt
112+ idf.py add-dependency wifi_remote_over_at
113+ idf.py build -D SDKCONFIG_DEFAULTS=custom.sdkconfig.at
114+ shopt -s extglob # enable extended globs for selective cleanup
115+ rm -rf build/!(*.bin|*.elf|*.map|bootloader|config|partition_table|customized_partitions|flasher_args.json|download.config|factory)
116+ if [ -d build/bootloader ]; then rm -rf build/bootloader/!(*.bin); fi
117+ if [ -d build/partition_table ]; then rm -rf build/partition_table/!(*.bin); fi
118+ zip -qur artifacts.zip build
119+ - uses : actions/upload-artifact@v4
120+ with :
121+ name : wrmt_over_at_host
122+ path : ./components/esp_wifi_remote/examples/mqtt/artifacts.zip
123+ if-no-files-found : error
124+
125+ run_example :
126+ # Skip running on forks since it won't have access to secrets
127+ if : github.repository == 'espressif/esp-wifi-remote'
128+ name : AT target test
129+ needs :
130+ - build_wrmt_over_at_slave
131+ - build_wrmt_over_at_host
132+ strategy :
133+ matrix :
134+ idf_ver : ["latest"]
135+ runs-on : [self-hosted, wifi-remote]
136+ container :
137+ image : python:3.11-bookworm
138+ options : --privileged # Privileged mode has access to serial ports
139+ env :
140+ TEST_DIR : components/esp_wifi_remote/examples
141+ steps :
142+ - uses : actions/checkout@v4
143+ - uses : actions/download-artifact@v4
144+ with :
145+ name : wrmt_over_at_host
146+ path : ${{ env.TEST_DIR }}/mqtt/
147+ - uses : actions/download-artifact@v4
148+ with :
149+ name : wrmt_over_at_slave
150+ path : ${{ env.TEST_DIR }}/server/
151+ - name : Run Test
152+ working-directory : ${{ env.TEST_DIR }}
153+ run : |
154+ python -m pip install pytest-embedded-serial-esp pytest-embedded-idf pytest-rerunfailures pytest-timeout pytest-ignore-test-results
155+ unzip server/artifacts.zip -d server/
156+ unzip mqtt/artifacts.zip -d mqtt/
157+ python -m pytest --log-cli-level DEBUG --target esp32c6,esp32p4
0 commit comments