Skip to content

Commit 3dd1d94

Browse files
authored
ci: Fix and speed up Mac CI dependency installations via homebrew (#2091)
* Refactor install_homebrew_deps to match recent changes in the version that's part of OIIO. * Exclude building Qt and OpenVDB from the Intel Mac CI variant -- they seem to be hit or miss these days whether it is pre-built, and if not, makes our CI on that variant take forever. We don't need it, we test those packages on other platforms, including newer Macs. * Bump llvm to 18 for the troublesome Intel case. * Need to make sure OSL sets the OpenImageIO_CI variable also, so that OIIO, when building, knows it's a CI run. Signed-off-by: Larry Gritz <lg@larrygritz.com>
1 parent 603b03b commit 3dd1d94

File tree

3 files changed

+34
-29
lines changed

3 files changed

+34
-29
lines changed

.github/workflows/ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -525,7 +525,7 @@ jobs:
525525
fail-fast: false
526526
matrix:
527527
include:
528-
- desc: MacOS-15-Intel aclang17/C++17/py3.13 llvm17 oiio-release
528+
- desc: MacOS-15-Intel aclang17/C++17/py3.13 llvm18 oiio-release
529529
runner: macos-15-intel
530530
nametag: macos15
531531
cc_compiler: clang
@@ -535,8 +535,8 @@ jobs:
535535
python_ver: "3.13"
536536
ctest_test_timeout: 120
537537
setenvs: export HOMEBREW_PREFIX=/usr/local
538-
LLVMBREWVER="@17"
539-
USE_OPENVDB=0
538+
LLVMBREWVER="@18"
539+
INSTALL_OPENVDB=0 INSTALL_QT=0
540540
- desc: MacOS-14-ARM llvm19 oiio-release
541541
runner: macos-14
542542
nametag: macos14-arm

src/build-scripts/ci-startup.bash

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ export PYTHON_VERSION=${PYTHON_VERSION:="3.7"}
3838
export PYTHONPATH=$DISTDIR/lib/python${PYTHON_VERSION}/site-packages:$PYTHONPATH
3939
cmake --version
4040
export OSL_CI=true
41+
export OpenImageIO_CI=true
4142
export USE_NINJA=${USE_NINJA:=1}
4243
export CMAKE_GENERATOR=${CMAKE_GENERATOR:=Ninja}
4344
export CMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE:=Release}

src/build-scripts/install_homebrew_deps.bash

Lines changed: 30 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -28,33 +28,37 @@ echo ""
2828
echo "Before my brew installs:"
2929
brew list --versions
3030

31-
if [[ "${BREW_UNLINK_PACKAGES}" != "" ]] ; then
32-
brew unlink ${BREW_UNLINK_PACKAGES} || true
33-
fi
34-
35-
36-
if [[ "${DO_BREW_CMAKE_INSTALL:=1}" != "0" ]] ; then
37-
brew install --display-times -q cmake || true
38-
fi
39-
brew install --display-times -q gcc ccache ninja || true
40-
brew link --overwrite gcc
41-
brew install --display-times -q python@${PYTHON_VERSION} || true
42-
brew link --overwrite --force python@${PYTHON_VERSION} || true
43-
brew install --display-times -q imath openexr opencolorio || true
44-
#brew install --display-times -q freetype
45-
brew install --display-times -q partio pugixml || true
46-
brew install --display-times -q pybind11 numpy || true
47-
brew install --display-times -q tbb || true
48-
brew install --display-times -q openvdb || true
49-
brew install --display-times -q flex bison
50-
brew install --display-times -q fmt
51-
brew install --display-times -q llvm${LLVMBREWVER}
52-
if [[ "${USE_QT}" != "0" ]] ; then
53-
brew install --display-times -q qt${QT_VERSION}
54-
fi
55-
if [[ "${EXTRA_BREW_PACKAGES}" != "" ]] ; then
56-
brew install --display-times -q ${EXTRA_BREW_PACKAGES}
31+
if [[ "$OSL_BREW_INSTALL_PACKAGES" == "" ]] ; then
32+
OSL_BREW_INSTALL_PACKAGES=" \
33+
bison \
34+
ccache \
35+
expat \
36+
flex \
37+
fmt \
38+
imath \
39+
llvm${LLVMBREWVER} \
40+
ninja \
41+
numpy \
42+
opencolorio \
43+
openexr \
44+
partio \
45+
ptex \
46+
pugixml \
47+
pybind11 \
48+
robin-map \
49+
tbb \
50+
"
51+
if [[ "${USE_OPENVDB:=1}" != "0" ]] && [[ "${INSTALL_OPENVDB:=1}" != "0" ]] ; then
52+
OSL_BREW_INSTALL_PACKAGES+=" openvdb"
53+
fi
54+
if [[ "${USE_QT:=1}" != "0" ]] && [[ "${INSTALL_QT:=1}" != "0" ]] ; then
55+
OSL_BREW_INSTALL_PACKAGES+=" qt${QT_VERSION}"
56+
fi
57+
if [[ "${EXTRA_BREW_PACKAGES}" != "" ]] ; then
58+
brew install --display-times -q ${EXTRA_BREW_PACKAGES}
59+
fi
5760
fi
61+
brew install --display-times -q $OSL_BREW_INSTALL_PACKAGES $OSL_BREW_EXTRA_INSTALL_PACKAGES || true
5862

5963
echo ""
6064
echo "After brew installs:"

0 commit comments

Comments
 (0)