diff --git a/CMakeLists.txt b/CMakeLists.txt index aeacfb16fb..fde8670d01 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -88,4 +88,4 @@ endif() # Including this module will add a `clang-format` target to the build if # the clang-format executable can be found. -include(cmake/clang-format) +include(cmake/clang-format.cmake) diff --git a/PyIlmBase/CMakeLists.txt b/PyIlmBase/CMakeLists.txt index 4f8db6039e..e4da30f66b 100644 --- a/PyIlmBase/CMakeLists.txt +++ b/PyIlmBase/CMakeLists.txt @@ -46,21 +46,21 @@ find_package(Python2 COMPONENTS Interpreter Development) find_package(Python3 COMPONENTS Interpreter Development) if(Python2_FOUND) message(STATUS ": Found Python ${Python2_VERSION}") -elseif(Python2_Python) +elseif(Python2::Python) message(WARNING ": Found Python ${Python2_VERSION} development libraries, but no interpreter") -elseif(Python2_EXECUTABLE) +elseif(Python2::Interpreter) message(WARNING ": Found Python ${Python2_VERSION} interpreter, but no development libraries") else() - message(WARNING ": Unable to find Python ${Python2_VERSION} interpreter or development libraries") + message(WARNING ": Unable to find Python2 interpreter or development libraries") endif() if(Python3_FOUND) message(STATUS ": Found Python ${Python3_VERSION}") -elseif(Python3_Python) +elseif(Python3::Python) message(WARNING ": Found Python ${Python3_VERSION} development libraries, but no interpreter") -elseif(Python3_EXECUTABLE) +elseif(Python3::Interpreter) message(WARNING ": Found Python ${Python3_VERSION} interpreter, but no development libraries") else() - message(WARNING ": Unable to find Python ${Python3_VERSION} interpreter or development libraries") + message(WARNING ": Unable to find Python3 interpreter or development libraries") endif() if (NOT Python2_FOUND AND NOT Python3_FOUND) message(WARNING ": Disabling PyIlmBase") diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ab3843af8c..6f346eac42 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -39,17 +39,37 @@ jobs: strategy: matrix: CentOS 7 gcc VFX CY2019: - agentImage: 'ubuntu-16.04' containerImage: aswfstaging/ci-openexr:2019.0 + buildType: Release cxxCompiler: g++ cCompiler: gcc CentOS 7 Clang 7 VFX CY2019: - agentImage: 'ubuntu-16.04' containerImage: aswfstaging/ci-openexr:2019.0 + buildType: Release cxxCompiler: clang++ cCompiler: clang + CentOS 7 gcc VFX CY2020: + containerImage: aswfstaging/ci-openexr:2020.0 + buildType: Release + cxxCompiler: g++ + cCompiler: gcc + excludeTests: PyIlmBase.*_Python2|PyIlmBase.PyImathNumpyTest_Python3 + CentOS 7 Clang 7 VFX CY2020: + containerImage: aswfstaging/ci-openexr:2020.0 + buildType: Release + cxxCompiler: clang++ + cCompiler: clang + excludeTests: PyIlmBase.*_Python2|PyIlmBase.PyImathNumpyTest_Python3 + # Sanitize Test CentOS 7 gcc VFX CY2019: + # containerImage: aswfstaging/ci-openexr:2019.0 + # buildType: Debug + # cxxCompiler: g++ + # cCompiler: gcc + # cxxFlags: -g -fsanitize=address + # cFlags: -g -fsanitize=address + # ldFlags: -fsanitize=address pool: - vmImage: $(agentImage) + vmImage: 'ubuntu-16.04' container: $[ variables['containerImage'] ] timeoutInMinutes: 360 @@ -62,6 +82,10 @@ jobs: parameters: cxxCompiler: $(cxxCompiler) cCompiler: $(cCompiler) + cxxFlags: $(cxxFlags) + cFlags: $(cFlags) + ldFlags: $(ldFlags) + buildType: $(buildType) - template: share/ci/templates/build.yml parameters: @@ -71,7 +95,7 @@ jobs: - template: share/ci/templates/test.yml parameters: - excludeTests: '' + excludeTests: $(excludeTests) - task: PublishTestResults@2 condition: succeededOrFailed() @@ -85,8 +109,9 @@ jobs: # SonarCloud static analysis # ------------------------------------------------------------------------------ - job: SonarCloud - displayName: SonarCloud Ubuntu 16.04 VFX CY2019 - condition: in(variables['Build.Reason'], 'Manual', 'Schedule') + displayName: SonarCloud Ubuntu 16.04 VFX CY2020 + condition: succeededOrFailed() +# condition: in(variables['Build.Reason'], 'Manual', 'Schedule') timeoutInMinutes: 360 pool: vmImage: 'ubuntu-16.04' @@ -113,8 +138,6 @@ jobs: matrix: 10.14 AppleClang 10.0: agentImage: 'macOS-10.14' - 10.13 AppleClang 10.0: - agentImage: 'macOS-10.13' pool: vmImage: $(agentImage) timeoutInMinutes: 360 diff --git a/share/ci/templates/build_sonar.yml b/share/ci/templates/build_sonar.yml index 1094f18541..8e79f884d6 100644 --- a/share/ci/templates/build_sonar.yml +++ b/share/ci/templates/build_sonar.yml @@ -22,8 +22,8 @@ steps: - template: test.yml -- bash: share/ci/scripts/linux/run_gcov.sh - displayName: Generate code coverage report +# - bash: share/ci/scripts/linux/run_gcov.sh +# displayName: Generate code coverage report - bash: sonar-scanner -X -Dsonar.login=$(SONAR_TOKEN) displayName: Run sonar-scanner diff --git a/share/ci/templates/configure.yml b/share/ci/templates/configure.yml index 13dd942473..2a3c84c3d6 100644 --- a/share/ci/templates/configure.yml +++ b/share/ci/templates/configure.yml @@ -9,6 +9,8 @@ parameters: verbose: OFF cxxStd: 14 cxxFlags: '' + cFlags: '' + ldFlags: '' cxxCompiler: '' cCompiler: '' cmakeOpts: '' @@ -31,6 +33,8 @@ steps: -DCMAKE_BUILD_TYPE=${{ parameters.buildType }} \ -DCMAKE_CXX_STANDARD=${{ parameters.cxxStd }} \ -DCMAKE_CXX_FLAGS="${{ parameters.cxxFlags }}" \ + -DCMAKE_C_FLAGS="${{ parameters.cFlags }}" \ + -DCMAKE_LD_FLAGS="${{ parameters.ldFlags }}" \ -DCMAKE_VERBOSE_MAKEFILE:BOOL=${{ parameters.verbose }} \ -DBUILD_SHARED_LIBS=${{ parameters.buildSharedLibs }} \ -DOPENEXR_BUILD_UTILS=${{ parameters.buildUtils }} \ diff --git a/sonar-project.properties b/sonar-project.properties index 9e44b93e2b..ce76ac517c 100644 --- a/sonar-project.properties +++ b/sonar-project.properties @@ -18,7 +18,7 @@ sonar.links.issue=https://github.com/AcademySoftwareFoundation/openexr/issues # Source properties sonar.sources=IlmBase,OpenEXR,PyIlmBase sonar.sourceEncoding=UTF-8 -sonar.exclusions= +sonar.exclusions=src/bindings/java/**,*.java # C/C++ analyzer properties sonar.cfamily.build-wrapper-output=_build/bw_output