Skip to content

Commit

Permalink
ci: Use GCC 12 on Ubuntu 22.04
Browse files Browse the repository at this point in the history
  • Loading branch information
Xaymar committed Sep 18, 2022
1 parent de0e791 commit e211feb
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,11 +143,19 @@ jobs:
# Compiler
if [[ "${{ matrix.generator }}" = "GCC" ]]; then
sudo apt-get install gcc-10 g++10
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 800 --slave /usr/bin/g++ g++ /usr/bin/g++-10
echo "CC=gcc-10" >> "${GITHUB_ENV}"
echo "CXX=gcc-10" >> "${GITHUB_ENV}"
echo "LD=ld" >> "${GITHUB_ENV}"
if [[ "${{ matrix.runner }}" = "ubuntu-22.04" ]]; then
sudo apt-get install gcc-12 g++12
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 800 --slave /usr/bin/g++ g++ /usr/bin/g++-12
echo "CC=gcc-12" >> "${GITHUB_ENV}"
echo "CXX=gcc-12" >> "${GITHUB_ENV}"
echo "LD=ld" >> "${GITHUB_ENV}"
elif [[ "${{ matrix.runner }}" = "ubuntu-20.04" ]]; then
sudo apt-get install gcc-10 g++10
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-10 800 --slave /usr/bin/g++ g++ /usr/bin/g++-10
echo "CC=gcc-10" >> "${GITHUB_ENV}"
echo "CXX=gcc-10" >> "${GITHUB_ENV}"
echo "LD=ld" >> "${GITHUB_ENV}"
fi
elif [[ "${{ matrix.generator }}" = "Clang" ]]; then
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-14 800
sudo update-alternatives --install /usr/bin/clangd clangd /usr/bin/clangd-14 800
Expand Down

0 comments on commit e211feb

Please # to comment.