mirror of
https://github.com/espressif/esp-protocols.git
synced 2025-08-13 17:44:29 +02:00
Merge pull request #1 from david-cermak/master
CI: Initial GitHub Action to build examples
This commit is contained in:
36
.github/workflows/build.yml
vendored
Normal file
36
.github/workflows/build.yml
vendored
Normal file
@@ -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
|
@@ -25,6 +25,7 @@ esp_err_t modem_init_network(esp_netif_t *netif)
|
|||||||
return ESP_FAIL;
|
return ESP_FAIL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_EXAMPLE_NEED_SIM_PIN
|
||||||
// configure the PIN
|
// configure the PIN
|
||||||
bool pin_ok = false;
|
bool pin_ok = false;
|
||||||
if (esp_modem_read_pin(dce, &pin_ok) == ESP_OK && 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();
|
abort();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif // CONFIG_EXAMPLE_NEED_SIM_PIN
|
||||||
return ESP_OK;
|
return ESP_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -83,9 +83,9 @@ static int do_http_client(int argc, char **argv)
|
|||||||
|
|
||||||
esp_err_t err = esp_http_client_perform(client);
|
esp_err_t err = esp_http_client_perform(client);
|
||||||
if (err == ESP_OK) {
|
if (err == ESP_OK) {
|
||||||
ESP_LOGI(TAG, "HTTP GET Status = %d, content_length = %d",
|
uint64_t content_length = esp_http_client_get_content_length(client);
|
||||||
esp_http_client_get_status_code(client),
|
ESP_LOGI(TAG, "HTTP GET Status = %d, content_length = %lld",
|
||||||
esp_http_client_get_content_length(client));
|
esp_http_client_get_status_code(client), content_length);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
ESP_LOGE(TAG, "HTTP GET request failed: %s", esp_err_to_name(err));
|
ESP_LOGE(TAG, "HTTP GET request failed: %s", esp_err_to_name(err));
|
||||||
|
@@ -6,6 +6,7 @@ CONFIG_LWIP_TCPIP_TASK_STACK_SIZE=4096
|
|||||||
CONFIG_LWIP_PPP_ENABLE_IPV6=n
|
CONFIG_LWIP_PPP_ENABLE_IPV6=n
|
||||||
CONFIG_COMPILER_CXX_EXCEPTIONS=y
|
CONFIG_COMPILER_CXX_EXCEPTIONS=y
|
||||||
CONFIG_PARTITION_TABLE_TWO_OTA=y
|
CONFIG_PARTITION_TABLE_TWO_OTA=y
|
||||||
|
CONFIG_ESPTOOLPY_FLASHSIZE_4MB=y
|
||||||
CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF=y
|
CONFIG_NEWLIB_STDOUT_LINE_ENDING_LF=y
|
||||||
CONFIG_NEWLIB_STDIN_LINE_ENDING_LF=y
|
CONFIG_NEWLIB_STDIN_LINE_ENDING_LF=y
|
||||||
CONFIG_MAIN_TASK_STACK_SIZE=8192
|
CONFIG_MAIN_TASK_STACK_SIZE=8192
|
Reference in New Issue
Block a user