diff --git a/.codeql-prebuild-cpp-Linux.sh b/.codeql-prebuild-cpp-Linux.sh index d00c671ec2c..1bfcd2739b4 100644 --- a/.codeql-prebuild-cpp-Linux.sh +++ b/.codeql-prebuild-cpp-Linux.sh @@ -1,7 +1,23 @@ # install dependencies for C++ analysis set -e +CUDA_VERSION=11.8.0 +CUDA_BUILD=520.61.05 + +# install wget and cuda first sudo apt-get update -y +sudo apt-get install -y \ + wget + +# Install CUDA +url_base="https://developer.download.nvidia.com/compute/cuda/${CUDA_VERSION}/local_installers" +url="${url_base}/cuda_${CUDA_VERSION}_${CUDA_BUILD}_linux.run" +sudo wget -q -O /root/cuda.run ${url} +sudo chmod a+x /root/cuda.run +sudo /root/cuda.run --silent --toolkit --toolkitpath=/usr/local/cuda --no-opengl-libs --no-man-page --no-drm +sudo rm /root/cuda.run + +# Install dependencies sudo apt-get install -y \ build-essential \ gcc-10 \ @@ -32,8 +48,7 @@ sudo apt-get install -y \ libxcb1-dev \ libxfixes-dev \ libxrandr-dev \ - libxtst-dev \ - wget + libxtst-dev # clean apt cache sudo apt-get clean @@ -48,19 +63,17 @@ sudo update-alternatives --install \ --slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-10 \ --slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-10 -# Install CUDA -sudo wget \ - https://developer.download.nvidia.com/compute/cuda/11.8.0/local_installers/cuda_11.8.0_520.61.05_linux.run \ - --progress=bar:force:noscroll -q --show-progress -O /root/cuda.run -sudo chmod a+x /root/cuda.run -sudo /root/cuda.run --silent --toolkit --toolkitpath=/usr --no-opengl-libs --no-man-page --no-drm -sudo rm /root/cuda.run - # build mkdir -p build cd build || exit 1 -cmake -G "Unix Makefiles" .. +cmake \ + -G "Unix Makefiles" \ + -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc \ + .. make -j"$(nproc)" +# Delete CUDA +sudo rm -rf /usr/local/cuda + # skip autobuild echo "skip_autobuild=true" >> "$GITHUB_OUTPUT" diff --git a/.codeql-prebuild-cpp-macOS.sh b/.codeql-prebuild-cpp-macOS.sh index 4e74c8599e5..c6a374ef5a9 100644 --- a/.codeql-prebuild-cpp-macOS.sh +++ b/.codeql-prebuild-cpp-macOS.sh @@ -1,8 +1,24 @@ # install dependencies for C++ analysis set -e +# The following error occurs without arch -arm64 on macOS-14 runner: +# Error: Cannot install under Rosetta 2 in ARM default prefix (/opt/homebrew)! +# To rerun under ARM use: +# arch -arm64 brew install ... + +# detect if this is arm64 +#echo "uname -m: $(uname -m)" +#echo "arch: $(arch)" +#echo "uname -p: $(uname -p)" +#echo "uname -a: $(uname -a)" +#if [[ "$(uname -m)" == "arm64" ]]; then +# brew_cmd="arch -arm64 brew" +#else +# brew_cmd="brew" +#fi + # install dependencies -brew install \ +arch -arm64 brew install \ boost \ cmake \ miniupnpc \ diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index cfac7b05118..3012871adb0 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -456,7 +456,7 @@ jobs: # permissions chmod +x ../artifacts/sunshine.AppImage - - name: Delete cuda + - name: Delete CUDA # free up space on the runner run: | sudo rm -rf /usr/local/cuda diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index ff12034f0c6..a5ce9310412 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -127,7 +127,7 @@ jobs: remove-dotnet: ${{ (matrix.language == 'csharp' && 'false') || 'true' }} remove-android: 'true' remove-haskell: 'true' - remove-codeql: 'false' + remove-codeql: 'true' remove-docker-images: 'true' - name: Checkout repository