diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index ad6c88df53..de7ede4522 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -30,69 +30,71 @@ jobs: # and then use `include` to define their settings. name: [ - linux-platform24, linux-platform25, - linux-debug-platform25, - windows-platform25, - windows-debug-platform25, - macos-platform25 + linux-platform26, + linux-debug-platform26, + windows-platform26, + windows-debug-platform26, + macos-platform26 ] include: - - name: linux-platform24 + - name: linux-platform25 os: ubuntu-24.04 buildType: RELEASE - containerImage: ghcr.io/gafferhq/build/build:3.4.0 + containerImage: ghcr.io/gafferhq/build/build:4.0.0 options: .github/workflows/main/options.posix - dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/10.0.0/gafferDependencies-10.0.0-linux-gcc11.tar.gz + dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/11.0.0/gafferDependencies-11.0.0-linux-platform25.tar.gz tests: testCore testCorePython testScene testImage testAlembic testUSD testVDB publish: true jobs: 4 + pythonABIVersion: "3.11" + extraBuildArguments: CXXSTD=c++17 - - name: linux-platform25 + - name: linux-platform26 os: ubuntu-24.04 buildType: RELEASE - containerImage: ghcr.io/gafferhq/build/build:4.0.0 + containerImage: ghcr.io/gafferhq/build/build:5.0.0a1 options: .github/workflows/main/options.posix - dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/11.0.0a8/gafferDependencies-11.0.0a8-linux-platform25.tar.gz + dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/12.0.0a3/gafferDependencies-12.0.0a3-linux-platform26.tar.gz tests: testCore testCorePython testScene testImage testAlembic testUSD testVDB publish: true jobs: 4 - - name: linux-debug-platform25 + - name: linux-debug-platform26 os: ubuntu-24.04 buildType: DEBUG - containerImage: ghcr.io/gafferhq/build/build:4.0.0 + containerImage: ghcr.io/gafferhq/build/build:5.0.0a1 options: .github/workflows/main/options.posix - dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/11.0.0a8/gafferDependencies-11.0.0a8-linux-platform25.tar.gz + dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/12.0.0a3/gafferDependencies-12.0.0a3-linux-platform26.tar.gz tests: testCore testCorePython testScene testImage testAlembic testUSD testVDB publish: false jobs: 4 - - name: windows-platform25 + - name: windows-platform26 os: windows-2022 buildType: RELEASE options: .github/workflows/main/options.windows - dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/11.0.0a8/gafferDependencies-11.0.0a8-windows-platform25.zip + dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/12.0.0a3/gafferDependencies-12.0.0a3-windows-platform26.zip tests: testCore testCorePython testScene testImage testAlembic testUSD testVDB publish: true jobs: 4 - - name: windows-debug-platform25 + - name: windows-debug-platform26 os: windows-2022 buildType: RELWITHDEBINFO options: .github/workflows/main/options.windows - dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/11.0.0a8/gafferDependencies-11.0.0a8-windows-platform25.zip + dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/12.0.0a3/gafferDependencies-12.0.0a3-windows-platform26.zip tests: testCore testCorePython testScene testImage testAlembic testUSD testVDB publish: false jobs: 4 - - name: macos-platform25 + - name: macos-platform26 os: macos-15 buildType: RELEASE options: .github/workflows/main/options.posix - dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/11.0.0a8/gafferDependencies-11.0.0a8-macos-platform25.tar.gz + dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/12.0.0a3/gafferDependencies-12.0.0a3-macos-platform26.tar.gz tests: testCore testCorePython testScene testImage testAlembic testUSD testVDB publish: true jobs: 3 @@ -101,20 +103,18 @@ jobs: container: ${{ matrix.containerImage }} + env: + CORTEX_PYTHON_ABI_VERSION: ${{ matrix.pythonABIVersion }} + steps: - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - - name: Install Windows SDK - run: | - curl.exe -L --output winsdksetup.exe --url https://download.microsoft.com/download/9/7/9/97982c1d-d687-41be-9dd3-6d01e52ceb68/windowssdk/winsdksetup.exe - Start-Process ./winsdksetup.exe -ArgumentList "/Features OptionId.DesktopCPPx64 /Quiet /NoRestart" -NoNewWindow -Wait - shell: pwsh - if: runner.os == 'Windows' - - - uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 + - uses: TheMrMilchmann/setup-msvc-dev@368ef7d1ee4d1171b31d4a7f67f4d954f903f5a9 # v4.1.0 with: - sdk: 10.0.20348.0 + sdk: 10.0.22621.0 + arch: x64 + if: runner.os == 'Windows' - name: Install toolchain (Windows) run: | @@ -178,20 +178,20 @@ jobs: - name: Build run: | - scons -j ${{ matrix.jobs }} BUILD_TYPE=${{ matrix.buildType }} OPTIONS=${{ matrix.options }} BUILD_CACHEDIR=sconsCache + scons -j ${{ matrix.jobs }} BUILD_TYPE=${{ matrix.buildType }} OPTIONS=${{ matrix.options }} BUILD_CACHEDIR=sconsCache ${{ matrix.extraBuildArguments }} # Copy the config log for use in the "Debug Failures" step, because it # gets clobbered by the `scons test*` call below. cp config.log buildConfig.log - name: Test run: | - scons ${{ matrix.tests }} BUILD_TYPE=${{ matrix.buildType }} OPTIONS=${{ matrix.options }} BUILD_CACHEDIR=sconsCache + scons ${{ matrix.tests }} BUILD_TYPE=${{ matrix.buildType }} OPTIONS=${{ matrix.options }} BUILD_CACHEDIR=sconsCache ${{ matrix.extraBuildArguments }} env: OCIO: ocio://studio-config-v1.0.0_aces-v1.3_ocio-v2.1 - name: Build Package run: | - scons install BUILD_TYPE=${{ matrix.buildType }} OPTIONS=${{ matrix.options }} BUILD_CACHEDIR=sconsCache + scons install BUILD_TYPE=${{ matrix.buildType }} OPTIONS=${{ matrix.options }} BUILD_CACHEDIR=sconsCache ${{ matrix.extraBuildArguments }} ${{ env.PACKAGE_COMMAND }} ${{ env.CORTEX_BUILD_NAME }}.${{env.PACKAGE_EXTENSION}} ${{ env.CORTEX_BUILD_NAME }} if: matrix.publish diff --git a/.github/workflows/main/options.posix b/.github/workflows/main/options.posix index 385a50fa6a..32a0f73cd8 100644 --- a/.github/workflows/main/options.posix +++ b/.github/workflows/main/options.posix @@ -19,7 +19,7 @@ LIBPATH = libs PYTHON = deps + "/bin/python" -pythonABIVersion = "3.11" +pythonABIVersion = os.environ.get( "CORTEX_PYTHON_ABI_VERSION" ) or "3.13" PYTHON_LINK_FLAGS = "-lpython" + pythonABIVersion diff --git a/Changes b/Changes index 9500b935d2..22d31ebee2 100644 --- a/Changes +++ b/Changes @@ -17,6 +17,14 @@ Breaking Changes - MeshAlgo : Changed the output of `reverseWinding()`. - KDTree : Removed deprecated function signatures. +Build +----- + +- C++ : Updated to C++20. +- CI : Updated to GafferHQ/dependencies 12.0.0a3. +- GCC : Updated to 14.2.1 for Linux `platform26` builds. +- Windows : Updated Windows SDK to version 10.0.22621.0. + 10.7.x.x (relative to 10.7.4.1) ======== diff --git a/SConstruct b/SConstruct index fa01fd1c0d..8b43d728eb 100644 --- a/SConstruct +++ b/SConstruct @@ -99,7 +99,7 @@ o.Add( o.Add( "CXXSTD", "The C++ standard to build against.", - "c++17" + "c++20" ) o.Add( @@ -952,6 +952,7 @@ else: "/FC", # display full paths in diagnostics "/EHsc", # catch c++ exceptions only "/MP", # enable multiprocessing of builds + "/utf-8", # Required for fmtlib "/std:$CXXSTD", ] ) @@ -1276,6 +1277,10 @@ testEnvLibPath = testEnv.subst( testEnvLibPath ) if testEnv["PLATFORM"] == "darwin" : testEnvLibPath = os.pathsep.join( [ "/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ImageIO.framework/Resources/", testEnvLibPath ] ) +if "g++" in os.path.basename( env["CXX"] ) and "clang++" not in os.path.basename( env["CXX"] ) : + # GCC 14 reports this warning from inlined std::atomic loads used by oneTBB in RefCountedThreadingTest. + testEnv.Append( CXXFLAGS = [ "-Wno-error=stringop-overflow" ] ) + testEnv["ENV"][testEnv["TEST_LIBRARY_PATH_ENV_VAR"]] = os.pathsep.join( [ testEnv["ENV"].get(testEnv["TEST_LIBRARY_PATH_ENV_VAR"], ""), testEnvLibPath ] ) if testEnv["TEST_LIBRARY_PATH_ENV_VAR"] != libraryPathEnvVar : testEnv["ENV"][libraryPathEnvVar] = os.pathsep.join( [ testEnv["ENV"].get(libraryPathEnvVar, ""), testEnvLibPath ] ) diff --git a/test/IECore/HeaderGenerator.py b/test/IECore/HeaderGenerator.py index 4d74ee30aa..cd071494d9 100644 --- a/test/IECore/HeaderGenerator.py +++ b/test/IECore/HeaderGenerator.py @@ -37,6 +37,7 @@ """Unit test for HeaderGenerator binding""" import getpass import platform +import sys import unittest import IECore @@ -49,6 +50,8 @@ def testHeader(self): header = IECore.HeaderGenerator.header() self.assertEqual( header['ieCoreVersion'].value, IECore.versionString() ) ( sysname, nodename, release, version, machine, processor ) = platform.uname() + if sys.platform == "win32" : + release = str( sys.getwindowsversion().major ) self.assertEqual( header["host"]["systemName"].value, sysname ) self.assertEqual( header["host"]["nodeName"].value, nodename ) self.assertEqual( header["host"]["systemRelease"].value, release ) diff --git a/test/IECoreImage/ImageReaderTest.py b/test/IECoreImage/ImageReaderTest.py index 5d7b2406a5..48ec8313fa 100644 --- a/test/IECoreImage/ImageReaderTest.py +++ b/test/IECoreImage/ImageReaderTest.py @@ -33,6 +33,7 @@ ########################################################################## import os +import pathlib import sys import unittest import imath @@ -216,9 +217,9 @@ def testIncompleteImage( self ) : def testHeaderToBlindData( self ) : + filePath = pathlib.Path( "test" ) / "IECoreImage" / "data" / "exr" / "uvMap.512x256.exr" dictHeader = { 'channelNames': IECore.StringVectorData( [ "R", "G", "B" ] ), - 'oiio:ColorSpace': IECore.StringData( "lin_rec709" if IECoreImage.OpenImageIOAlgo.version() >= 30000 else "Linear" ), 'compression': IECore.StringData( "piz" ), 'screenWindowCenter': IECore.V2fData( imath.V2f(0,0) ), 'displayWindow': IECore.Box2iData( imath.Box2i( imath.V2i(0,0), imath.V2i(511,255) ) ), @@ -233,7 +234,18 @@ def testHeaderToBlindData( self ) : dictHeader["openexr:lineOrder"] = IECore.StringData( "increasingY" ) dictHeader["screenWindowCenter"] = IECore.V2fData( imath.V2f( 0 ) ) - r = IECore.Reader.create( os.path.join( "test", "IECoreImage", "data", "exr", "uvMap.512x256.exr" ) ) + if IECoreImage.OpenImageIOAlgo.version() < 30000 : + dictHeader["oiio:ColorSpace"] = IECore.StringData( "Linear" ) + elif IECoreImage.OpenImageIOAlgo.version() < 30104 : + dictHeader["oiio:ColorSpace"] = IECore.StringData( "lin_rec709" ) + + if IECoreImage.OpenImageIOAlgo.version() >= 30200 : + dictHeader["oiio:RowsPerChunk"] = IECore.IntData( 32 ) + if IECoreImage.OpenImageIOAlgo.version() >= 30202 : + dictHeader["oiio:SourcePath"] = IECore.StringData( str( filePath ) ) + dictHeader["oiio:SourceFileFormat"] = IECore.StringData( "openexr" ) + + r = IECore.Reader.create( str( filePath ) ) header = r.readHeader() self.assertEqual( header, IECore.CompoundObject(dictHeader) ) @@ -264,6 +276,11 @@ def testTimeCodeInHeader( self ) : self.assertEqual( header["smpte:TimeCode"], td ) img3 = r2.read() + if IECoreImage.OpenImageIOAlgo.version() >= 30202 : + del img.blindData()["oiio:SourcePath"] + del img2.blindData()["oiio:SourcePath"] + del img3.blindData()["oiio:SourcePath"] + self.assertTrue( "smpte:TimeCode" in img3.blindData() ) self.assertEqual( img3.blindData()["smpte:TimeCode"], td ) del img3.blindData()["Software"] diff --git a/test/IECoreImage/ImageWriterTest.py b/test/IECoreImage/ImageWriterTest.py index 9de316e043..c72185f041 100644 --- a/test/IECoreImage/ImageWriterTest.py +++ b/test/IECoreImage/ImageWriterTest.py @@ -415,11 +415,15 @@ def testBlindDataToHeader( self ) : imgNew = r.read() imgBlindData = imgNew.blindData() # eliminate default header info that comes from OIIO - del imgBlindData['oiio:ColorSpace'] + if IECoreImage.OpenImageIOAlgo.version() < 30104 : + del imgBlindData['oiio:ColorSpace'] if IECoreImage.OpenImageIOAlgo.version() >= 20206 : del imgBlindData['oiio:subimages'] if IECoreImage.OpenImageIOAlgo.version() >= 30000 : del imgBlindData["openexr:lineOrder"] + if IECoreImage.OpenImageIOAlgo.version() >= 30202 : + del imgBlindData["oiio:SourcePath"] + del imgBlindData["oiio:SourceFileFormat"] del imgBlindData['compression'] del imgBlindData['PixelAspectRatio'] del imgBlindData['displayWindow']