diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 000000000..cfcb590a7 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,36 @@ +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 diff --git a/components/esp_modem/examples/ap_to_pppos/main/network_dce.c b/components/esp_modem/examples/ap_to_pppos/main/network_dce.c index 499593aa2..8c825a0fd 100644 --- a/components/esp_modem/examples/ap_to_pppos/main/network_dce.c +++ b/components/esp_modem/examples/ap_to_pppos/main/network_dce.c @@ -25,6 +25,7 @@ esp_err_t modem_init_network(esp_netif_t *netif) return ESP_FAIL; } +#ifdef CONFIG_EXAMPLE_NEED_SIM_PIN // configure the PIN bool pin_ok = false; if (esp_modem_read_pin(dce, &pin_ok) == ESP_OK && pin_ok == false) { @@ -34,6 +35,7 @@ esp_err_t modem_init_network(esp_netif_t *netif) abort(); } } +#endif // CONFIG_EXAMPLE_NEED_SIM_PIN return ESP_OK; } diff --git a/components/esp_modem/examples/modem_console/main/httpget_handle.c b/components/esp_modem/examples/modem_console/main/httpget_handle.c index da15b75d9..71eb219c9 100644 --- a/components/esp_modem/examples/modem_console/main/httpget_handle.c +++ b/components/esp_modem/examples/modem_console/main/httpget_handle.c @@ -83,9 +83,9 @@ static int do_http_client(int argc, char **argv) esp_err_t err = esp_http_client_perform(client); if (err == ESP_OK) { - ESP_LOGI(TAG, "HTTP GET Status = %d, content_length = %d", - esp_http_client_get_status_code(client), - esp_http_client_get_content_length(client)); + uint64_t content_length = esp_http_client_get_content_length(client); + ESP_LOGI(TAG, "HTTP GET Status = %d, content_length = %lld", + esp_http_client_get_status_code(client), content_length); return 0; } ESP_LOGE(TAG, "HTTP GET request failed: %s", esp_err_to_name(err)); diff --git a/components/esp_modem/examples/simple_cmux_client/sdkconfig.defaults b/components/esp_modem/examples/simple_cmux_client/sdkconfig.defaults index 7841f6833..b6fa51455 100644 --- a/components/esp_modem/examples/simple_cmux_client/sdkconfig.defaults +++ b/components/esp_modem/examples/simple_cmux_client/sdkconfig.defaults @@ -6,6 +6,7 @@ CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=4096 CONFIG_LWIP_PPP_ENABLE_IPV6=n CONFIG_COMPILER_CXX_EXCEPTIONS=y CONFIG_PARTITION_TABLE_TWO_OTA=y +CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF=y CONFIG_NEWLIB_STDIN_LINE_ENDING_LF=y CONFIG_MAIN_TASK_STACK_SIZE=8192 \ No newline at end of file