@@ -49,3 +49,120 @@ 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 WiFi Remote over 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 : david-cermak/esp-protocols
65+ ref : feat/modem_sim_params
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 ESP-AT
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+
97+ build_wrmt_over_at_host :
98+ name : Build WiFi Remote Example
99+ strategy :
100+ matrix :
101+ idf_ver : ["latest"]
102+ runs-on : ubuntu-latest
103+ container : espressif/idf:${{ matrix.idf_ver }}
104+ steps :
105+ - name : Checkout code
106+ uses : actions/checkout@v3
107+ - name : Checkout protocols
108+ uses : actions/checkout@v3
109+ with :
110+ repository : espressif/esp-protocols
111+ ref : eppp-v1.1.3
112+ sparse-checkout : |
113+ ci/build_apps.py
114+ ci/ignore_build_warnings.txt
115+ ci/clean_build_artifacts.sh
116+ sparse-checkout-cone-mode : false
117+ path : protocols
118+ - name : Build with IDF-${{ matrix.idf_ver }}
119+ env :
120+ EXPECTED_WARNING : " Warning: The smallest app partition is nearly full\n Warning: Deprecated: Option\n "
121+ shell : bash
122+ run : |
123+ ${IDF_PATH}/install.sh --enable-ci
124+ . ${IDF_PATH}/export.sh
125+ cd ./components/esp_wifi_remote/examples/mqtt
126+ idf.py add-dependency wifi_remote_over_at
127+ idf.py build -D SDKCONFIG_DEFAULTS=custom.sdkconfig.at
128+ ${GITHUB_WORKSPACE}/protocols/ci/clean_build_artifacts.sh `pwd`/build
129+ zip -qur artifacts.zip build
130+ - uses : actions/upload-artifact@v4
131+ with :
132+ name : wrmt_over_at_host
133+ path : ./components/esp_wifi_remote/examples/mqtt/artifacts.zip
134+ if-no-files-found : error
135+
136+ run_example :
137+ # Skip running on forks since it won't have access to secrets
138+ if : github.repository == 'espressif/esp-wifi-remote'
139+ name : AT target test
140+ needs :
141+ - build_wrmt_over_at_slave
142+ - build_wrmt_over_at_host
143+ strategy :
144+ matrix :
145+ idf_ver : ["latest"]
146+ runs-on : [self-hosted, wifi-remote]
147+ container :
148+ image : python:3.11-bookworm
149+ options : --privileged # Privileged mode has access to serial ports
150+ env :
151+ TEST_DIR : components/esp_wifi_remote/examples
152+ steps :
153+ - uses : actions/checkout@v4
154+ - uses : actions/download-artifact@v4
155+ with :
156+ name : wrmt_over_at_host
157+ path : ${{ env.TEST_DIR }}/mqtt/
158+ - uses : actions/download-artifact@v4
159+ with :
160+ name : wrmt_over_at_slave
161+ path : ${{ env.TEST_DIR }}/server/
162+ - name : Run Test
163+ working-directory : ${{ env.TEST_DIR }}
164+ run : |
165+ python -m pip install pytest-embedded-serial-esp pytest-embedded-idf pytest-rerunfailures pytest-timeout pytest-ignore-test-results
166+ unzip server/artifacts.zip -d server/
167+ unzip mqtt/artifacts.zip -d mqtt/
168+ python -m pytest --log-cli-level DEBUG --target esp32c6,esp32p4
0 commit comments