Skip to content

Commit

Permalink
CI: install gcc 10 only in U20.04
Browse files Browse the repository at this point in the history
This modifies the commit 7f166a2. Although Linux CI is run with U20.04,
Coverity workflow uses ubuntu-latest, which is currently 22.04, where
default gcc is actually 11 and this breaks GPUJPEG compilation with
error starting with:
```
-- The C compiler identification is GNU 10.5.0
CMake Error at /usr/local/share/cmake-3.28/Modules/CMakeDetermineCompilerId.cmake:780 (message):
  Compiling the CUDA compiler identification source file
  "CMakeCUDACompilerId.cu" failed.

  Compiler: /usr/bin/nvcc
```

fixes failed run <https://github.com/CESNET/UltraGrid/actions/runs/7968323068>
  • Loading branch information
MartinPulec committed Feb 28, 2024
1 parent d992c68 commit d74922e
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions .github/scripts/Linux/prepare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,15 @@ sudo apt install libcurl4-nss-dev
sudo apt install i965-va-driver-shaders # instead of i965-va-driver
sudo apt install uuid-dev # Cineform

sudo apt install gcc-10
sudo apt install g++-10
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10
(
. /etc/os-release
if [ "$ID" != ubuntu ] || [ "$VERSION_ID" != 20.04 ]; then
exit
fi
sudo apt install gcc-10 g++-10
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 10
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 10
)

get_build_deps_excl() { # $2 - pattern to exclude
apt-cache showsrc "$1" | sed -n '/^Build-Depends:/{s/Build-Depends://;p;q}' | tr ',' '\n' | cut -f 2 -d\ | grep -v "$2"
Expand Down

0 comments on commit d74922e

Please sign in to comment.