From c743f0e55880bcde756ee5a2e589fe43e942a236 Mon Sep 17 00:00:00 2001 From: h2zero Date: Sat, 27 Aug 2022 09:49:49 -0600 Subject: [PATCH] Add CI build check. --- .github/workflows/build.yml | 49 +++++++++++++++++++ .../Advanced/NimBLE_Client/sdkconfig.defaults | 12 +++++ .../Advanced/NimBLE_Server/sdkconfig.defaults | 12 +++++ .../NimBLE_extended_client/sdkconfig.defaults | 13 +++++ .../NimBLE_extended_server/sdkconfig.defaults | 13 +++++ .../sdkconfig.defaults | 13 +++++ examples/basic/BLE_client/sdkconfig.defaults | 12 +++++ examples/basic/BLE_notify/sdkconfig.defaults | 12 +++++ examples/basic/BLE_scan/sdkconfig.defaults | 12 +++++ examples/basic/BLE_server/sdkconfig.defaults | 12 +++++ examples/basic/BLE_uart/sdkconfig.defaults | 12 +++++ 11 files changed, 172 insertions(+) create mode 100644 .github/workflows/build.yml create mode 100644 examples/Advanced/NimBLE_Client/sdkconfig.defaults create mode 100644 examples/Advanced/NimBLE_Server/sdkconfig.defaults create mode 100644 examples/Bluetooth_5/NimBLE_extended_client/sdkconfig.defaults create mode 100644 examples/Bluetooth_5/NimBLE_extended_server/sdkconfig.defaults create mode 100644 examples/Bluetooth_5/NimBLE_multi_advertiser/sdkconfig.defaults create mode 100644 examples/basic/BLE_client/sdkconfig.defaults create mode 100644 examples/basic/BLE_notify/sdkconfig.defaults create mode 100644 examples/basic/BLE_scan/sdkconfig.defaults create mode 100644 examples/basic/BLE_server/sdkconfig.defaults create mode 100644 examples/basic/BLE_uart/sdkconfig.defaults diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..0533a13 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,49 @@ +name: Build + +on: [push, pull_request] + +jobs: + build-esp-idf-component: + name: Build with ESP-IDF ${{ matrix.idf_ver }} for ${{ matrix.idf_target }} + runs-on: ubuntu-latest + strategy: + matrix: + # The version names here correspond to the versions of espressif/idf Docker image. + # See https://hub.docker.com/r/espressif/idf/tags and + # https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-guides/tools/idf-docker-image.html + # for details. + idf_ver: ["release-v4.4"] + idf_target: ["esp32", "esp32s3", "esp32c3"] + example: + - Advanced/NimBLE_Client + - Advanced/NimBLE_Server + - basic/BLE_client + - basic/BLE_notify + - basic/BLE_scan + - basic/BLE_server + - basic/BLE_uart + - Bluetooth_5/NimBLE_extended_client + - Bluetooth_5/NimBLE_extended_server + - Bluetooth_5/NimBLE_multi_advertiser + exclude: + - idf_target: "esp32" + example: Bluetooth_5/NimBLE_extended_client + - idf_target: "esp32" + example: Bluetooth_5/NimBLE_extended_server + - idf_target: "esp32" + example: Bluetooth_5/NimBLE_multi_advertiser + + container: espressif/idf:${{ matrix.idf_ver }} + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + path: components/esp-nimble-cpp + - name: Build examples + env: + IDF_TARGET: ${{ matrix.idf_target }} + shell: bash + run: | + . ${IDF_PATH}/export.sh + cp -r components/esp-nimble-cpp/examples/* . + idf.py -C ${{ matrix.example }} -DEXTRA_COMPONENT_DIRS=$PWD/components build diff --git a/examples/Advanced/NimBLE_Client/sdkconfig.defaults b/examples/Advanced/NimBLE_Client/sdkconfig.defaults new file mode 100644 index 0000000..c829fc5 --- /dev/null +++ b/examples/Advanced/NimBLE_Client/sdkconfig.defaults @@ -0,0 +1,12 @@ +# Override some defaults so BT stack is enabled +# in this example + +# +# BT config +# +CONFIG_BT_ENABLED=y +CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y +CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n +CONFIG_BTDM_CTRL_MODE_BTDM=n +CONFIG_BT_BLUEDROID_ENABLED=n +CONFIG_BT_NIMBLE_ENABLED=y diff --git a/examples/Advanced/NimBLE_Server/sdkconfig.defaults b/examples/Advanced/NimBLE_Server/sdkconfig.defaults new file mode 100644 index 0000000..c829fc5 --- /dev/null +++ b/examples/Advanced/NimBLE_Server/sdkconfig.defaults @@ -0,0 +1,12 @@ +# Override some defaults so BT stack is enabled +# in this example + +# +# BT config +# +CONFIG_BT_ENABLED=y +CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y +CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n +CONFIG_BTDM_CTRL_MODE_BTDM=n +CONFIG_BT_BLUEDROID_ENABLED=n +CONFIG_BT_NIMBLE_ENABLED=y diff --git a/examples/Bluetooth_5/NimBLE_extended_client/sdkconfig.defaults b/examples/Bluetooth_5/NimBLE_extended_client/sdkconfig.defaults new file mode 100644 index 0000000..81960c1 --- /dev/null +++ b/examples/Bluetooth_5/NimBLE_extended_client/sdkconfig.defaults @@ -0,0 +1,13 @@ +# Override some defaults so BT stack is enabled +# in this example + +# +# BT config +# +CONFIG_BT_ENABLED=y +CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y +CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n +CONFIG_BTDM_CTRL_MODE_BTDM=n +CONFIG_BT_BLUEDROID_ENABLED=n +CONFIG_BT_NIMBLE_ENABLED=y +CONFIG_BT_NIMBLE_EXT_ADV=y diff --git a/examples/Bluetooth_5/NimBLE_extended_server/sdkconfig.defaults b/examples/Bluetooth_5/NimBLE_extended_server/sdkconfig.defaults new file mode 100644 index 0000000..81960c1 --- /dev/null +++ b/examples/Bluetooth_5/NimBLE_extended_server/sdkconfig.defaults @@ -0,0 +1,13 @@ +# Override some defaults so BT stack is enabled +# in this example + +# +# BT config +# +CONFIG_BT_ENABLED=y +CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y +CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n +CONFIG_BTDM_CTRL_MODE_BTDM=n +CONFIG_BT_BLUEDROID_ENABLED=n +CONFIG_BT_NIMBLE_ENABLED=y +CONFIG_BT_NIMBLE_EXT_ADV=y diff --git a/examples/Bluetooth_5/NimBLE_multi_advertiser/sdkconfig.defaults b/examples/Bluetooth_5/NimBLE_multi_advertiser/sdkconfig.defaults new file mode 100644 index 0000000..81960c1 --- /dev/null +++ b/examples/Bluetooth_5/NimBLE_multi_advertiser/sdkconfig.defaults @@ -0,0 +1,13 @@ +# Override some defaults so BT stack is enabled +# in this example + +# +# BT config +# +CONFIG_BT_ENABLED=y +CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y +CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n +CONFIG_BTDM_CTRL_MODE_BTDM=n +CONFIG_BT_BLUEDROID_ENABLED=n +CONFIG_BT_NIMBLE_ENABLED=y +CONFIG_BT_NIMBLE_EXT_ADV=y diff --git a/examples/basic/BLE_client/sdkconfig.defaults b/examples/basic/BLE_client/sdkconfig.defaults new file mode 100644 index 0000000..c829fc5 --- /dev/null +++ b/examples/basic/BLE_client/sdkconfig.defaults @@ -0,0 +1,12 @@ +# Override some defaults so BT stack is enabled +# in this example + +# +# BT config +# +CONFIG_BT_ENABLED=y +CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y +CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n +CONFIG_BTDM_CTRL_MODE_BTDM=n +CONFIG_BT_BLUEDROID_ENABLED=n +CONFIG_BT_NIMBLE_ENABLED=y diff --git a/examples/basic/BLE_notify/sdkconfig.defaults b/examples/basic/BLE_notify/sdkconfig.defaults new file mode 100644 index 0000000..c829fc5 --- /dev/null +++ b/examples/basic/BLE_notify/sdkconfig.defaults @@ -0,0 +1,12 @@ +# Override some defaults so BT stack is enabled +# in this example + +# +# BT config +# +CONFIG_BT_ENABLED=y +CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y +CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n +CONFIG_BTDM_CTRL_MODE_BTDM=n +CONFIG_BT_BLUEDROID_ENABLED=n +CONFIG_BT_NIMBLE_ENABLED=y diff --git a/examples/basic/BLE_scan/sdkconfig.defaults b/examples/basic/BLE_scan/sdkconfig.defaults new file mode 100644 index 0000000..c829fc5 --- /dev/null +++ b/examples/basic/BLE_scan/sdkconfig.defaults @@ -0,0 +1,12 @@ +# Override some defaults so BT stack is enabled +# in this example + +# +# BT config +# +CONFIG_BT_ENABLED=y +CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y +CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n +CONFIG_BTDM_CTRL_MODE_BTDM=n +CONFIG_BT_BLUEDROID_ENABLED=n +CONFIG_BT_NIMBLE_ENABLED=y diff --git a/examples/basic/BLE_server/sdkconfig.defaults b/examples/basic/BLE_server/sdkconfig.defaults new file mode 100644 index 0000000..c829fc5 --- /dev/null +++ b/examples/basic/BLE_server/sdkconfig.defaults @@ -0,0 +1,12 @@ +# Override some defaults so BT stack is enabled +# in this example + +# +# BT config +# +CONFIG_BT_ENABLED=y +CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y +CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n +CONFIG_BTDM_CTRL_MODE_BTDM=n +CONFIG_BT_BLUEDROID_ENABLED=n +CONFIG_BT_NIMBLE_ENABLED=y diff --git a/examples/basic/BLE_uart/sdkconfig.defaults b/examples/basic/BLE_uart/sdkconfig.defaults new file mode 100644 index 0000000..c829fc5 --- /dev/null +++ b/examples/basic/BLE_uart/sdkconfig.defaults @@ -0,0 +1,12 @@ +# Override some defaults so BT stack is enabled +# in this example + +# +# BT config +# +CONFIG_BT_ENABLED=y +CONFIG_BTDM_CTRL_MODE_BLE_ONLY=y +CONFIG_BTDM_CTRL_MODE_BR_EDR_ONLY=n +CONFIG_BTDM_CTRL_MODE_BTDM=n +CONFIG_BT_BLUEDROID_ENABLED=n +CONFIG_BT_NIMBLE_ENABLED=y