Cleanup .travis.yml a bit
Signed-off-by: Jeroen Koekkoek <jeroen@koekkoek.nl>
This commit is contained in:
		
							parent
							
								
									b9c2553a7b
								
							
						
					
					
						commit
						8445394e2a
					
				
					 2 changed files with 78 additions and 71 deletions
				
			
		
							
								
								
									
										124
									
								
								.travis.yml
									
										
									
									
									
								
							
							
						
						
									
										124
									
								
								.travis.yml
									
										
									
									
									
								
							|  | @ -37,54 +37,61 @@ submit_to_coverity_scan: &submit_to_coverity_scan | |||
|                "https://scan.coverity.com/builds"; | ||||
|   fi | ||||
| 
 | ||||
| linux_gcc8: &linux_gcc8 | ||||
| ubuntu1804_gcc10: &ubuntu1804_gcc10 | ||||
|   os: linux | ||||
|   dist: xenial | ||||
|   dist: bionic | ||||
|   compiler: gcc | ||||
|   addons: | ||||
|     apt: | ||||
|       update: true | ||||
|       sources: [ ubuntu-toolchain-r-test ] | ||||
|       packages: [ gcc-8, g++-8 ] | ||||
|       sources: | ||||
|         - sourceline: 'ppa:ubuntu-toolchain-r/test' | ||||
|       packages: [ gcc-10 g++-10 ] | ||||
|   before_install: | ||||
|     - eval "export CC=gcc-8" | ||||
|     - eval "export CXX=g++-8" | ||||
|     - eval "export CC=gcc-10 CXX=g++-10" | ||||
|     - eval "export COV_COMPTYPE=gcc COV_PLATFORM=linux64" | ||||
|     - eval "export BUILD_TOOL_OPTIONS='-j 4'" | ||||
|     - eval "export GENERATOR='Unix Makefiles'" | ||||
|   install: | ||||
|     - *install_coverity | ||||
|     - pip install conan --upgrade --user | ||||
| 
 | ||||
| linux_clang: &linux_clang | ||||
| ubuntu1804_clang10: &ubuntu1804_clang10 | ||||
|   os: linux | ||||
|   dist: xenial | ||||
|   dist: bionic | ||||
|   compiler: clang | ||||
|   addons: | ||||
|     apt: | ||||
|       update: true | ||||
|       packages: [ ] | ||||
|       sources: | ||||
|         - sourceline: 'deb https://apt.llvm.org/bionic llvm-toolchain-bionic-10 main' | ||||
|           key_url: 'https://apt.llvm.org/llvm-snapshot.gpg.key' | ||||
|       packages: [ clang-10 clang++-10 ] | ||||
|   before_install: | ||||
|     - eval "export CC=clang" | ||||
|     - eval "export CXX=clang++" | ||||
|     - eval "export CC=clang-10 CXX=clang++-10" | ||||
|     - eval "export COV_COMPTYPE=clang COV_PLATFORM=linux64" | ||||
|     - eval "export BUILD_TOOL_OPTIONS='-j 4'" | ||||
|     - eval "export GENERATOR='Unix Makefiles'" | ||||
|   install: | ||||
|     - pip install conan --upgrade --user | ||||
| 
 | ||||
| osx_xcode: &osx_xcode | ||||
| macos1015_xcode11_6: &macos1015_xcode11_6 | ||||
|   os: osx | ||||
|   osx_image: xcode11.1 | ||||
|   osx_image: xcode11.6 | ||||
|   compiler: clang | ||||
|   addons: | ||||
|     homebrew: | ||||
|       packages: [ python3 ] | ||||
|   before_install: | ||||
|     - eval "export CC=clang" | ||||
|     - eval "export CXX=clang++" | ||||
|     - eval "export CC=clang CXX=clang++" | ||||
|     - eval "export COV_COMPTYPE=clang COV_PLATFORM=macOSX" | ||||
|     - eval "export BUILD_TOOL_OPTIONS='-j 4'" | ||||
|     - eval "export GENERATOR='Unix Makefiles'" | ||||
|     - eval "export PATH=\"${PATH}:$(python3 -m site --user-base)/bin\"" | ||||
|   install: | ||||
|     - python3 -m pip install conan --upgrade --user | ||||
| 
 | ||||
