mirror of
				https://github.com/eledio-devices/thirdparty-ArduinoJson.git
				synced 2025-10-31 08:42:39 +01:00 
			
		
		
		
	Travis: added GCC 4.4, 4.5, 4.7, 4.8, 4.9, 5.2 and Clang 3.5, 3.6, 3.7
This commit is contained in:
		
							
								
								
									
										89
									
								
								.travis.yml
									
									
									
									
									
								
							
							
						
						
									
										89
									
								
								.travis.yml
									
									
									
									
									
								
							| @@ -1,15 +1,84 @@ | ||||
| sudo: false | ||||
| language: cpp | ||||
| matrix: | ||||
|   include: | ||||
|     - compiler: gcc | ||||
|       addons: | ||||
|         apt: | ||||
|           sources: ['ubuntu-toolchain-r-test'] | ||||
|           packages: ['g++-4.4'] | ||||
|       env: SCRIPT=cmake CMAKE_CXX_COMPILER=g++-4.4 | ||||
|     - compiler: gcc | ||||
|       addons: | ||||
|         apt: | ||||
|           sources: ['ubuntu-toolchain-r-test'] | ||||
|           packages: ['g++-4.5'] | ||||
|       env: SCRIPT=cmake CMAKE_CXX_COMPILER=g++-4.5 | ||||
|     - compiler: gcc | ||||
|       addons: | ||||
|         apt: | ||||
|           sources: ['ubuntu-toolchain-r-test'] | ||||
|           packages: ['g++-4.6'] | ||||
|       env: SCRIPT=cmake CMAKE_CXX_COMPILER=g++-4.6 | ||||
|     - compiler: gcc | ||||
|       addons: | ||||
|         apt: | ||||
|           sources: ['ubuntu-toolchain-r-test'] | ||||
|           packages: ['g++-4.7'] | ||||
|       env: SCRIPT=cmake CMAKE_CXX_COMPILER=g++-4.7 | ||||
|     - compiler: gcc | ||||
|       addons: | ||||
|         apt: | ||||
|           sources: ['ubuntu-toolchain-r-test'] | ||||
|           packages: ['g++-4.8'] | ||||
|       env: SCRIPT=cmake CMAKE_CXX_COMPILER=g++-4.8 | ||||
|     - compiler: gcc | ||||
|       addons: | ||||
|         apt: | ||||
|           sources: ['ubuntu-toolchain-r-test'] | ||||
|           packages: ['g++-4.9'] | ||||
|       env: SCRIPT=cmake CMAKE_CXX_COMPILER=g++-4.9 | ||||
|     - compiler: gcc | ||||
|       addons: | ||||
|         apt: | ||||
|           sources: ['ubuntu-toolchain-r-test'] | ||||
|           packages: ['g++-5'] | ||||
|       env: SCRIPT=cmake CMAKE_CXX_COMPILER=g++-5 | ||||
|     - compiler: clang | ||||
|       env: SCRIPT=cmake CMAKE_CXX_COMPILER=clang++ | ||||
|     - compiler: clang | ||||
|       addons: | ||||
|         apt: | ||||
|           sources: ['ubuntu-toolchain-r-test','llvm-toolchain-precise-3.5'] | ||||
|           packages: ['clang-3.5'] | ||||
|       env: SCRIPT=cmake CMAKE_CXX_COMPILER=clang++-3.5 | ||||
|     - compiler: clang | ||||
|       addons: | ||||
|         apt: | ||||
|           sources: ['ubuntu-toolchain-r-test','llvm-toolchain-precise-3.6'] | ||||
|           packages: ['clang-3.6'] | ||||
|       env: SCRIPT=cmake CMAKE_CXX_COMPILER=clang++-3.6 | ||||
|     - compiler: clang | ||||
|       addons: | ||||
|         apt: | ||||
|           sources: ['ubuntu-toolchain-r-test','llvm-toolchain-precise-3.7'] | ||||
|           packages: ['clang-3.7'] | ||||
|       env: SCRIPT=cmake CMAKE_CXX_COMPILER=clang++-3.7 | ||||
|     # - compiler: clang | ||||
|     #   addons: | ||||
|     #     apt: | ||||
|     #       sources: ['ubuntu-toolchain-r-test','llvm-toolchain-precise-3.8'] | ||||
|     #       packages: ['clang-3.8'] | ||||
|     #   env: SCRIPT=cmake CMAKE_CXX_COMPILER=clang++-3.8 | ||||
|     - compiler: gcc | ||||
|       env: SCRIPT=coverage | ||||
|     - env: SCRIPT=arduino VERSION=1.5.8 BOARD=arduino:avr:uno | ||||
|     - env: SCRIPT=arduino VERSION=1.6.7 BOARD=arduino:avr:uno | ||||
|     - env: SCRIPT=platformio BOARD=uno | ||||
|     - env: SCRIPT=platformio BOARD=due | ||||
|     - env: SCRIPT=platformio BOARD=esp01 | ||||
|     - env: SCRIPT=platformio BOARD=teensy31 | ||||
| cache: | ||||
|   directories: | ||||
|     - "~/.platformio" | ||||
| env: | ||||
|   - COMPILER=gcc | ||||
|   - COMPILER=clang | ||||
|   - COMPILER=arduino VERSION=1.5.8 BOARD=arduino:avr:uno | ||||
|   - COMPILER=arduino VERSION=1.6.7 BOARD=arduino:avr:uno | ||||
|   - COMPILER=platformio BOARD=uno | ||||
|   - COMPILER=platformio BOARD=due | ||||
|   - COMPILER=platformio BOARD=esp01 | ||||
|   - COMPILER=platformio BOARD=teensy31 | ||||
| script: scripts/travis/$COMPILER.sh | ||||
| script: scripts/travis/$SCRIPT.sh | ||||
|   | ||||
| @@ -1,10 +1,7 @@ | ||||
| #!/bin/sh -eux | ||||
| 
 | ||||
