Skip to content

Commit 9fad70b

Browse files
committed
Merge branch 'ci/update_github_ci' into 'master'
change(ESPAT-2105): Updated github action workflows See merge request application/esp-at!1900
2 parents 48916ad + 0e36850 commit 9fad70b

8 files changed

Lines changed: 257 additions & 82 deletions

.github/workflows/build_template_esp32.yml

Lines changed: 20 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ on:
1616
enable_all_bt_features_no_wifi:
1717
required: false
1818
type: boolean
19+
enable_at_debug:
20+
required: false
21+
type: boolean
1922
# parameters from upstream inherit
2023
secrets:
2124
AT_OTA_TOKEN_WROOM32:
@@ -32,61 +35,36 @@ on:
3235
jobs:
3336
build-template-esp32:
3437
runs-on: ubuntu-latest
38+
env:
39+
PLATFORM: PLATFORM_ESP32
40+
MODULE_NAME: ${{ inputs.module_name }}
41+
SILENCE: 1
3542
steps:
3643
- uses: actions/checkout@v4.2.0
3744
- uses: actions/setup-python@v5.3.0
3845
with:
3946
python-version: '3.10'
40-
- name: Set module information
47+
- name: Set up environment variables
4148
run: |
42-
mkdir build
43-
echo -e "{\"platform\": \"PLATFORM_ESP32\", \"module\": \"${{ inputs.module_name }}\", \"silence\": 1}" > build/module_info.json
44-
echo "silence_sdkconfig=module_config/module_wrover-32/sdkconfig_silence.defaults" >> $GITHUB_ENV
49+
source .github/workflows/utils.sh && setup_env_variables
4550
- name: Enable all Wi-Fi features without BLE
4651
if: ${{ inputs.enable_all_wifi_features_no_bt == true }}
4752
run: |
48-
echo -e "CONFIG_AT_FS_COMMAND_SUPPORT=y" >> ${silence_sdkconfig}
49-
echo -e "CONFIG_AT_EAP_COMMAND_SUPPORT=y" >> ${silence_sdkconfig}
50-
echo -e "CONFIG_AT_DRIVER_COMMAND_SUPPORT=y" >> ${silence_sdkconfig}
51-
echo -e "CONFIG_AT_WEB_SERVER_SUPPORT=y" >> ${silence_sdkconfig}
52-
echo -e "CONFIG_AT_WS_COMMAND_SUPPORT=y" >> ${silence_sdkconfig}
53-
echo -e "CONFIG_AT_WEB_CAPTIVE_PORTAL_ENABLE=y" >> ${silence_sdkconfig}
54-
# disable BT
55-
echo -e "CONFIG_AT_BLE_COMMAND_SUPPORT=n" >> ${silence_sdkconfig}
56-
echo -e "CONFIG_AT_BLE_HID_COMMAND_SUPPORT=n" >> ${silence_sdkconfig}
57-
echo -e "CONFIG_AT_BLUFI_COMMAND_SUPPORT=n" >> ${silence_sdkconfig}
58-
echo -e "CONFIG_AT_BT_COMMAND_SUPPORT=n" >> ${silence_sdkconfig}
53+
source .github/workflows/utils.sh
54+
enable_all_wifi_cmds && disable_ble_cmds
5955
- name: Enable all BT features without Wi-Fi
6056
if: ${{ inputs.enable_all_bt_features_no_wifi == true }}
6157
run: |
62-
echo -e "CONFIG_AT_BT_COMMAND_SUPPORT=y" >> ${silence_sdkconfig}
63-
echo -e "CONFIG_AT_BT_SPP_COMMAND_SUPPORT=y" >> ${silence_sdkconfig}
64-
echo -e "CONFIG_AT_BT_A2DP_COMMAND_SUPPORT=y" >> ${silence_sdkconfig}
65-
# disable non BT
66-
echo -e "CONFIG_AT_FS_COMMAND_SUPPORT=n" >> ${silence_sdkconfig}
67-
echo -e "CONFIG_AT_ETHERNET_SUPPORT=n" >> ${silence_sdkconfig}
68-
echo -e "CONFIG_AT_EAP_COMMAND_SUPPORT=n" >> ${silence_sdkconfig}
69-
echo -e "CONFIG_AT_DRIVER_COMMAND_SUPPORT=n" >> ${silence_sdkconfig}
70-
echo -e "CONFIG_AT_WEB_SERVER_SUPPORT=n" >> ${silence_sdkconfig}
71-
echo -e "CONFIG_AT_WEB_CAPTIVE_PORTAL_ENABLE=n" >> ${silence_sdkconfig}
72-
echo -e "CONFIG_AT_OTA_SUPPORT=n" >> ${silence_sdkconfig}
73-
echo -e "CONFIG_AT_MDNS_COMMAND_SUPPORT=n" >> ${silence_sdkconfig}
74-
echo -e "CONFIG_AT_WPS_COMMAND_SUPPORT=n" >> ${silence_sdkconfig}
75-
echo -e "CONFIG_AT_SMARTCONFIG_COMMAND_SUPPORT=n" >> ${silence_sdkconfig}
76-
echo -e "CONFIG_AT_PING_COMMAND_SUPPORT=n" >> ${silence_sdkconfig}
77-
echo -e "CONFIG_AT_MQTT_COMMAND_SUPPORT=n" >> ${silence_sdkconfig}
78-
echo -e "CONFIG_AT_HTTP_COMMAND_SUPPORT=n" >> ${silence_sdkconfig}
79-
echo -e "CONFIG_AT_SIGNALING_COMMAND_SUPPORT=n" >> ${silence_sdkconfig}
80-
echo -e "CONFIG_ESP_WIFI_SLP_IRAM_OPT=n" >> ${silence_sdkconfig}
58+
source .github/workflows/utils.sh
59+
enable_bt_cmds && disable_all_wifi_cmds
60+
- name: Enable AT debug log
61+
if: ${{ inputs.enable_at_debug == true }}
62+
run: |
63+
source .github/workflows/utils.sh && enable_at_debug
8164
- name: Enlarge app partition size
82-
if: ${{ inputs.enable_all_wifi_features_no_bt == true || inputs.enable_all_bt_features_no_wifi == true }}
65+
if: ${{ inputs.enable_all_wifi_features_no_bt == true || inputs.enable_all_bt_features_no_wifi == true || inputs.enable_at_debug == true }}
8366
run: |
84-
app0_size=`cat module_config/module_wrover-32/partitions_at.csv | grep ota_0 | awk -F, '{print $5}'`
85-
app1_size=`cat module_config/module_wrover-32/partitions_at.csv | grep ota_1 | awk -F, '{print $5}'`
86-
to_set_size=$((app0_size + app1_size))
87-
sed -i '/ota_1/d' module_config/module_wrover-32/partitions_at.csv
88-
to_set_hex_size=`printf "0x%x" ${to_set_size}`
89-
sed -i '/ota_0/s,'"$app0_size"','"$to_set_hex_size"',g' module_config/module_wrover-32/partitions_at.csv
67+
source .github/workflows/utils.sh && enlarge_app_partition
9068
- name: Set up OTA tokens
9169
run: |
9270
cd components/at/private_include
@@ -103,9 +81,8 @@ jobs:
10381
echo -e "#define CONFIG_ESP_AT_OTA_TOKEN_ESP32_MINI_1 \"${{ secrets.AT_OTA_TOKEN_ESP32_MINI_1 }}\"" >> at_ota_token.h
10482
echo -e "#define CONFIG_ESP_AT_OTA_SSL_TOKEN_ESP32_MINI_1 \"${{ secrets.AT_OTA_TOKEN_ESP32_MINI_1 }}\"" >> at_ota_token.h
10583
cd -
106-
- name: Install environment variables
84+
- name: Install compilation environment
10785
run: |
108-
echo "ESP_AT_FIRMWARE_FROM=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" >> "$GITHUB_ENV"
10986
./build.py install
11087
- name: Compile
11188
run: |

