Skip to content

Commit 49b0fa5

Browse files
committed
Fix CI build problems: conan_version, expat, compiler
- Bump expat to 2.7.1 because old version doesn't build on MacOS anymore - Bump conan version to 2.20.1 to support latest dependencies (e.g. expat), except where it doesn't work, e.g. CentOS 7. This also fixes the MacOS build which is now up to compiler version 17, and the old conan would reject that. - Add support for `uvx conan` for python uv users Also note: I had to remove the very old `import` and `IMPORT` git tags recently because they cause trouble with git on Windows (case-insensitive filesystem I think). Not included in this commit, but needed to fix the CI build. Signed-off-by: Gary Oberbrunner <[email protected]>
1 parent 96ccd1a commit 49b0fa5

File tree

3 files changed

+23
-11
lines changed

3 files changed

+23
-11
lines changed

.github/workflows/build.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,8 @@ jobs:
4141
need_node20_vol: true
4242
has_cmake_presets: false
4343
buildtype: Release
44-
conan_version: 2.1.0
44+
# use old conan version for CentOS 7
45+
conan_version: 2.10.3
4546
cxx-standard: 17
4647
cxx-compiler: clang++
4748
cc-compiler: clang
@@ -58,7 +59,8 @@ jobs:
5859
need_node20_vol: true
5960
has_cmake_presets: false
6061
buildtype: Release
61-
conan_version: 2.1.0
62+
# use old conan version for CentOS 7
63+
conan_version: 2.10.3
6264
cxx-standard: 17
6365
cxx-compiler: clang++
6466
cc-compiler: clang
@@ -74,7 +76,7 @@ jobs:
7476
vfx-cy: 2023
7577
has_cmake_presets: false
7678
buildtype: Release
77-
conan_version: 2.1.0
79+
conan_version: 2.20.1
7880
cxx-standard: 17
7981
cxx-compiler: clang++
8082
cc-compiler: clang
@@ -90,7 +92,7 @@ jobs:
9092
vfx-cy: 2023
9193
has_cmake_presets: false
9294
buildtype: Release
93-
conan_version: 2.1.0
95+
conan_version: 2.20.1
9496
cxx-standard: 17
9597
cxx-compiler: clang++
9698
cc-compiler: clang
@@ -103,7 +105,7 @@ jobs:
103105
os: ubuntu-latest
104106
has_cmake_presets: true
105107
buildtype: Release
106-
conan_version: 2.1.0
108+
conan_version: 2.20.1
107109
cxx-standard: 17
108110
cxx-compiler: clang++
109111
cc-compiler: clang
@@ -116,7 +118,7 @@ jobs:
116118
os: macos-latest
117119
has_cmake_presets: true
118120
buildtype: Release
119-
conan_version: 2.1.0
121+
conan_version: 2.20.1
120122
cxx-standard: 17
121123
cxx-compiler: clang++
122124
cc-compiler: clang
@@ -129,7 +131,7 @@ jobs:
129131
os: windows-latest
130132
has_cmake_presets: true
131133
buildtype: Release
132-
conan_version: 2.1.0
134+
conan_version: 2.20.1
133135
cxx-standard: 17
134136
cxx-compiler: clang++
135137
cc-compiler: clang
@@ -142,7 +144,7 @@ jobs:
142144
os: windows-latest
143145
has_cmake_presets: true
144146
buildtype: Release
145-
conan_version: 2.0.16
147+
conan_version: 2.20.1
146148
cxx-standard: 17
147149
cxx-compiler: clang++
148150
cc-compiler: clang

conanfile.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ def requirements(self):
3939
self.requires("opencl-icd-loader/2023.12.14")
4040
self.requires("opencl-headers/2023.12.14")
4141
self.requires("opengl/system") # for OpenGL examples
42-
self.requires("expat/2.4.8") # for HostSupport
42+
self.requires("expat/2.7.1") # for HostSupport
4343
self.requires("cimg/3.3.2") # to draw text into images
4444
self.requires("spdlog/1.13.0") # for logging
4545

scripts/build-cmake.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,17 @@ ARGS="$@"
5555

5656
echo "Building OpenFX $BUILDTYPE in build/ with ${GENERATOR:-conan platform default generator}, $ARGS"
5757

58-
CONAN_VERSION=$(conan -v | sed -e 's/Conan version //g')
58+
# Set CONAN command based on availability
59+
if command -v conan >/dev/null 2>&1; then
60+
CONAN="conan"
61+
elif command -v uvx >/dev/null 2>&1; then
62+
CONAN="uvx conan"
63+
else
64+
echo "Error: Neither 'conan' nor 'uvx' found. Please install Conan or uv." >&2
65+
exit 1
66+
fi
67+
68+
CONAN_VERSION=$($CONAN -v | sed -e 's/Conan version //g')
5969
CONAN_MAJOR_VERSION=${CONAN_VERSION:0:1}
6070

6171
PRESET_NAME=
@@ -115,7 +125,7 @@ fi
115125
# Install dependencies, set up build dir, and generate build files.
116126
echo === Running conan to install dependencies
117127
[[ $USE_OPENCL ]] && conan_opts="$conan_opts -o use_opencl=True"
118-
conan install ${GENERATOR_OPTION} -s build_type=$BUILDTYPE -pr:b=default --build=missing . $conan_opts
128+
$CONAN install ${GENERATOR_OPTION} -s build_type=$BUILDTYPE -pr:b=default --build=missing . $conan_opts
119129

120130
echo === Running cmake
121131
# Generate the build files

0 commit comments

Comments
 (0)