| export CC=clang | ||||
| export CXX=clang++ | ||||
| 
 | ||||
| curl -sS https://cmake.org/files/v3.4/cmake-3.4.0-Linux-x86_64.tar.gz | tar xz -C /tmp --strip 1 | ||||
| 
 | ||||
| /tmp/bin/cmake . | ||||
| /tmp/bin/cmake -DCMAKE_CXX_COMPILER=$CMAKE_CXX_COMPILER . | ||||
| make  | ||||
| make test | ||||
| @@ -1,8 +1,5 @@ | ||||
| #!/bin/sh -eux | ||||
| 
 | ||||
| export CC=gcc | ||||
| export CXX=g++ | ||||
| 
 | ||||
| curl https://cmake.org/files/v3.4/cmake-3.4.0-Linux-x86_64.tar.gz | tar xz -C /tmp --strip 1 | ||||
| 
 | ||||
| /tmp/bin/cmake -DCOVERAGE=true . | ||||
| @@ -10,7 +10,7 @@ file(GLOB_RECURSE IPP_FILES ../include/*.ipp) | ||||
| file(GLOB_RECURSE CPP_FILES *.cpp) | ||||
|  | ||||
| if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)") | ||||
| 	add_definitions( | ||||
| 	add_compile_options( | ||||
| 		-fno-exceptions | ||||
| 		-fno-rtti | ||||
| 		-pedantic | ||||
| @@ -40,25 +40,30 @@ if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU|Clang)") | ||||
| 	) | ||||
| endif() | ||||
|  | ||||
| if(CMAKE_CXX_COMPILER_ID MATCHES "(GNU)") | ||||
| 	add_definitions( | ||||
| 		-Wlogical-op | ||||
| 		-Wnoexcept | ||||
| if(CMAKE_CXX_COMPILER_ID MATCHES "GNU") | ||||
| 	add_compile_options( | ||||
| 		-Wstrict-null-sentinel | ||||
| 	) | ||||
|  | ||||
| 	if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.5) | ||||
| 		add_compile_options(-Wlogical-op) # the flag exists in 4.4 but is buggy | ||||
| 	endif() | ||||
|  | ||||
| 	if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER 4.6) | ||||
| 		add_compile_options(-Wnoexcept) | ||||
| 	endif() | ||||
| endif() | ||||
|  | ||||
| if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") | ||||
| 	add_definitions( | ||||
| 	add_compile_options( | ||||
| 		-Wc++11-compat | ||||
| 		-Wdeprecated-register | ||||
| 	) | ||||
| endif() | ||||
|  | ||||
| if(MSVC) | ||||
| 	add_definitions( | ||||
| 		-D_CRT_SECURE_NO_WARNINGS | ||||
| 		-W4) | ||||
| 	add_definitions(-D_CRT_SECURE_NO_WARNINGS) | ||||
| 	add_compile_options(-W4) | ||||
| endif() | ||||
|  | ||||
| add_library(ArduinoJson ${CPP_FILES} ${HPP_FILES} ${IPP_FILES}) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user