.github/workflows/build_template_esp32c2.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
enable_ble_cmds:
1414
required: false
1515
type: boolean
16+
enable_at_debug:
17+
required: false
18+
type: boolean
1619
# parameters from upstream inherit
1720
secrets:
1821
ESP32C2_4MB_TOKEN:
@@ -27,19 +30,26 @@ on:
2730
jobs:
2831
build-template-esp32c2:
2932
runs-on: ubuntu-latest
33+
env:
34+
PLATFORM: PLATFORM_ESP32C2
35+
MODULE_NAME: ${{ inputs.module_name }}
36+
SILENCE: 0
3037
steps:
3138
- uses: actions/checkout@v4.2.0
3239
- uses: actions/setup-python@v5.3.0
3340
with:
3441
python-version: '3.10'
35-
- name: Set module information
42+
- name: Set up environment variables
3643
run: |
37-
mkdir build
38-
echo -e "{\"platform\": \"PLATFORM_ESP32C2\", \"module\": \"${{ inputs.module_name }}\", \"silence\": 0}" > build/module_info.json
44+
source .github/workflows/utils.sh && setup_env_variables
3945
- name: Enable BLE commands
4046
if: ${{ inputs.enable_ble_cmds == true }}
4147
run: |
42-
echo -e "CONFIG_AT_BLE_COMMAND_SUPPORT=y" >> module_config/module_esp32c2-4mb-g2/sdkconfig.defaults
48+
source .github/workflows/utils.sh && enable_ble_cmds
49+
- name: Enable AT debug log
50+
if: ${{ inputs.enable_at_debug == true }}
51+
run: |
52+
source .github/workflows/utils.sh && enable_at_debug
4353
- name: Set up OTA tokens
4454
run: |
4555
cd components/at/private_include
@@ -54,9 +64,8 @@ jobs:
5464
echo -e "#define CONFIG_ESP_AT_OTA_TOKEN_ESP32C2_4MB_G2 \"${{ secrets.ESP32C2_4MB_G2_TOKEN }}\"" >> at_ota_token.h
5565
echo -e "#define CONFIG_ESP_AT_OTA_SSL_TOKEN_ESP32C2_4MB_G2 \"${{ secrets.ESP32C2_4MB_G2_TOKEN }}\"" >> at_ota_token.h
5666
cd -
57-
- name: Install environment variables
67+
- name: Install compilation environment
5868
run: |
59-
echo "ESP_AT_FIRMWARE_FROM=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" >> "$GITHUB_ENV"
6069
./build.py install
6170
- name: Compile
6271
run: |

