From 5680a1ad9ee950a361079dc9ffad6a422c661efb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Achard?= Date: Sat, 21 Sep 2024 18:37:15 +0100 Subject: [PATCH 1/2] Fix platform latest MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémi Achard --- .github/workflows/platform_latest.yml | 50 ++++++++++++++------------- tests/python/OpenColorIOTestSuite.py | 3 ++ 2 files changed, 29 insertions(+), 24 deletions(-) diff --git a/.github/workflows/platform_latest.yml b/.github/workflows/platform_latest.yml index 5270340ec6..3279f7f1a9 100644 --- a/.github/workflows/platform_latest.yml +++ b/.github/workflows/platform_latest.yml @@ -37,7 +37,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - build: [1, 2] + build: [1, 2, 3, 4] include: # ------------------------------------------------------------------- # GCC @@ -63,26 +63,24 @@ jobs: # ------------------------------------------------------------------- # Clang # ------------------------------------------------------------------- - # TODO: Re-enable clang when the following issue get fixed: - # https://github.com/actions/runner-images/issues/8659 - # - build: 3 - # build-python: ON - # build-type: Release - # build-shared: ON - # cxx-standard: 23 - # cxx-compiler: clang++ - # cc-compiler: clang - # compiler-desc: Clang - # enable-sanitizer: OFF - # - build: 4 - # build-python: OFF - # build-type: Debug - # build-shared: ON - # cxx-standard: 23 - # cxx-compiler: clang++ - # cc-compiler: clang - # compiler-desc: Clang - # enable-sanitizer: ON + - build: 3 + build-python: ON + build-type: Release + build-shared: ON + cxx-standard: 23 + cxx-compiler: clang++ + cc-compiler: clang + compiler-desc: Clang + enable-sanitizer: OFF + - build: 4 + build-python: OFF + build-type: Debug + build-shared: ON + cxx-standard: 23 + cxx-compiler: clang++ + cc-compiler: clang + compiler-desc: Clang + enable-sanitizer: ON env: CXX: ${{ matrix.cxx-compiler }} CC: ${{ matrix.cc-compiler }} @@ -103,7 +101,7 @@ jobs: -DCMAKE_CXX_STANDARD=${{ matrix.cxx-standard }} \ -DBUILD_SHARED_LIBS=${{ matrix.build-shared }} \ -DOCIO_BUILD_DOCS=OFF \ - -DOCIO_BUILD_OPENFX=ON \ + -DOCIO_BUILD_OPENFX=OFF \ -DOCIO_BUILD_GPU_TESTS=OFF \ -DOCIO_BUILD_PYTHON=${{ matrix.build-python}} \ -DOCIO_USE_SIMD=ON \ @@ -218,7 +216,7 @@ jobs: -DCMAKE_CXX_STANDARD=${{ matrix.cxx-standard }} \ -DBUILD_SHARED_LIBS=${{ matrix.build-shared }} \ -DOCIO_BUILD_DOCS=OFF \ - -DOCIO_BUILD_OPENFX=ON \ + -DOCIO_BUILD_OPENFX=OFF \ -DOCIO_BUILD_GPU_TESTS=OFF \ -DOCIO_BUILD_PYTHON=${{ matrix.build-python}} \ -DOCIO_USE_SIMD=ON \ @@ -332,7 +330,7 @@ jobs: -DCMAKE_GENERATOR_PLATFORM=x64 \ -DBUILD_SHARED_LIBS=${{ matrix.build-shared }} \ -DOCIO_BUILD_DOCS=OFF \ - -DOCIO_BUILD_OPENFX=ON \ + -DOCIO_BUILD_OPENFX=OFF \ -DOCIO_BUILD_GPU_TESTS=OFF \ -DOCIO_BUILD_PYTHON=${{ matrix.build-python}} \ -DOCIO_USE_SIMD=ON \ @@ -353,6 +351,10 @@ jobs: - name: Test run: ctest -V -C ${{ matrix.build-type }} shell: bash + # See below issue for context: + # https://github.com/AcademySoftwareFoundation/OpenColorIO/issues/2040 + env: + OCIO_PYTHON_LOAD_DLLS_FROM_PATH: "0" working-directory: _build - name: Test CMake Consumer with shared OCIO if: matrix.build-shared == 'ON' diff --git a/tests/python/OpenColorIOTestSuite.py b/tests/python/OpenColorIOTestSuite.py index d312ba7c58..88bf5ee7dc 100755 --- a/tests/python/OpenColorIOTestSuite.py +++ b/tests/python/OpenColorIOTestSuite.py @@ -26,6 +26,9 @@ opencolorio_dir = os.path.join(opencolorio_dir, sys.argv[2]) # PyOpenColorIO __init__.py file handle os.add_dll_directory() os.environ['PATH'] = '{0};{1}'.format(opencolorio_dir, os.getenv('PATH', '')) + # But add it here unconditionally to allow test to work when OCIO_PYTHON_LOAD_DLLS_FROM_PATH + # is disabled. + os.add_dll_directory(opencolorio_dir) elif sys.platform == 'darwin': # On OSX we must add the main library location to DYLD_LIBRARY_PATH os.environ['DYLD_LIBRARY_PATH'] = '{0}:{1}'.format( From 94838079adb0c4f31c515420a4756f54d2f137ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Achard?= Date: Wed, 25 Sep 2024 08:48:57 +0100 Subject: [PATCH 2/2] Fix Windows Python 3.7 CI MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Rémi Achard --- tests/python/OpenColorIOTestSuite.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/python/OpenColorIOTestSuite.py b/tests/python/OpenColorIOTestSuite.py index 88bf5ee7dc..89bd110087 100755 --- a/tests/python/OpenColorIOTestSuite.py +++ b/tests/python/OpenColorIOTestSuite.py @@ -28,7 +28,8 @@ os.environ['PATH'] = '{0};{1}'.format(opencolorio_dir, os.getenv('PATH', '')) # But add it here unconditionally to allow test to work when OCIO_PYTHON_LOAD_DLLS_FROM_PATH # is disabled. - os.add_dll_directory(opencolorio_dir) + if sys.version_info >= (3, 8): + os.add_dll_directory(opencolorio_dir) elif sys.platform == 'darwin': # On OSX we must add the main library location to DYLD_LIBRARY_PATH os.environ['DYLD_LIBRARY_PATH'] = '{0}:{1}'.format(