| windows_vs2017: &windows_vs2017 | ||||
| windows1809_vs2017: &windows1809_vs2017 | ||||
|   os: windows | ||||
|   # Conan will automatically determine the best compiler for a given platform | ||||
|   # based on educated guesses. The first check is based on the CC and CXX | ||||
|  | @ -109,9 +116,15 @@ windows_vs2017: &windows_vs2017 | |||
|   before_install: | ||||
|     - eval "unset COVERITY_SCAN_TOKEN" | ||||
|     - eval "unset COVERITY_SCAN_EMAIL" | ||||
|     - eval "unset CC" | ||||
|     - eval "unset CXX" | ||||
|     - eval "unset CC CXX" | ||||
|     - eval "export COV_COMPTYPE=msvc COV_PLATFORM=win64" | ||||
|     - eval "export BUILD_TOOL_OPTIONS='-nologo -verbosity:minimal -maxcpucount -p:CL_MPCount=2'" | ||||
|     - | | ||||
|       if [ "${ARCH}" = "x86_64" ]; then | ||||
|         eval "export GENERATOR='Visual Studio 15 2017 Win64'" | ||||
|       else | ||||
|         eval "export GENERATOR='Visual Studio 15 2017'" | ||||
|       fi | ||||
|     - JAVA_HOME=$(find "/c/Program Files/Android/jdk/" -name "*openjdk*" | sort | head -n 1) | ||||
|     - export JAVA_HOME | ||||
|     - export PATH="${PATH}:${JAVA_HOME}/bin" | ||||
|  | @ -129,35 +142,35 @@ windows_vs2017: &windows_vs2017 | |||
| 
 | ||||