.github/workflows/build_template_esp32c3.yml

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ on:
1313
enable_all_wifi_features:
1414
required: false
1515
type: boolean
16+
enable_at_debug:
17+
required: false
18+
type: boolean
1619
# parameters from upstream inherit
1720
secrets:
1821
AT_OTA_TOKEN_ESP32C3_MINI:
@@ -21,33 +24,30 @@ on:
2124
jobs:
2225
build-template-esp32c3:
2326
runs-on: ubuntu-latest
27+
env:
28+
PLATFORM: PLATFORM_ESP32C3
29+
MODULE_NAME: ${{ inputs.module_name }}
30+
SILENCE: 0
2431
steps:
2532
- uses: actions/checkout@v4.2.0
2633
- uses: actions/setup-python@v5.3.0
2734
with:
2835
python-version: '3.10'
29-
- name: Set module information
36+
- name: Set up environment variables
3037
run: |
31-
mkdir build
32-
echo -e "{\"platform\": \"PLATFORM_ESP32C3\", \"module\": \"${{ inputs.module_name }}\", \"silence\": 0}" > build/module_info.json
38+
source .github/workflows/utils.sh && setup_env_variables
3339
- name: Enable all Wi-Fi features
3440
if: ${{ inputs.enable_all_wifi_features == true }}
3541
run: |
36-
echo -e "CONFIG_AT_FS_COMMAND_SUPPORT=y" >> module_config/module_esp32c3_default/sdkconfig.defaults
37-
echo -e "CONFIG_AT_DRIVER_COMMAND_SUPPORT=y" >> module_config/module_esp32c3_default/sdkconfig.defaults
38-
echo -e "CONFIG_AT_EAP_COMMAND_SUPPORT=y" >> module_config/module_esp32c3_default/sdkconfig.defaults
39-
echo -e "CONFIG_AT_WEB_SERVER_SUPPORT=y" >> module_config/module_esp32c3_default/sdkconfig.defaults
40-
echo -e "CONFIG_AT_WS_COMMAND_SUPPORT=y" >> module_config/module_esp32c3_default/sdkconfig.defaults
41-
echo -e "CONFIG_AT_WEB_CAPTIVE_PORTAL_ENABLE=y" >> module_config/module_esp32c3_default/sdkconfig.defaults
42+
source .github/workflows/utils.sh && enable_all_wifi_cmds
43+
- name: Enable AT debug log
44+
if: ${{ inputs.enable_at_debug == true }}
45+
run: |
46+
source .github/workflows/utils.sh && enable_at_debug
4247
- name: Enlarge app partition size
43-
if: ${{ inputs.enable_all_wifi_features == true }}
48+
if: ${{ inputs.enable_all_wifi_features == true || inputs.enable_at_debug == true }}
4449
run: |
45-
app0_size=`cat module_config/module_esp32c3_default/partitions_at.csv | grep ota_0 | awk -F, '{print $5}'`
46-
app1_size=`cat module_config/module_esp32c3_default/partitions_at.csv | grep ota_1 | awk -F, '{print $5}'`
47-
to_set_size=$((app0_size + app1_size))
48-
sed -i '/ota_1/d' module_config/module_esp32c3_default/partitions_at.csv
49-
to_set_hex_size=`printf "0x%x" ${to_set_size}`
50-
sed -i '/ota_0/s,'"$app0_size"','"$to_set_hex_size"',g' module_config/module_esp32c3_default/partitions_at.csv
50+
source .github/workflows/utils.sh && enlarge_app_partition
5151
- name: Set up OTA tokens
5252
run: |
5353
cd components/at/private_include
@@ -56,9 +56,8 @@ jobs:
5656
echo -e "#define CONFIG_ESP_AT_OTA_TOKEN_ESP32C3_MINI \"${{ secrets.AT_OTA_TOKEN_ESP32C3_MINI }}\"" >> at_ota_token.h
5757
echo -e "#define CONFIG_ESP_AT_OTA_SSL_TOKEN_ESP32C3_MINI \"${{ secrets.AT_OTA_TOKEN_ESP32C3_MINI }}\"" >> at_ota_token.h
5858
cd -
59-
- name: Install environment variables
59+
- name: Install compilation environment
6060
run: |
61-
echo "ESP_AT_FIRMWARE_FROM=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" >> "$GITHUB_ENV"
6261
./build.py install
6362
- name: Compile
6463
run: |

