Update ESP32 base samples to work with ESP32 package 3.0.1 (+ Arduino IDE 2.3.2) #181
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Azure SDK for C Arduino library CI | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main, feature/* ] | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
container: aziotbld/azure-sdk-for-c-arduino-ci:1.2 | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
- name: Fetch Needed Libs | |
run: | | |
apt install -y libncurses5 | |
wget https://releases.llvm.org/9.0.0/clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz | |
tar -xvf clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04.tar.xz | |
mv clang+llvm-9.0.0-x86_64-linux-gnu-ubuntu-18.04/bin/clang-format /usr/local/bin/ | |
- name: Style Check | |
run: | | |
# Run clang-format recursively on each source and header file within the repo. | |
clang-format --version | |
find ./examples \( -iname '*.h' -o -iname '*.c' -o -iname '*.cpp' -o -iname '*.ino' \) -exec clang-format -i {} \; | |
git status --untracked-files=no --porcelain | |
if [[ `git status --untracked-files=no --porcelain` ]]; then | |
echo Some files were not formatted correctly according to the .clang-format file. | |
echo Please run clang-format version 9.0.0 to fix the issue by using this bash command at the root of the repo: | |
echo "find ./examples \( -iname '*.h' -o -iname '*.c' -o -iname '*.cpp' -o -iname '*.ino' \) -exec clang-format -i {} \;" | |
exit 1 | |
fi | |
echo Success, all files are formatted correctly according to the .clang-format file. | |
exit 0 | |
- name: Install dependent Arduino libraries | |
run: | | |
arduino --install-library "PubSubClient", | |
arduino --install-library "Espressif ESP32 Azure IoT Kit Sensors" | |
- name: Install azure-sdk-for-c-arduino as local library | |
run: install-local-arduino-library.sh $GITHUB_WORKSPACE | |
# Build samples | |
- name: Build Azure_IoT_Central_ESP32_AzureIoTKit | |
run: arduino --verify --board esp32:esp32:esp32 -v --preserve-temp-files $GITHUB_WORKSPACE/examples/Azure_IoT_Central_ESP32_AzureIoTKit/Azure_IoT_Central_ESP32_AzureIoTKit.ino | |
- name: Build Azure_IoT_Central_ESP32 | |
run: arduino --verify --board esp32:esp32:esp32 -v --preserve-temp-files $GITHUB_WORKSPACE/examples/Azure_IoT_Central_ESP32/Azure_IoT_Central_ESP32.ino | |
- name: Build Azure_IoT_Adu_ESP32 | |
run: arduino --verify --board esp32:esp32:esp32 -v --preserve-temp-files $GITHUB_WORKSPACE/examples/Azure_IoT_Adu_ESP32/Azure_IoT_Adu_ESP32.ino |