From 434db2d9a95c7d7d77f45c9c9b19f058b842dbee Mon Sep 17 00:00:00 2001 From: Larry Gritz Date: Wed, 14 Aug 2024 18:06:26 -0700 Subject: [PATCH] ci: unbreak CI for OIIO auto-build of OCIO for icx case Some explanation is needed: OIIO master recently added the ability to auto-build OCIO when a new enough one is not found at its build time, and bumped the minimum OCIO to 2.2. Sometimes this is triggered by OSL's CI, when OCIO < 2.2, so building OIIO also triggers building of OCIO. All fine, except for the case when we are testing Intel's icx compiler, which OCIO's build system does not recognize and fails to build. So we make a little modification here that lets us, just for that case, ensure that OCIO is pre-built with gcc even though we're building OIIO and OSL with icx. Signed-off-by: Larry Gritz --- .github/workflows/ci.yml | 1 + src/build-scripts/build_opencolorio.bash | 2 ++ 2 files changed, 3 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 297544ba3..e62701594 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -111,6 +111,7 @@ jobs: simd: avx2,f16c batched: b8_AVX2_noFMA setenvs: export OSL_CMAKE_FLAGS="-DSTOP_ON_WARNING=OFF" USE_OPENVDB=0 + OPENCOLORIO_VERSION=v2.3.2 OPENCOLORIO_CXX=g++ - desc: gcc11/C++17 llvm15 py3.10 exr3.1 oiio-rel avx2 nametag: linux-vfx2023 runner: ubuntu-latest diff --git a/src/build-scripts/build_opencolorio.bash b/src/build-scripts/build_opencolorio.bash index a02acf099..9b54965c4 100755 --- a/src/build-scripts/build_opencolorio.bash +++ b/src/build-scripts/build_opencolorio.bash @@ -19,6 +19,7 @@ OPENCOLORIO_SOURCE_DIR=${OPENCOLORIO_SOURCE_DIR:=${LOCAL_DEPS_DIR}/OpenColorIO} OPENCOLORIO_BUILD_DIR=${OPENCOLORIO_BUILD_DIR:=${LOCAL_DEPS_DIR}/OpenColorIO-build} OPENCOLORIO_INSTALL_DIR=${OPENCOLORIO_INSTALL_DIR:=${LOCAL_DEPS_DIR}/dist} OPENCOLORIO_BUILD_TYPE=${OPENCOLORIO_BUILD_TYPE:=Release} +OPENCOLORIO_CXX=${OPENCOLORIO_CXX:=g++} OPENCOLORIO_CXX_FLAGS=${OPENCOLORIO_CXX_FLAGS:="-Wno-unused-function -Wno-deprecated-declarations -Wno-cast-qual -Wno-write-strings"} # Just need libs: OPENCOLORIO_BUILDOPTS="-DOCIO_BUILD_APPS=OFF -DOCIO_BUILD_NUKE=OFF \ @@ -48,6 +49,7 @@ echo "Building OpenColorIO from commit" `git rev-parse --short HEAD` time cmake -S . -B ${OPENCOLORIO_BUILD_DIR} \ -DCMAKE_BUILD_TYPE=${OPENCOLORIO_BUILD_TYPE} \ -DCMAKE_INSTALL_PREFIX=${OPENCOLORIO_INSTALL_DIR} \ + -DCMAKE_CXX_COMPILER=${OPENCOLORIO_CXX} \ -DCMAKE_CXX_FLAGS="${OPENCOLORIO_CXX_FLAGS}" \ ${OPENCOLORIO_BUILDOPTS} time cmake --build ${OPENCOLORIO_BUILD_DIR} --config Release --target install