.github/workflows/build_template_esp32c5.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
artifacts_name:
1111
required: true
1212
type: string
13+
enable_at_debug:
14+
required: false
15+
type: boolean
1316
# parameters from upstream inherit
1417
secrets:
1518
AT_OTA_TOKEN_ESP32C5_4MB:
@@ -18,15 +21,26 @@ on:
1821
jobs:
1922
build-template-esp32c5:
2023
runs-on: ubuntu-latest
24+
env:
25+
PLATFORM: PLATFORM_ESP32C5
26+
MODULE_NAME: ${{ inputs.module_name }}
27+
SILENCE: 0
2128
steps:
2229
- uses: actions/checkout@v4.2.0
2330
- uses: actions/setup-python@v5.3.0
2431
with:
2532
python-version: '3.10'
26-
- name: Set module information
33+
- name: Set up environment variables
34+
run: |
35+
source .github/workflows/utils.sh && setup_env_variables
36+
- name: Enable AT debug log
37+
if: ${{ inputs.enable_at_debug == true }}
38+
run: |
39+
source .github/workflows/utils.sh && enable_at_debug
40+
- name: Enlarge app partition size
41+
if: ${{ inputs.enable_at_debug == true }}
2742
run: |
28-
mkdir build
29-
echo -e "{\"platform\": \"PLATFORM_ESP32C5\", \"module\": \"${{ inputs.module_name }}\", \"silence\": 0}" > build/module_info.json
43+
source .github/workflows/utils.sh && enlarge_app_partition
3044
- name: Set up OTA tokens
3145
run: |
3246
cd components/at/private_include
@@ -35,9 +49,8 @@ jobs:
3549
echo -e "#define CONFIG_ESP_AT_OTA_TOKEN_ESP32C5_4MB \"${{ secrets.AT_OTA_TOKEN_ESP32C5_4MB }}\"" >> at_ota_token.h
3650
echo -e "#define CONFIG_ESP_AT_OTA_SSL_TOKEN_ESP32C5_4MB \"${{ secrets.AT_OTA_TOKEN_ESP32C5_4MB }}\"" >> at_ota_token.h
3751
cd -
38-
- name: Install environment variables
52+
- name: Install compilation environment
3953
run: |
40-
echo "ESP_AT_FIRMWARE_FROM=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" >> "$GITHUB_ENV"
4154
./build.py install
4255
- name: Compile
4356
run: |