| jobs: | ||||
|   include: | ||||
|     - <<: *linux_gcc8 | ||||
|       env: [ ARCH=x86_64, ASAN=none, BUILD_TYPE=Debug, SSL=YES, SECURITY=YES, LIFESPAN=YES, DEADLINE=YES, GENERATOR="Unix Makefiles", COVERITY_SCAN=true ] | ||||
|     - <<: *ubuntu1804_gcc10 | ||||
|       env: [ ARCH=x86_64, BUILD_TYPE=Debug, SSL=YES, SECURITY=YES, LIFESPAN=YES, DEADLINE=YES, COVERITY_SCAN=true ] | ||||
|       if: type = cron | ||||
|     - <<: *linux_gcc8 | ||||
|       env: [ ARCH=x86_64, ASAN=none, BUILD_TYPE=Debug, SSL=YES, SECURITY=YES, LIFESPAN=YES, DEADLINE=YES, GENERATOR="Unix Makefiles" ] | ||||
|     - <<: *linux_gcc8 | ||||
|       env: [ ARCH=x86_64, ASAN=none, BUILD_TYPE=Debug, SSL=YES, SECURITY=YES, LIFESPAN=YES, DEADLINE=YES, GENERATOR="Unix Makefiles", CONANFILE=conanfile102.txt ] | ||||
|     - <<: *linux_gcc8 | ||||
|       env: [ ARCH=x86_64, ASAN=none, BUILD_TYPE=Release, SSL=YES, SECURITY=YES, LIFESPAN=YES, DEADLINE=YES, GENERATOR="Unix Makefiles" ] | ||||
|     - <<: *linux_gcc8 | ||||
|       env: [ ARCH=x86_64, ASAN=none, BUILD_TYPE=Debug, SSL=NO, SECURITY=YES, LIFESPAN=NO, DEADLINE=NO, GENERATOR="Unix Makefiles" ] | ||||
|     - <<: *linux_clang | ||||
|       env: [ ARCH=x86_64, ASAN=address, BUILD_TYPE=Debug, SSL=YES, SECURITY=YES, LIFESPAN=YES, DEADLINE=YES, GENERATOR="Unix Makefiles" ] | ||||
|     - <<: *linux_clang | ||||
|       env: [ ARCH=x86_64, ASAN=address, BUILD_TYPE=Debug, SSL=YES, SECURITY=NO, LIFESPAN=YES, DEADLINE=YES, GENERATOR="Unix Makefiles" ] | ||||
|     - <<: *linux_clang | ||||
|       env: [ ARCH=x86_64, ASAN=none, BUILD_TYPE=Release, SSL=YES, SECURITY=YES, LIFESPAN=YES, DEADLINE=YES, GENERATOR="Unix Makefiles" ] | ||||
|     - <<: *osx_xcode | ||||
|       env: [ ARCH=x86_64, ASAN=none, BUILD_TYPE=Release, SSL=NO, SECURITY=YES, LIFESPAN=YES, DEADLINE=YES, GENERATOR="Unix Makefiles", MACOSX_DEPLOYMENT_TARGET=10.12 ] | ||||
|     - <<: *osx_xcode | ||||
|       env: [ ARCH=x86_64, ASAN=address, BUILD_TYPE=Debug, SSL=YES, SECURITY=YES, LIFESPAN=YES, DEADLINE=YES, GENERATOR="Unix Makefiles" ] | ||||
|     - <<: *osx_xcode | ||||
|       env: [ ARCH=x86_64, ASAN=none, BUILD_TYPE=Release, SSL=YES, SECURITY=YES, LIFESPAN=YES, DEADLINE=YES, GENERATOR="Unix Makefiles" ] | ||||
|     - <<: *windows_vs2017 | ||||
|       env: [ ARCH=x86, ASAN=none, BUILD_TYPE=Debug, SSL=YES, SECURITY=YES, LIFESPAN=YES, DEADLINE=YES, GENERATOR="Visual Studio 15 2017", CONANFILE=conanfile102.txt ] | ||||
|     - <<: *windows_vs2017 | ||||
|       env: [ ARCH=x86_64, ASAN=none, BUILD_TYPE=Debug, SSL=YES, SECURITY=YES, LIFESPAN=YES, DEADLINE=YES, GENERATOR="Visual Studio 15 2017 Win64" ] | ||||
|     - <<: *windows_vs2017 | ||||
|       env: [ ARCH=x86_64, ASAN=none, BUILD_TYPE=Release, SSL=YES, SECURITY=YES, LIFESPAN=YES, DEADLINE=YES, GENERATOR="Visual Studio 15 2017 Win64" ] | ||||
|     - <<: *ubuntu1804_gcc10 | ||||
|       env: [ ARCH=x86_64, BUILD_TYPE=Debug, SSL=YES, SECURITY=YES, LIFESPAN=YES, DEADLINE=YES ] | ||||
|     - <<: *ubuntu1804_gcc10 | ||||
|       env: [ ARCH=x86_64, BUILD_TYPE=Debug, SSL=YES, SECURITY=YES, LIFESPAN=YES, DEADLINE=YES, CONANFILE=conanfile102.txt ] | ||||
|     - <<: *ubuntu1804_gcc10 | ||||
|       env: [ ARCH=x86_64, BUILD_TYPE=Release, SSL=YES, SECURITY=YES, LIFESPAN=YES, DEADLINE=YES ] | ||||
|     - <<: *ubuntu1804_gcc10 | ||||
|       env: [ ARCH=x86_64, BUILD_TYPE=Debug, SSL=NO, SECURITY=YES, LIFESPAN=NO, DEADLINE=NO ] | ||||
|     - <<: *ubuntu1804_clang10 | ||||
|       env: [ ARCH=x86_64, SANITIZER=address, BUILD_TYPE=Debug, SSL=YES, SECURITY=YES, LIFESPAN=YES, DEADLINE=YES ] | ||||
|     - <<: *ubuntu1804_clang10 | ||||
|       env: [ ARCH=x86_64, SANITIZER=address, BUILD_TYPE=Debug, SSL=YES, SECURITY=NO, LIFESPAN=YES, DEADLINE=YES ] | ||||
|     - <<: *ubuntu1804_clang10 | ||||
|       env: [ ARCH=x86_64, BUILD_TYPE=Release, SSL=YES, SECURITY=YES, LIFESPAN=YES, DEADLINE=YES ] | ||||
|     - <<: *macos1015_xcode11_6 | ||||
|       env: [ ARCH=x86_64, BUILD_TYPE=Release, SSL=NO, SECURITY=YES, LIFESPAN=YES, DEADLINE=YES, MACOSX_DEPLOYMENT_TARGET=10.12 ] | ||||
|     - <<: *macos1015_xcode11_6 | ||||
|       env: [ ARCH=x86_64, SANITIZER=address, BUILD_TYPE=Debug, SSL=YES, SECURITY=YES, LIFESPAN=YES, DEADLINE=YES ] | ||||
|     - <<: *macos1015_xcode11_6 | ||||
|       env: [ ARCH=x86_64, BUILD_TYPE=Release, SSL=YES, SECURITY=YES, LIFESPAN=YES, DEADLINE=YES ] | ||||
|     - <<: *windows1809_vs2017 | ||||
|       env: [ ARCH=x86, BUILD_TYPE=Debug, SSL=YES, SECURITY=YES, LIFESPAN=YES, DEADLINE=YES, CONANFILE=conanfile102.txt ] | ||||
|     - <<: *windows1809_vs2017 | ||||
|       env: [ ARCH=x86_64, BUILD_TYPE=Debug, SSL=YES, SECURITY=YES, LIFESPAN=YES, DEADLINE=YES ] | ||||
|     - <<: *windows1809_vs2017 | ||||
|       env: [ ARCH=x86_64, BUILD_TYPE=Release, SSL=YES, SECURITY=YES, LIFESPAN=YES, DEADLINE=YES ] | ||||
| 
 | ||||
