2023-08-12 19:53:45 +00:00
|
|
|
# install dependencies for C++ analysis
|
2024-04-17 03:00:10 +00:00
|
|
|
set -e
|
2023-08-12 19:53:45 +00:00
|
|
|
|
2024-05-14 23:20:37 +00:00
|
|
|
CUDA_VERSION=11.8.0
|
|
|
|
CUDA_BUILD=520.61.05
|
|
|
|
|
|
|
|
# install wget and cuda first
|
2023-08-12 19:53:45 +00:00
|
|
|
sudo apt-get update -y
|
2024-05-14 23:20:37 +00:00
|
|
|
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
|
2023-08-12 19:53:45 +00:00
|
|
|
sudo apt-get install -y \
|
|
|
|
build-essential \
|
|
|
|
gcc-10 \
|
|
|
|
g++-10 \
|
2023-09-18 22:14:53 +00:00
|
|
|
libayatana-appindicator3-dev \
|
2023-08-12 19:53:45 +00:00
|
|
|
libavdevice-dev \
|
|
|
|
libcap-dev \
|
|
|
|
libcurl4-openssl-dev \
|
|
|
|
libdrm-dev \
|
|
|
|
libevdev-dev \
|
2024-01-01 23:48:27 +00:00
|
|
|
libminiupnpc-dev \
|
2023-08-12 19:53:45 +00:00
|
|
|
libmfx-dev \
|
2023-09-18 22:14:53 +00:00
|
|
|
libnotify-dev \
|
2023-08-12 19:53:45 +00:00
|
|
|
libnuma-dev \
|
|
|
|
libopus-dev \
|
|
|
|
libpulse-dev \
|
|
|
|
libssl-dev \
|
|
|
|
libva-dev \
|
|
|
|
libvdpau-dev \
|
|
|
|
libwayland-dev \
|
|
|
|
libx11-dev \
|
|
|
|
libxcb-shm0-dev \
|
|
|
|
libxcb-xfixes0-dev \
|
|
|
|
libxcb1-dev \
|
|
|
|
libxfixes-dev \
|
|
|
|
libxrandr-dev \
|
2024-05-14 23:20:37 +00:00
|
|
|
libxtst-dev
|
2023-08-12 19:53:45 +00:00
|
|
|
|
|
|
|
# clean apt cache
|
|
|
|
sudo apt-get clean
|
|
|
|
sudo rm -rf /var/lib/apt/lists/*
|
|
|
|
|
|
|
|
# Update gcc alias
|
|
|
|
# https://stackoverflow.com/a/70653945/11214013
|
|
|
|
sudo update-alternatives --install \
|
|
|
|
/usr/bin/gcc gcc /usr/bin/gcc-10 100 \
|
|
|
|
--slave /usr/bin/g++ g++ /usr/bin/g++-10 \
|
|
|
|
--slave /usr/bin/gcov gcov /usr/bin/gcov-10 \
|
|
|
|
--slave /usr/bin/gcc-ar gcc-ar /usr/bin/gcc-ar-10 \
|
|
|
|
--slave /usr/bin/gcc-ranlib gcc-ranlib /usr/bin/gcc-ranlib-10
|
|
|
|
|
2024-04-16 21:41:56 +00:00
|
|
|
# build
|
|
|
|
mkdir -p build
|
|
|
|
cd build || exit 1
|
2024-05-14 23:20:37 +00:00
|
|
|
cmake \
|
2024-06-24 16:12:31 +00:00
|
|
|
-DBUILD_DOCS=OFF \
|
2024-05-14 23:20:37 +00:00
|
|
|
-DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc \
|
|
|
|
-G "Unix Makefiles" \
|
|
|
|
..
|
2024-04-17 03:00:10 +00:00
|
|
|
make -j"$(nproc)"
|
2024-04-16 21:41:56 +00:00
|
|
|
|
2024-05-14 23:20:37 +00:00
|
|
|
# Delete CUDA
|
|
|
|
sudo rm -rf /usr/local/cuda
|
|
|
|
|
2024-04-16 21:41:56 +00:00
|
|
|
# skip autobuild
|
|
|
|
echo "skip_autobuild=true" >> "$GITHUB_OUTPUT"
|