.github/workflows/build_template_esp32c6.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
artifacts_name:
1111
required: true
1212
type: string
13+
enable_at_debug:
14+
required: false
15+
type: boolean
1316
# parameters from upstream inherit
1417
secrets:
1518
ESP32C6_4MB_TOKEN:
@@ -18,15 +21,26 @@ on:
1821
jobs:
1922
build-template-esp32c6:
2023
runs-on: ubuntu-latest
24+
env:
25+
PLATFORM: PLATFORM_ESP32C6
26+
MODULE_NAME: ${{ inputs.module_name }}
27+
SILENCE: 0
2128
steps:
2229
- uses: actions/checkout@v4.2.0
2330
- uses: actions/setup-python@v5.3.0
2431
with:
2532
python-version: '3.10'
26-
- name: Set module information
33+
- name: Set up environment variables
34+
run: |
35+
source .github/workflows/utils.sh && setup_env_variables
36+
- name: Enable AT debug log
37+
if: ${{ inputs.enable_at_debug == true }}
38+
run: |
39+
source .github/workflows/utils.sh && enable_at_debug
40+
- name: Enlarge app partition size
41+
if: ${{ inputs.enable_at_debug == true }}
2742
run: |
28-
mkdir build
29-
echo -e "{\"platform\": \"PLATFORM_ESP32C6\", \"module\": \"${{ inputs.module_name }}\", \"silence\": 0}" > build/module_info.json
43+
source .github/workflows/utils.sh && enlarge_app_partition
3044
- name: Set up OTA tokens
3145
run: |
3246
cd components/at/private_include
@@ -35,9 +49,8 @@ jobs:
3549
echo -e "#define CONFIG_ESP_AT_OTA_TOKEN_ESP32C6_4MB \"${{ secrets.ESP32C6_4MB_TOKEN }}\"" >> at_ota_token.h
3650
echo -e "#define CONFIG_ESP_AT_OTA_SSL_TOKEN_ESP32C6_4MB \"${{ secrets.ESP32C6_4MB_TOKEN }}\"" >> at_ota_token.h
3751
cd -
38-
- name: Install environment variables
52+
- name: Install compilation environment
3953
run: |
40-
echo "ESP_AT_FIRMWARE_FROM=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" >> "$GITHUB_ENV"
4154
./build.py install
4255
- name: Compile
4356
run: |

.github/workflows/build_template_esp32s2.yml

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ on:
1010
artifacts_name:
1111
required: true
1212
type: string
13+
enable_at_debug:
14+
required: false
15+
type: boolean
1316
# parameters from upstream inherit
1417
secrets:
1518
AT_OTA_TOKEN_ESP32S2_MINI:
@@ -18,15 +21,22 @@ on:
1821
jobs:
1922
build-template-esp32s2:
2023
runs-on: ubuntu-latest
24+
env:
25+
PLATFORM: PLATFORM_ESP32S2
26+
MODULE_NAME: ${{ inputs.module_name }}
27+
SILENCE: 0
2128
steps:
2229
- uses: actions/checkout@v4.2.0
2330
- uses: actions/setup-python@v5.3.0
2431
with:
2532
python-version: '3.10'
26-
- name: Set module information
33+
- name: Set up environment variables
34+
run: |
35+
source .github/workflows/utils.sh && setup_env_variables
36+
- name: Enable AT debug log
37+
if: ${{ inputs.enable_at_debug == true }}
2738
run: |
28-
mkdir build
29-
echo -e "{\"platform\": \"PLATFORM_ESP32S2\", \"module\": \"${{ inputs.module_name }}\", \"silence\": 0}" > build/module_info.json
39+
source .github/workflows/utils.sh && enable_at_debug
3040
- name: Set up OTA tokens
3141
run: |
3242
cd components/at/private_include
@@ -41,9 +51,8 @@ jobs:
4151
echo -e "#define CONFIG_ESP_AT_OTA_TOKEN_ESP32S2_MINI \"${{ secrets.AT_OTA_TOKEN_ESP32S2_MINI }}\"" >> at_ota_token.h
4252
echo -e "#define CONFIG_ESP_AT_OTA_SSL_TOKEN_ESP32S2_MINI \"${{ secrets.AT_OTA_TOKEN_ESP32S2_MINI }}\"" >> at_ota_token.h
4353
cd -
44-
- name: Install environment variables
54+
- name: Install compilation environment
4555
run: |
46-
echo "ESP_AT_FIRMWARE_FROM=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}" >> "$GITHUB_ENV"
4756
./build.py install
4857
- name: Compile
4958
run: |

0 commit comments

Comments
 (0)