diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d5ad0f9d2..0c4a80bf3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -524,20 +524,22 @@ jobs: cc_compiler: /usr/local/opt/llvm/bin/clang cxx_compiler: /usr/local/opt/llvm/bin/clang++ cxx_std: 17 - openimageio_ver: release + # openimageio_ver: release python_ver: "3.11" aclang: 14 setenvs: export DO_BREW_UPDATE=1 CTEST_TEST_TIMEOUT=120 + EXTRA_BREW_PACKAGES="openimageio" - desc: MacOS-14-ARM llvm17 runner: macos-14 nametag: macos14-arm-p311 cc_compiler: clang cxx_compiler: clang++ cxx_std: 17 - openimageio_ver: main + # openimageio_ver: main python_ver: "3.11" aclang: 15 setenvs: export DO_BREW_UPDATE=1 + EXTRA_BREW_PACKAGES="openimageio" - desc: MacOS-15-ARM aclang16/C++20/py3.13 runner: macos-15 nametag: macos15-arm-py313 @@ -545,6 +547,7 @@ jobs: cxx_compiler: clang++ cxx_std: 20 python_ver: "3.13" + openimageio_ver: main windows: diff --git a/src/build-scripts/gh-win-installdeps.bash b/src/build-scripts/gh-win-installdeps.bash index 9b44a2f72..871f4dc20 100755 --- a/src/build-scripts/gh-win-installdeps.bash +++ b/src/build-scripts/gh-win-installdeps.bash @@ -117,16 +117,29 @@ cp $DEP_DIR/lib/*.lib $DEP_DIR/bin cp $DEP_DIR/bin/*.dll $DEP_DIR/lib -#OPENIMAGEIO_BRANCH=lg-cmake312 -OPENIMAGEIO_INSTALLDIR=$DEP_DIR -OPENIMAGEIO_CMAKE_FLAGS+=" -DOIIO_BUILD_TESTS=0 -DOIIO_BUILD_TOOLS=0" -OPENIMAGEIO_CMAKE_FLAGS+=" -DUSE_OPENGL=0 -DUSE_GENERATED_EXPORT_HEADER=1" -OPENIMAGEIO_CMAKE_FLAGS+=" -DENABLE_DPX=0 -DENABLE_CINEON=0 -DENABLE_DDS=0" -OPENIMAGEIO_CMAKE_FLAGS+=" -DENABLE_IFF=0 -DENABLE_ICO=0 -DENABLE_PSD=0" -OPENIMAGEIO_CMAKE_FLAGS+=" -DENABLE_PNM=0 -DENABLE_ZFILE=0 -DENABLE_SOFTIMAGE=0" -OPENIMAGEIO_CMAKE_FLAGS+=" -DLINKSTATIC=1 -DBUILD_SHARED_LIBS=0" -export OPENIMAGEIO_CMAKE_FLAGS -source src/build-scripts/build_openimageio.bash +if [[ "$OPENIMAGEIO_VERSION" != "" ]] ; then + # There are many parts of OIIO we don't need to build for OSL's tests + export ENABLE_iinfo=0 ENABLE_iv=0 ENABLE_igrep=0 + export ENABLE_iconvert=0 ENABLE_testtex=0 + # For speed of compiling OIIO, disable the file formats that we don't + # need for OSL's tests + export ENABLE_BMP=0 ENABLE_cineon=0 ENABLE_DDS=0 ENABLE_DPX=0 ENABLE_FITS=0 + export ENABLE_ICO=0 ENABLE_iff=0 ENABLE_jpeg2000=0 ENABLE_PNM=0 ENABLE_PSD=0 + export ENABLE_RLA=0 ENABLE_SGI=0 ENABLE_SOCKET=0 ENABLE_SOFTIMAGE=0 + export ENABLE_TARGA=0 ENABLE_WEBP=0 ENABLE_jpegxl=0 ENABLE_libuhdr=0 + # We don't need to run OIIO's tests + export OPENIMAGEIO_CMAKE_FLAGS+=" -DOIIO_BUILD_TESTING=OFF -DOIIO_BUILD_TESTS=0" + # Don't let warnings in OIIO break OSL's CI run + export OPENIMAGEIO_CMAKE_FLAGS+=" -DSTOP_ON_WARNING=OFF" + export OPENIMAGEIO_CMAKE_FLAGS+=" -DUSE_OPENGL=0" + export OPENIMAGEIO_CMAKE_FLAGS+=" -DUSE_OPENCV=0 -DUSE_FFMPEG=0 -DUSE_QT=0" + if [[ "${OPENIMAGEIO_UNITY:-1}" != "0" ]] ; then + # Speed up the OIIO build by doing a "unity" build. (Note: this is + # only a savings in CI where there are only 1-2 cores available.) + export OPENIMAGEIO_CMAKE_FLAGS+=" -DCMAKE_UNITY_BUILD=ON -DCMAKE_UNITY_BUILD_MODE=BATCH" + fi + source src/build-scripts/build_openimageio.bash +fi cp $DEP_DIR/lib/*.lib $DEP_DIR/bin diff --git a/src/build-scripts/install_homebrew_deps.bash b/src/build-scripts/install_homebrew_deps.bash index 46b8f94b8..434219eae 100755 --- a/src/build-scripts/install_homebrew_deps.bash +++ b/src/build-scripts/install_homebrew_deps.bash @@ -48,6 +48,9 @@ brew install --display-times -q llvm${LLVMBREWVER} if [[ "${USE_QT}" != "0" ]] ; then brew install --display-times -q qt${QT_VERSION} fi +if [[ "${EXTRA_BREW_PACKAGES}" != "" ]] ; then + brew install --display-times -q ${EXTRA_BREW_PACKAGES} +fi echo "" echo "After brew installs:"