From 3aeebb61e69a82f6ebfaaa73b14ba59c4fb6dc3c Mon Sep 17 00:00:00 2001 From: Murray Stevenson <50844517+murraystevenson@users.noreply.github.com> Date: Wed, 20 Aug 2025 14:55:09 -0700 Subject: [PATCH 1/6] CI : Remove `macos-arm64` job We'll be able to reinstate it at some point in the future when macOS builds of dependencies-10.x.x are available. --- .github/workflows/main.yml | 12 +----------- 1 file changed, 1 insertion(+), 11 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d188f3ec2d..d045e86248 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -33,8 +33,7 @@ jobs: linux-gcc11, linux-debug-gcc11, windows, - windows-debug, - macos-arm64 + windows-debug ] include: @@ -77,15 +76,6 @@ jobs: publish: false jobs: 4 - - name: macos-arm64 - os: macos-14 - buildType: RELEASE - options: .github/workflows/main/options.posix - dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/9.1.0/gafferDependencies-9.1.0-macos-arm64.tar.gz - tests: testCore testCorePython testScene testImage testAlembic testUSD testVDB - publish: true - jobs: 3 - runs-on: ${{ matrix.os }} container: ${{ matrix.containerImage }} From 645edd61c53b30d09d7be74de40b231f029206b8 Mon Sep 17 00:00:00 2001 From: Murray Stevenson <50844517+murraystevenson@users.noreply.github.com> Date: Wed, 20 Aug 2025 14:56:32 -0700 Subject: [PATCH 2/6] CI : Update to Windows SDK 10.0.20348.0 We take the same approach as gafferhq/gaffer to install the required SDK version as it's no longer provided by the runner. --- .github/workflows/main.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d045e86248..8ac284c2a1 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -84,9 +84,16 @@ jobs: - uses: actions/checkout@v4 + - 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@v1.13.0 with: - sdk: 10.0.17763.0 + sdk: 10.0.20348.0 - name: Install toolchain (Windows) run: | From 9c5b381725dfb88fcfe50ad30c4f74988c15cc9e Mon Sep 17 00:00:00 2001 From: Murray Stevenson <50844517+murraystevenson@users.noreply.github.com> Date: Wed, 20 Aug 2025 14:56:55 -0700 Subject: [PATCH 3/6] CI : Update to GafferHQ/dependencies 10.0.0 --- .github/workflows/main.yml | 8 ++++---- .github/workflows/main/options.posix | 2 +- Changes | 5 +++++ 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 8ac284c2a1..4df321c487 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -43,7 +43,7 @@ jobs: buildType: RELEASE containerImage: ghcr.io/gafferhq/build/build:3.0.0 options: .github/workflows/main/options.posix - dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/9.1.0/gafferDependencies-9.1.0-linux-gcc11.tar.gz + dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/10.0.0/gafferDependencies-10.0.0-linux-gcc11.tar.gz tests: testCore testCorePython testScene testImage testAlembic testUSD testVDB publish: true jobs: 4 @@ -53,7 +53,7 @@ jobs: buildType: DEBUG containerImage: ghcr.io/gafferhq/build/build:3.0.0 options: .github/workflows/main/options.posix - dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/9.1.0/gafferDependencies-9.1.0-linux-gcc11.tar.gz + dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/10.0.0/gafferDependencies-10.0.0-linux-gcc11.tar.gz tests: testCore testCorePython testScene testImage testAlembic testUSD testVDB publish: false jobs: 4 @@ -62,7 +62,7 @@ jobs: os: windows-2022 buildType: RELEASE options: .github/workflows/main/options.windows - dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/9.1.0/gafferDependencies-9.1.0-windows.zip + dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/10.0.0/gafferDependencies-10.0.0-windows.zip tests: testCore testCorePython testScene testImage testAlembic testUSD testVDB publish: true jobs: 4 @@ -71,7 +71,7 @@ jobs: os: windows-2022 buildType: RELWITHDEBINFO options: .github/workflows/main/options.windows - dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/9.1.0/gafferDependencies-9.1.0-windows.zip + dependenciesURL: https://github.com/GafferHQ/dependencies/releases/download/10.0.0/gafferDependencies-10.0.0-windows.zip tests: testCore testCorePython testScene testImage testAlembic testUSD testVDB publish: false jobs: 4 diff --git a/.github/workflows/main/options.posix b/.github/workflows/main/options.posix index 09324aadf4..6eaca8cd17 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.10" +pythonABIVersion = "3.11" PYTHON_LINK_FLAGS = "-lpython" + pythonABIVersion diff --git a/Changes b/Changes index 8f52ae0c78..fc661639dd 100644 --- a/Changes +++ b/Changes @@ -6,6 +6,11 @@ Fixes - USDScene : Worked around numerical imprecision when converting between time and UsdTimeCode. +Build +----- + +- CI : Updated to GafferHQ/dependencies 10.0.0. + 10.6.0.0 (relative to 10.5.15.2) ======== From ae1ddbc147de34ee28783ca3b5fc9818fdf8637a Mon Sep 17 00:00:00 2001 From: Murray Stevenson <50844517+murraystevenson@users.noreply.github.com> Date: Wed, 20 Aug 2025 15:00:06 -0700 Subject: [PATCH 4/6] CI : Pin action versions to a specific commit SHA As recommended by : https://docs.github.com/en/actions/security-for-github-actions/security-guides/security-hardening-for-github-actions#using-third-party-actions --- .github/workflows/main.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 4df321c487..83b2028ab3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -82,7 +82,7 @@ jobs: steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 - name: Install Windows SDK run: | @@ -91,7 +91,7 @@ jobs: shell: pwsh if: runner.os == 'Windows' - - uses: ilammy/msvc-dev-cmd@v1.13.0 + - uses: ilammy/msvc-dev-cmd@0b201ec74fa43914dc39ae48a89fd1d8cb592756 # v1.13.0 with: sdk: 10.0.20348.0 @@ -148,7 +148,7 @@ jobs: shell: bash - name: Cache - uses: actions/cache@v4 + uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3 with: path: sconsCache key: ${{ runner.os }}-${{ matrix.containerImage }}-${{env.CORTEX_DEPENDENCIES_HASH}}-${{ matrix.buildType }}-${{ github.sha }} @@ -174,7 +174,7 @@ jobs: ${{ env.PACKAGE_COMMAND }} ${{ env.CORTEX_BUILD_NAME }}.${{env.PACKAGE_EXTENSION}} ${{ env.CORTEX_BUILD_NAME }} if: matrix.publish - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2 with: name: ${{ env.CORTEX_BUILD_NAME }} path: ${{ env.CORTEX_BUILD_NAME }}.${{ env.PACKAGE_EXTENSION }} From aff406b26b0ffbb8bdcd85b38155019e5b9e7afc Mon Sep 17 00:00:00 2001 From: Murray Stevenson <50844517+murraystevenson@users.noreply.github.com> Date: Thu, 21 Aug 2025 13:19:46 -0700 Subject: [PATCH 5/6] ShaderNetworkAlgo : Fix missing include --- src/IECoreScene/ShaderNetworkAlgo.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/IECoreScene/ShaderNetworkAlgo.cpp b/src/IECoreScene/ShaderNetworkAlgo.cpp index 51230dc994..3676ba3635 100644 --- a/src/IECoreScene/ShaderNetworkAlgo.cpp +++ b/src/IECoreScene/ShaderNetworkAlgo.cpp @@ -49,6 +49,7 @@ #include "boost/container/flat_map.hpp" #include "boost/regex.hpp" +#include #include #include From 304f1dad2c6e448cdf845a4c5745c57fdfb51567 Mon Sep 17 00:00:00 2001 From: Murray Stevenson <50844517+murraystevenson@users.noreply.github.com> Date: Thu, 21 Aug 2025 15:21:31 -0700 Subject: [PATCH 6/6] SConstruct : Fix linking with USD 25.05 In this version, the Python bindings use Pixar's fork of Boost Python unconditionally, so we need to link to that instead. --- SConstruct | 43 +++++++++++++++++++++++++++---------------- 1 file changed, 27 insertions(+), 16 deletions(-) diff --git a/SConstruct b/SConstruct index a28df94e59..cfec440566 100644 --- a/SConstruct +++ b/SConstruct @@ -1167,28 +1167,28 @@ def pythonVersion( pythonEnv ) : universal_newlines = True ).strip() -pythonEnv = env.Clone() +basePythonEnv = env.Clone() # decide where python is -if pythonEnv["PYTHON"]=="" : +if basePythonEnv["PYTHON"]=="" : if env["PLATFORM"] == "win32" : sys.stderr.write( "ERROR : Python executable path must be set with PYTHON option.\n" ) Exit( 1 ) else: - pythonEnv["PYTHON"] = getPythonConfig( pythonEnv, "--exec-prefix" ) + "/bin/python" + basePythonEnv["PYTHON"] = getPythonConfig( basePythonEnv, "--exec-prefix" ) + "/bin/python" # run it to determine version -pythonEnv["PYTHON_VERSION"] = pythonVersion( pythonEnv ) +basePythonEnv["PYTHON_VERSION"] = pythonVersion( basePythonEnv ) # get the include path for python if we haven't been told it explicitly # Windows does not have python-config so rely the user setting the appropriate options if env["PLATFORM"] != "win32" : - if pythonEnv["PYTHON_INCLUDE_PATH"]=="" : - pythonEnv["PYTHON_INCLUDE_FLAGS"] = getPythonConfig( pythonEnv, "--includes" ).split() + if basePythonEnv["PYTHON_INCLUDE_PATH"]=="" : + basePythonEnv["PYTHON_INCLUDE_FLAGS"] = getPythonConfig( basePythonEnv, "--includes" ).split() else : - pythonEnv["PYTHON_INCLUDE_FLAGS"] = [ systemIncludeArgument, "$PYTHON_INCLUDE_PATH" ] + basePythonEnv["PYTHON_INCLUDE_FLAGS"] = [ systemIncludeArgument, "$PYTHON_INCLUDE_PATH" ] - pythonEnv.Append( CXXFLAGS = "$PYTHON_INCLUDE_FLAGS" ) + basePythonEnv.Append( CXXFLAGS = "$PYTHON_INCLUDE_FLAGS" ) if env["PLATFORM"] == "posix" : ## We really want to not have the -Wno-strict-aliasing flag, but it's necessary to stop boost @@ -1196,17 +1196,18 @@ if env["PLATFORM"] != "win32" : # be able to have -Werror but be missing one warning than to have no -Werror. ## \todo This is probably only necessary for specific gcc versions where -isystem doesn't # fully work. Reenable when we encounter versions that work correctly. - pythonEnv.Append( CXXFLAGS = [ "-Wno-strict-aliasing" ] ) + basePythonEnv.Append( CXXFLAGS = [ "-Wno-strict-aliasing" ] ) # get the python link flags - if pythonEnv["PYTHON_LINK_FLAGS"]=="" : - pythonEnv["PYTHON_LINK_FLAGS"] = getPythonConfig( pythonEnv, "--ldflags" ) - pythonEnv["PYTHON_LINK_FLAGS"] = pythonEnv["PYTHON_LINK_FLAGS"].replace( "Python.framework/Versions/" + pythonEnv["PYTHON_VERSION"] + "/Python", "" ) + if basePythonEnv["PYTHON_LINK_FLAGS"]=="" : + basePythonEnv["PYTHON_LINK_FLAGS"] = getPythonConfig( basePythonEnv, "--ldflags" ) + basePythonEnv["PYTHON_LINK_FLAGS"] = basePythonEnv["PYTHON_LINK_FLAGS"].replace( "Python.framework/Versions/" + basePythonEnv["PYTHON_VERSION"] + "/Python", "" ) - pythonEnv.Append( SHLINKFLAGS = pythonEnv["PYTHON_LINK_FLAGS"].split() ) + basePythonEnv.Append( SHLINKFLAGS = basePythonEnv["PYTHON_LINK_FLAGS"].split() ) else : - pythonEnv["PYTHON_INCLUDE_FLAGS"] = "" + basePythonEnv["PYTHON_INCLUDE_FLAGS"] = "" +pythonEnv = basePythonEnv.Clone() pythonEnv.Append( CPPFLAGS = "-DBOOST_PYTHON_MAX_ARITY=20" ) # if BOOST_PYTHON_LIB_SUFFIX is provided, use it @@ -2066,9 +2067,9 @@ usdEnvSets = { "IECORE_NAME" : "IECoreUSD" } -# We are deliberately cloning from `pythonEnv` rather than +# We are deliberately cloning from `basePythonEnv` rather than # `env` because USD itself has dependencies on Python. -usdEnv = pythonEnv.Clone( **usdEnvSets ) +usdEnv = basePythonEnv.Clone( **usdEnvSets ) if usdEnv["WITH_USD_MONOLITHIC"] : usdLibs = [ "usd_ms" ] @@ -2097,10 +2098,20 @@ else : if usdEnv["USD_LIB_PREFIX"] : usdLibs = [ usdEnv["USD_LIB_PREFIX"] + x for x in usdLibs ] +usdPythonLib = env.subst( "boost_python$BOOST_PYTHON_LIB_SUFFIX" ) +pxrVersionHeader = env.FindFile( "pxr/pxr.h", dependencyIncludes ) +if pxrVersionHeader is not None and "#define PXR_USE_INTERNAL_BOOST_PYTHON\n" in open( str( pxrVersionHeader ) ) : + usdPythonLib = usdEnv["USD_LIB_PREFIX"] + "python" + +usdLibs.append( usdPythonLib ) + usdEnvAppends = { "CXXFLAGS" : [ "-Wno-deprecated" if env["PLATFORM"] != "win32" else "", "/Zc:inline-" if env["PLATFORM"] == "win32" else "", + # This warning is already disabled generally for release builds, + # but also requires disabling for debug builds with USD. + "/wd4702" if env["PLATFORM"] == "win32" else "", "-DIECoreUSD_EXPORTS", systemIncludeArgument, "$USD_INCLUDE_PATH", systemIncludeArgument, "$PYTHON_INCLUDE_PATH",