| before_script: | ||||
|   - conan profile new default --detect | ||||
|  | @ -186,7 +199,7 @@ script: | |||
|   - conan install -b missing -s arch=${ARCH} -s build_type=${BUILD_TYPE} ../${CONANFILE:-conanfile.txt} | ||||
|   - cmake -DCMAKE_BUILD_TYPE=${BUILD_TYPE} | ||||
|           -DCMAKE_INSTALL_PREFIX=${INSTALLPREFIX} | ||||
|           -DUSE_SANITIZER=${ASAN} | ||||
|           -DUSE_SANITIZER=${SANITIZER} | ||||
|           -DENABLE_SSL=${SSL} | ||||
|           -DENABLE_SECURITY=${SECURITY} | ||||
|           -DENABLE_LIFESPAN=${LIFESPAN} | ||||
|  | @ -194,25 +207,14 @@ script: | |||
|           -DBUILD_TESTING=on | ||||
|           -DWERROR=on | ||||
|           -G "${GENERATOR}" .. | ||||
|   - | | ||||
|     case "${GENERATOR}" in | ||||
|       "Unix Makefiles") | ||||
|         ${SCAN_BUILD} cmake --build . --config ${BUILD_TYPE} --target install -- -j 4 | ||||
|         ;; | ||||
|       "Visual Studio "*) | ||||
|         ${SCAN_BUILD} cmake --build . --config ${BUILD_TYPE} --target install -- -nologo -verbosity:minimal -maxcpucount -p:CL_MPCount=2 | ||||
|         ;; | ||||
|       *) | ||||
|         ${SCAN_BUILD} cmake --build . --config ${BUILD_TYPE} --target install | ||||
|         ;; | ||||
|     esac | ||||
|   - ${SCAN_BUILD} cmake --build . --config ${BUILD_TYPE} --target install -- ${BUILD_TOOL_OPTIONS} | ||||
|   - CYCLONEDDS_URI='<CycloneDDS><Domain><Internal><EnableExpensiveChecks>all</EnableExpensiveChecks><LivelinessMonitoring>true</LivelinessMonitoring></Internal><Tracing><Verbosity>config</Verbosity><OutputFile>stderr</OutputFile></Tracing></Domain></CycloneDDS>' ctest -j 4 --output-on-failure -T test -E '^CUnit_ddsrt_random_default_random$' -C ${BUILD_TYPE} | ||||
|   - | | ||||
|     if [ "${ASAN}" = "none" ]; then | ||||
|     if [ -z "${SANITIZER}" ]; then | ||||
|       ${SHELL} ../src/tools/ddsperf/sanity.bash; | ||||
|     fi | ||||
|   - | | ||||
|     if [ "${ASAN}" != "none" ]; then | ||||
|     if [ -n "${SANITIZER}" ]; then | ||||
|       CMAKE_LINKER_FLAGS="-DCMAKE_LINKER_FLAGS=-fsanitize=${USE_SANITIZER}"; | ||||
|       CMAKE_C_FLAGS="-DCMAKE_C_FLAGS=-fsanitize=${USE_SANITIZER}"; | ||||
|     fi | ||||
|  |  | |||
|  | @ -174,21 +174,26 @@ if(${CMAKE_GENERATOR} STREQUAL "Xcode") | |||
|   set (CMAKE_XCODE_ATTRIBUTE_GCC_WARN_ABOUT_MISSING_PROTOTYPES YES) | ||||
| endif() | ||||
| 
 | ||||
