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