diff --git a/.github/workflows/compile_examples.yml b/.github/workflows/compile_examples.yml index cdca2a6b3..3c007e0ef 100644 --- a/.github/workflows/compile_examples.yml +++ b/.github/workflows/compile_examples.yml @@ -11,6 +11,124 @@ on: - '.github/workflows/compile_library.yml' jobs: + esp8266: + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + example: + - "examples/Authentications/LegacyTokenAuthen/LegacyTokenAuthen.ino" + - "examples/Authentications/SignInAsAdmin/AccessTokenFile/AccessTokenFile.ino" + - "examples/Authentications/SignInAsGuest/AnonymousSignin/AnonymousSignin.ino" + - "examples/Authentications/SignInAsUser/CustomToken/CustomToken.ino" + - "examples/Authentications/SignInAsUser/CustomTokenFile/CustomTokenFile.ino" + - "examples/Authentications/SignInAsUser/EmailPassword/EmailPassword.ino" + - "examples/Authentications/UserManagement/ResetPassword/ResetPassword.ino" + - "examples/Authentications/UserManagement/SendVerification/SendVerification.ino" + - "examples/Authentications/UserManagement/Signup/Signup.ino" + - "examples/CloudFunctions/CallFunction/CallFunction.ino" + - "examples/CloudFunctions/CreateFunction/CreateFunctionFromSources/CreateFunctionFromSources.ino" + - "examples/CloudFunctions/CreateFunction/CreateFunctionWithCallback/CreateFunctionWithCallback.ino" + - "examples/CloudFunctions/CreateFunction/CreateFunctionWithEventTrigger/CreateFunctionWithEventTrigger.ino" + - "examples/CloudFunctions/CreateFunction/CreateFunctionWithReturnStatus/CreateFunctionWithReturnStatus.ino" + #- "examples/CloudFunctions/CreateFunction/DeployAutoZipFunction/DeployAutoZipFunction.ino" + - "examples/CloudFunctions/DeleteFunction/DeleteFunction.ino" + - "examples/CloudFunctions/DownloadFunction/DownloadFunction.ino" + - "examples/CloudFunctions/IAMPolicy/CreatePolicy/CreatePolicy.ino" + - "examples/CloudFunctions/IAMPolicy/GetPolicy/GetPolicy.ino" + - "examples/CloudFunctions/IAMPolicy/SetPolicy/SetPolicy.ino" + - "examples/CloudFunctions/ListFunctions/ListFunctions.ino" + - "examples/CloudFunctions/PatchFunction/PatchFunction.ino" + - "examples/Firestore/CommitDocument/AppendArray/AppendArray.ino" + - "examples/Firestore/CommitDocument/IncrementFieldValue/IncrementFieldValue.ino" + - "examples/Firestore/CommitDocument/SetUpdateDelete/SetUpdateDelete.ino" + - "examples/Firestore/CreateDocuments/CreateDocuments.ino" + - "examples/Firestore/DataQuery/DataQuery.ino" + - "examples/Firestore/DeleteDocument/DeleteDocument.ino" + - "examples/Firestore/ExportDocuments/ExportDocuments.ino" + - "examples/Firestore/GetDocument/GetDocument.ino" + - "examples/Firestore/ImportDocuments/ImportDocuments.ino" + - "examples/Firestore/ListCollectionIds/ListCollectionIds.ino" + - "examples/Firestore/ListDocuments/ListDocuments.ino" + - "examples/Firestore/PatchDocument/PatchDocument.ino" + - "examples/Messaging/AppInstanceInfo/AppInstanceInfo.ino" + - "examples/Messaging/RegistAPNsTokens/RegistAPNsTokens.ino" + - "examples/Messaging/Send/HTTPv1/SendMessage/SendMessage.ino" + - "examples/Messaging/Send/HTTPv1/SendTopic/SendTopic.ino" + - "examples/Messaging/Send/LegacyAPI/BroadcastMessage/BroadcastMessage.ino" + - "examples/Messaging/Send/LegacyAPI/SendMessage/SendMessage.ino" + - "examples/Messaging/Send/LegacyAPI/SendTopic/SendTopic.ino" + - "examples/Messaging/SubscribeTopic/SubscribeTopic.ino" + - "examples/Messaging/UnsubscribeTopic/UnsubscribeTopic.ino" + - "examples/RTDB/BackupRestore/Flash/Flash.ino" + - "examples/RTDB/BackupRestore/SD/SD.ino" + - "examples/RTDB/Basic/Basic.ino" + - "examples/RTDB/BasicCert/BasicCert.ino" + #- "examples/RTDB/BasicEthernetESP32/BasicEthernetESP32.ino" + - "examples/RTDB/Blob/Blob.ino" + - "examples/RTDB/DatabaseRules/DatabaseRules.ino" + - "examples/RTDB/DataChangesListener/Callback/Callback.ino" + - "examples/RTDB/DataChangesListener/MultiPath/MultiPath.ino" + - "examples/RTDB/DataChangesListener/NoCallback/NoCallback.ino" + - "examples/RTDB/DataChangesListener/SingleDataObject/SingleDataObject.ino" + - "examples/RTDB/DataFilter/DataFilter.ino" + - "examples/RTDB/ETag/ETag.ino" + - "examples/RTDB/FastSend/FastSend.ino" + - "examples/RTDB/File/Flash/Flash.ino" + - "examples/RTDB/File/SD/SD.ino" + - "examples/RTDB/FireSense/AnalogRead/AnalogRead.ino" + - "examples/RTDB/FireSense/AutomaticPlantWatering/AutomaticPlantWatering.ino" + - "examples/RTDB/FireSense/Sensors/Sensors.ino" + - "examples/RTDB/FireSense/Blink/Blink.ino" + - "examples/RTDB/Priority/Priority.ino" + - "examples/RTDB/Queue/Queue.ino" + - "examples/RTDB/ShallowedData/ShallowedData.ino" + - "examples/RTDB/Timestamp/Timestamp.ino" + - "examples/Storage/FirebaseStorage/DeleteFile/DeleteFile.ino" + - "examples/Storage/FirebaseStorage/DownloadFile/DownloadFile.ino" + - "examples/Storage/FirebaseStorage/ListFiles/ListFiles.ino" + - "examples/Storage/FirebaseStorage/Metadata/Metadata.ino" + - "examples/Storage/FirebaseStorage/UploadByteArrayMemory/UploadByteArrayMemory.ino" + - "examples/Storage/FirebaseStorage/UploadFile/UploadFile.ino" + - "examples/Storage/GoogleCloudStorage/DeleteFile/DeleteFile.ino" + - "examples/Storage/GoogleCloudStorage/DownloadFile/DownloadFile.ino" + - "examples/Storage/GoogleCloudStorage/ListFiles/ListFiles.ino" + - "examples/Storage/GoogleCloudStorage/Metadata/Metadata.ino" + - "examples/Storage/GoogleCloudStorage/UploadFile/UploadFile.ino" + + steps: + - uses: actions/checkout@v2 + - name: Cache pip + uses: actions/cache@v2 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} + restore-keys: ${{ runner.os }}-pip- + - name: Cache PlatformIO + uses: actions/cache@v2 + with: + path: ~/.platformio + key: ${{ runner.os }}-${{ hashFiles('**/lockfiles') }} + - name: Set up Python + uses: actions/setup-python@v2 + - name: Install PlatformIO + run: | + python -m pip install --upgrade pip + pip install --upgrade platformio + - name: Install 3rd party dependecies + run: | + pio lib -g install \ + https://github.com/mobizt/Firebase-ESP-Client + + - name: Run PlatformIO Examples + run: | + pio ci --board=d1_mini \ + --lib=src/addons/FireSense/FireSense.h \ + --lib=src/addons/RTDBHelper.h \ + --lib=src/addons/TokenHelper.h \ + --lib=examples/CloudFunctions/CreateFunction/DeployAutoZipFunction/AutoZip.h + env: + PLATFORMIO_CI_SRC: ${{ matrix.example }} esp32: runs-on: ubuntu-latest @@ -18,7 +136,84 @@ jobs: fail-fast: false matrix: example: - - "examples/RTDB/FireSense/AnalogRead/AnalogRead.ino" + - "examples/Authentications/LegacyTokenAuthen/LegacyTokenAuthen.ino" + - "examples/Authentications/SignInAsAdmin/AccessTokenFile/AccessTokenFile.ino" + - "examples/Authentications/SignInAsGuest/AnonymousSignin/AnonymousSignin.ino" + - "examples/Authentications/SignInAsUser/CustomToken/CustomToken.ino" + - "examples/Authentications/SignInAsUser/CustomTokenFile/CustomTokenFile.ino" + - "examples/Authentications/SignInAsUser/EmailPassword/EmailPassword.ino" + - "examples/Authentications/UserManagement/ResetPassword/ResetPassword.ino" + - "examples/Authentications/UserManagement/SendVerification/SendVerification.ino" + - "examples/Authentications/UserManagement/Signup/Signup.ino" + - "examples/CloudFunctions/CallFunction/CallFunction.ino" + - "examples/CloudFunctions/CreateFunction/CreateFunctionFromSources/CreateFunctionFromSources.ino" + - "examples/CloudFunctions/CreateFunction/CreateFunctionWithCallback/CreateFunctionWithCallback.ino" + - "examples/CloudFunctions/CreateFunction/CreateFunctionWithEventTrigger/CreateFunctionWithEventTrigger.ino" + - "examples/CloudFunctions/CreateFunction/CreateFunctionWithReturnStatus/CreateFunctionWithReturnStatus.ino" + #- "examples/CloudFunctions/CreateFunction/DeployAutoZipFunction/DeployAutoZipFunction.ino" + - "examples/CloudFunctions/DeleteFunction/DeleteFunction.ino" + - "examples/CloudFunctions/DownloadFunction/DownloadFunction.ino" + - "examples/CloudFunctions/IAMPolicy/CreatePolicy/CreatePolicy.ino" + - "examples/CloudFunctions/IAMPolicy/GetPolicy/GetPolicy.ino" + - "examples/CloudFunctions/IAMPolicy/SetPolicy/SetPolicy.ino" + - "examples/CloudFunctions/ListFunctions/ListFunctions.ino" + - "examples/CloudFunctions/PatchFunction/PatchFunction.ino" + - "examples/Firestore/CommitDocument/AppendArray/AppendArray.ino" + - "examples/Firestore/CommitDocument/IncrementFieldValue/IncrementFieldValue.ino" + - "examples/Firestore/CommitDocument/SetUpdateDelete/SetUpdateDelete.ino" + - "examples/Firestore/CreateDocuments/CreateDocuments.ino" + - "examples/Firestore/DataQuery/DataQuery.ino" + - "examples/Firestore/DeleteDocument/DeleteDocument.ino" + - "examples/Firestore/ExportDocuments/ExportDocuments.ino" + - "examples/Firestore/GetDocument/GetDocument.ino" + - "examples/Firestore/ImportDocuments/ImportDocuments.ino" + - "examples/Firestore/ListCollectionIds/ListCollectionIds.ino" + - "examples/Firestore/ListDocuments/ListDocuments.ino" + - "examples/Firestore/PatchDocument/PatchDocument.ino" + - "examples/Messaging/AppInstanceInfo/AppInstanceInfo.ino" + - "examples/Messaging/RegistAPNsTokens/RegistAPNsTokens.ino" + - "examples/Messaging/Send/HTTPv1/SendMessage/SendMessage.ino" + - "examples/Messaging/Send/HTTPv1/SendTopic/SendTopic.ino" + - "examples/Messaging/Send/LegacyAPI/BroadcastMessage/BroadcastMessage.ino" + - "examples/Messaging/Send/LegacyAPI/SendMessage/SendMessage.ino" + - "examples/Messaging/Send/LegacyAPI/SendTopic/SendTopic.ino" + - "examples/Messaging/SubscribeTopic/SubscribeTopic.ino" + - "examples/Messaging/UnsubscribeTopic/UnsubscribeTopic.ino" + - "examples/RTDB/BackupRestore/Flash/Flash.ino" + - "examples/RTDB/BackupRestore/SD/SD.ino" + - "examples/RTDB/Basic/Basic.ino" + - "examples/RTDB/BasicCert/BasicCert.ino" + - "examples/RTDB/BasicEthernetESP32/BasicEthernetESP32.ino" + - "examples/RTDB/Blob/Blob.ino" + - "examples/RTDB/DatabaseRules/DatabaseRules.ino" + - "examples/RTDB/DataChangesListener/Callback/Callback.ino" + - "examples/RTDB/DataChangesListener/MultiPath/MultiPath.ino" + - "examples/RTDB/DataChangesListener/NoCallback/NoCallback.ino" + - "examples/RTDB/DataChangesListener/SingleDataObject/SingleDataObject.ino" + - "examples/RTDB/DataFilter/DataFilter.ino" + - "examples/RTDB/ETag/ETag.ino" + - "examples/RTDB/FastSend/FastSend.ino" + - "examples/RTDB/File/Flash/Flash.ino" + - "examples/RTDB/File/SD/SD.ino" + #- "examples/RTDB/FireSense/AnalogRead/AnalogRead.ino" + #- "examples/RTDB/FireSense/AutomaticPlantWatering/AutomaticPlantWatering.ino" + #- "examples/RTDB/FireSense/Sensors/Sensors.ino" + #- "examples/RTDB/FireSense/Blink/Blink.ino" + - "examples/RTDB/Priority/Priority.ino" + - "examples/RTDB/Queue/Queue.ino" + - "examples/RTDB/ShallowedData/ShallowedData.ino" + - "examples/RTDB/Timestamp/Timestamp.ino" + - "examples/Storage/FirebaseStorage/DeleteFile/DeleteFile.ino" + - "examples/Storage/FirebaseStorage/DownloadFile/DownloadFile.ino" + - "examples/Storage/FirebaseStorage/ListFiles/ListFiles.ino" + - "examples/Storage/FirebaseStorage/Metadata/Metadata.ino" + - "examples/Storage/FirebaseStorage/UploadByteArrayMemory/UploadByteArrayMemory.ino" + - "examples/Storage/FirebaseStorage/UploadFile/UploadFile.ino" + - "examples/Storage/GoogleCloudStorage/DeleteFile/DeleteFile.ino" + - "examples/Storage/GoogleCloudStorage/DownloadFile/DownloadFile.ino" + - "examples/Storage/GoogleCloudStorage/ListFiles/ListFiles.ino" + - "examples/Storage/GoogleCloudStorage/Metadata/Metadata.ino" + - "examples/Storage/GoogleCloudStorage/UploadFile/UploadFile.ino" steps: - uses: actions/checkout@v2 - name: Cache pip