| if(CMAKE_VERSION VERSION_LESS 3.13) | ||||
|   macro(add_link_options) | ||||
|     link_libraries(${ARGV}) | ||||
|   endmacro() | ||||
| endif() | ||||
| 
 | ||||
| # Make it easy to enable Clang's/gcc's analyzers | ||||
| set(USE_SANITIZER "" CACHE STRING "Sanitizers to enable on the build.") | ||||
| if(NOT("${USE_SANITIZER}" STREQUAL "")) | ||||
|   foreach(san "${USE_SANITIZER}") | ||||
|     message(STATUS "Enabling sanitizer: '${san}'") | ||||
| 
 | ||||
|     if("${san}" STREQUAL address) | ||||
|       add_compile_options(-fno-omit-frame-pointer) | ||||
|       link_libraries(-fno-omit-frame-pointer) | ||||
| if(USE_SANITIZER) | ||||
|   string(REGEX REPLACE " " "" USE_SANITIZER "${USE_SANITIZER}") | ||||
|   string(REGEX REPLACE "[,;]+" ";" USE_SANITIZER "${USE_SANITIZER}") | ||||
|   foreach(san ${USE_SANITIZER}) | ||||
|     if(san STREQUAL "address") | ||||
|       add_compile_options("-fno-omit-frame-pointer") | ||||
|       add_link_options("-fno-omit-frame-pointer") | ||||
|     endif() | ||||
| 
 | ||||
|     if(NOT("${san}" STREQUAL "none")) | ||||
|     if(san AND NOT san STREQUAL "none") | ||||
|       message(STATUS "Enabling sanitizer: ${san}") | ||||
|       add_compile_options("-fsanitize=${san}") | ||||
|       link_libraries("-fsanitize=${san}") | ||||
|       add_link_options("-fsanitize=${san}") | ||||
|     endif() | ||||
|   endforeach() | ||||
| endif() | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Jeroen Koekkoek
						Jeroen Koekkoek