From e211febdad0d12cfe8da98d969d6cff3d5032042 Mon Sep 17 00:00:00 2001 From: Michael Fabian 'Xaymar' Dirks Date: Sun, 18 Sep 2022 18:55:17 +0200 Subject: [PATCH] ci: Use GCC 12 on Ubuntu 22.04 --- .github/workflows/main.yml | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9fecf4a8d4..0d5dd2f858 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -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