Skip to content

Commit 77a8277

Browse files
committed
ci: Fix Windows CI with special LLVM pre-build (#2011)
ci: Fix Windows CI Recap: GHA Windows runners recently upgraded their MSVS to a version whose std headers no longer get along with the LLVM 18 we had been using for CI (which we download from the LLVM project's hosted binary builds). But upgrading to LLVM 19 or 20 didn't help, because all of the LLVM-hosted binaries of those releases were built with the flags selecting the static runtime library, which is different from the dynamic choice that's a more common default and which we used for both our build of OSL and its other dependencies. You can't mix and match. (The reason for this switch is related to their changing to build by default using a certain malloc repacement library, which somehow leads to needing the static runtime.) To dig us out of this, Chris Kulla was kind enough to build us an LLVM 20.1 from source, using the old dynamic runtime choice, and host that as a zip file on a google drive. This PR makes use of that as the LLVM we us for our Windows CI jobs, and now we pass CI again. This doesn't seem like a sustainable long-term solution, because if the LLVM project is changing the default linkage, we don't want to need to maintain separate custom builds just for us, surely we can adapt by changing how compile flags on OSL and all of our dependencies. But at least this gets us unstuck for right now. Also as a reminder, our OSL Windows CI at the moment just does the build, not a testsuite run. We'll tackle that separately. Signed-off-by: Larry Gritz <[email protected]>
1 parent cac597f commit 77a8277

File tree

2 files changed

+13
-4
lines changed

2 files changed

+13
-4
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -608,10 +608,10 @@ jobs:
608608
openexr_ver: v3.3.2
609609
openimageio_ver: release
610610
skip_tests: 1
611-
setenvs: export LLVM_VERSION=18.1.8
612-
OSL_CMAKE_FLAGS="-DUSE_LLVM_BTCODE=ON"
611+
setenvs: export OSL_CMAKE_FLAGS="-DUSE_LLVM_BTCODE=ON"
613612
PUGIXML_VERSION=v1.14
614613
OpenImageIO_BUILD_MISSING_DEPS="Freetype;TIFF;libdeflate;libjpeg-turbo"
614+
LLVM_GOOGLE_DRIVE_ID="1uy7PNVlTQ-H56unXGOS6siRWtNcdS1J7"
615615
- desc: Windows-2025 VS2022
616616
runner: windows-2025
617617
nametag: windows-2025
@@ -621,10 +621,10 @@ jobs:
621621
openexr_ver: v3.3.2
622622
openimageio_ver: release
623623
skip_tests: 1
624-
setenvs: export LLVM_VERSION=18.1.8
625-
OSL_CMAKE_FLAGS="-DUSE_LLVM_BTCODE=ON"
624+
setenvs: export OSL_CMAKE_FLAGS="-DUSE_LLVM_BTCODE=ON"
626625
PUGIXML_VERSION=v1.14
627626
OpenImageIO_BUILD_MISSING_DEPS="Freetype;TIFF;libdeflate;libjpeg-turbo"
627+
LLVM_GOOGLE_DRIVE_ID="1uy7PNVlTQ-H56unXGOS6siRWtNcdS1J7"
628628

629629

630630
optix-gpu:

src/build-scripts/gh-win-installdeps.bash

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,15 @@ ls -R -l "$DEP_DIR"
122122

123123
if [[ "$LLVM_VERSION" != "" ]] ; then
124124
source src/build-scripts/build_llvm.bash
125+
elif [[ "$LLVM_GOOGLE_DRIVE_ID" != "" ]] then
126+
mkdir -p $HOME/llvm
127+
pushd $HOME/llvm
128+
#LLVM_GOOGLE_DRIVE_ID="1uy7PNVlTQ-H56unXGOS6siRWtNcdS1J7"
129+
LLVM_ZIP_FILENAME=llvm-build.zip
130+
time curl -L "https://drive.usercontent.google.com/download?id=${LLVM_GOOGLE_DRIVE_ID}&confirm=xxx" -o $LLVM_ZIP_FILENAME
131+
unzip $LLVM_ZIP_FILENAME > /dev/null
132+
export LLVM_ROOT=$PWD/llvm-build
133+
popd
125134
fi
126135
echo "LLVM_ROOT = $LLVM_ROOT"
127136

0 commit comments

Comments
 (0)