From d222f1b967dbd3a85089e4520af49aa1b5f86e37 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Sun, 19 May 2024 18:41:21 -0400 Subject: [PATCH 1/4] Check that build-cmake script is run from top-level dir Signed-off-by: Gary Oberbrunner --- scripts/build-cmake.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/scripts/build-cmake.sh b/scripts/build-cmake.sh index 8ae476d2..689b9047 100755 --- a/scripts/build-cmake.sh +++ b/scripts/build-cmake.sh @@ -78,6 +78,14 @@ else exit 1 fi +if [[ ! -f ./conanfile.py ]]; then + echo "***" + echo "*** ERROR: please run this script from the top level dir, where conanfile.py and readme.md are." + echo "***" + usage + exit 1 +fi + # Install dependencies, set up build dir, and generate build files. echo === Running conan to install dependencies [[ $USE_OPENCL ]] && conan_opts="$conan_opts -o use_opencl=True" From dd7508f75638e05f4e618701a884a0da911e0c8b Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Mon, 20 May 2024 09:07:31 -0400 Subject: [PATCH 2/4] build-cmake.sh: Check install folder exists before doing build Try to `mkdir` the install folder, and if that fails (which it sometimes will, due to parent dir permissions) print a useful error message. This should help new users. Signed-off-by: Gary Oberbrunner --- scripts/build-cmake.sh | 29 +++++++++++++++++++++++++++-- 1 file changed, 27 insertions(+), 2 deletions(-) diff --git a/scripts/build-cmake.sh b/scripts/build-cmake.sh index 689b9047..2ac1f58b 100755 --- a/scripts/build-cmake.sh +++ b/scripts/build-cmake.sh @@ -82,10 +82,35 @@ if [[ ! -f ./conanfile.py ]]; then echo "***" echo "*** ERROR: please run this script from the top level dir, where conanfile.py and readme.md are." echo "***" - usage exit 1 fi + +# Ensure standard plugin install folder exists and is writable, unless user is +# building with a custom plugin install dir. +if [[ ! $ARGS =~ .*PLUGIN_INSTALLDIR.* ]] ; then + if [[ -n $COMMONPROGRAMFILES && -d $COMMONPROGRAMFILES ]]; then + INSTALLDIR="$COMMONPROGRAMFILES/OFX/Plugins" + elif [[ $(uname) = Darwin ]]; then + INSTALLDIR="/Library/OFX/Plugins" + else + INSTALLDIR="/usr/OFX/Plugins" + fi + # Try to create the plugin dir; this may fail due to permissions. + # We need it to exist and to be writable. + mkdir -p "$INSTALLDIR" + if [[ $? -ne 0 || ! -w $INSTALLDIR ]]; then + echo "***" + echo "*** ERROR: This script will install the built example plugins in $INSTALLDIR," + echo "*** but that dir does not exist or isn't writable." + echo "*** Please run: sudo mkdir -p $INSTALLDIR && sudo chmod ugo+w $INSTALLDIR" + echo "*** or run this script with -DPLUGIN_INSTALL_DIR= to install elsewhere." + echo "***" + exit 1 + fi +fi + + # Install dependencies, set up build dir, and generate build files. echo === Running conan to install dependencies [[ $USE_OPENCL ]] && conan_opts="$conan_opts -o use_opencl=True" @@ -107,4 +132,4 @@ echo " Plugin support lib and examples are in ${CMAKE_BUILD_DIR}/Support/{Libra echo " Host lib is in ${CMAKE_BUILD_DIR}/HostSupport/${BUILDTYPE}" echo "=== To (re)install the sample plugins to your OFX plugins folder, become root if necessary, and then do:" echo " cmake --install ${CMAKE_BUILD_DIR}" -echo " (pass -DINSTALLDIR= to this script or cmake to install elsewhere than the standard OFX folder)" +echo " (pass -DPLUGIN_INSTALLDIR= to this script or cmake to install elsewhere than the standard OFX folder)" From ade3a200217966bb6baaddb634cb32d1069e4057 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Wed, 12 Jun 2024 09:02:30 -0400 Subject: [PATCH 3/4] Fix CI build * Remove pip caching in CI build setup-python; it fails on Rocky distros * Update CUDA to 12.4.1 on Windows to support recent VS2022 Signed-off-by: Gary Oberbrunner --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a5cefe05..42c221fb 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -175,7 +175,6 @@ jobs: if: matrix.ostype == 'mac' with: python-version: '3.11' - cache: 'pip' - name: Install Conan id: conan @@ -216,11 +215,12 @@ jobs: linux-local-args: '["--toolkit"]' - name: Install CUDA Toolkit - uses: Jimver/cuda-toolkit@v0.2.14 + uses: Jimver/cuda-toolkit@v0.2.15 id: cuda-toolkit-win if: matrix.ostype == 'windows' && matrix.cuda == true with: - cuda: '12.1.0' + # Need CUDA >= 12.4 to support recent VS2022 (17.10 and later, MSVC 19.40) + cuda: '12.4.1' method: 'network' sub-packages: '["nvcc", "cudart"]' # workaround for cuda-toolkit action bug https://github.com/Jimver/cuda-toolkit/issues/315 From 2c1f77c3d65dc80308764c55d3b47c0ca534ef04 Mon Sep 17 00:00:00 2001 From: Gary Oberbrunner Date: Fri, 12 Jul 2024 11:58:39 -0400 Subject: [PATCH 4/4] CI: Update to latest CUDA toolkit with action bug fix Signed-off-by: Gary Oberbrunner --- .github/workflows/build.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 42c221fb..49391955 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -215,7 +215,7 @@ jobs: linux-local-args: '["--toolkit"]' - name: Install CUDA Toolkit - uses: Jimver/cuda-toolkit@v0.2.15 + uses: Jimver/cuda-toolkit@v0.2.16 id: cuda-toolkit-win if: matrix.ostype == 'windows' && matrix.cuda == true with: @@ -223,9 +223,6 @@ jobs: cuda: '12.4.1' method: 'network' sub-packages: '["nvcc", "cudart"]' - # workaround for cuda-toolkit action bug https://github.com/Jimver/cuda-toolkit/issues/315 - use-github-cache: false - use-local-cache: false # - name: Install system dependencies (CentOS) # run: |