mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 00:32:37 +01:00 
			
		
		
		
	CI: added ESP-IDF component build (closes #1599)
This commit is contained in:
		
				
					committed by
					
						 Benoit Blanchon
						Benoit Blanchon
					
				
			
			
				
	
			
			
			
						parent
						
							cb2c029e57
						
					
				
				
					commit
					52e856fa6f
				
			
							
								
								
									
										26
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										26
									
								
								.github/workflows/ci.yml
									
									
									
									
										vendored
									
									
								
							| @@ -449,3 +449,29 @@ jobs: | ||||
|         with: | ||||
|           name: Single headers | ||||
|           path: ${{ steps.amalgamate.outputs.filename }} | ||||
|  | ||||
|   esp-idf: | ||||
|     needs: gcc | ||||
|     name: ESP-IDF | ||||
|     runs-on: ubuntu-latest | ||||
|     steps: | ||||
|       - name: Setup cache | ||||
|         uses: actions/cache@v2 | ||||
|         with: | ||||
|           path: ~/.espressif | ||||
|           key: ${{ runner.os }}-esp-idf | ||||
|       - name: Checkout ArduinoJson | ||||
|         uses: actions/checkout@v2 | ||||
|       - name: Checkout ESP-IDF | ||||
|         uses: actions/checkout@v2 | ||||
|         with: | ||||
|           repository: espressif/esp-idf | ||||
|           path: esp-idf | ||||
|           submodules: true | ||||
|       - name: Install ESP-IDF | ||||
|         run: ./esp-idf/install.sh | ||||
|       - name: Build example | ||||
|         run: | | ||||
|           source esp-idf/export.sh | ||||
|           cd extras/ci/espidf | ||||
|           idf.py build | ||||
|   | ||||
| @@ -13,7 +13,7 @@ HEAD | ||||
| * Fixed warning `definition of implicit copy constructor for 'MsgPackDeserializer' is deprecated because it has a user-declared copy assignment operator` | ||||
| * Added `JsonArray::clear()` (issue #1597) | ||||
| * Fixed `JsonVariant::as<unsigned>()` (issue #1601) | ||||
| * Added support for ESP-IDF component build (PR #1562 by @qt1) | ||||
| * Added support for ESP-IDF component build (PR #1562 by @qt1, PR #1599 by @andreaskuster) | ||||
|  | ||||
| v6.18.0 (2021-05-05) | ||||
| ------- | ||||
|   | ||||
							
								
								
									
										8
									
								
								extras/ci/espidf/CMakeLists.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										8
									
								
								extras/ci/espidf/CMakeLists.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,8 @@ | ||||
| # ArduinoJson - https://arduinojson.org | ||||
| # Copyright Benoit Blanchon 2014-2021 | ||||
| # MIT License | ||||
|  | ||||
| cmake_minimum_required(VERSION 3.5) | ||||
|  | ||||
| include($ENV{IDF_PATH}/tools/cmake/project.cmake) | ||||
| project(example) | ||||
							
								
								
									
										1
									
								
								extras/ci/espidf/components/ArduinoJson
									
									
									
									
									
										Symbolic link
									
								
							
							
						
						
									
										1
									
								
								extras/ci/espidf/components/ArduinoJson
									
									
									
									
									
										Symbolic link
									
								
							| @@ -0,0 +1 @@ | ||||
| ../../../.. | ||||
							
								
								
									
										6
									
								
								extras/ci/espidf/main/CMakeLists.txt
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										6
									
								
								extras/ci/espidf/main/CMakeLists.txt
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,6 @@ | ||||
| # ArduinoJson - https://arduinojson.org | ||||
| # Copyright Benoit Blanchon 2014-2021 | ||||
| # MIT License | ||||
|  | ||||
| idf_component_register(SRCS "main.cpp" | ||||
|                        INCLUDE_DIRS "") | ||||
							
								
								
									
										4
									
								
								extras/ci/espidf/main/component.mk
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								extras/ci/espidf/main/component.mk
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | ||||
| # | ||||
| # "main" pseudo-component makefile. | ||||
| # | ||||
| # (Uses default behaviour of compiling all source files in directory, adding 'include' to include path.) | ||||
							
								
								
									
										16
									
								
								extras/ci/espidf/main/main.cpp
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										16
									
								
								extras/ci/espidf/main/main.cpp
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,16 @@ | ||||
| // ArduinoJson - https://arduinojson.org | ||||
| // Copyright Benoit Blanchon 2014-2021 | ||||
| // MIT License | ||||
|  | ||||
| #include <ArduinoJson.h> | ||||
|  | ||||
| extern "C" void app_main() { | ||||
|   char buffer[256]; | ||||
|   StaticJsonDocument<200> doc; | ||||
|  | ||||
|   doc["hello"] = "world"; | ||||
|   serializeJson(doc, buffer); | ||||
|   deserializeJson(doc, buffer); | ||||
|   serializeMsgPack(doc, buffer); | ||||
|   deserializeMsgPack(doc, buffer); | ||||
| } | ||||
		Reference in New Issue
	
	Block a user