diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a5cefe05..49391955 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,16 +215,14 @@ jobs: linux-local-args: '["--toolkit"]' - name: Install CUDA Toolkit - uses: Jimver/cuda-toolkit@v0.2.14 + uses: Jimver/cuda-toolkit@v0.2.16 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 - use-github-cache: false - use-local-cache: false # - name: Install system dependencies (CentOS) # run: | diff --git a/scripts/build-cmake.sh b/scripts/build-cmake.sh index 8ae476d2..2ac1f58b 100755 --- a/scripts/build-cmake.sh +++ b/scripts/build-cmake.sh @@ -78,6 +78,39 @@ 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 "***" + 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" @@ -99,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)"