From 93f7b5dc928732b18ed9f32e809fbd95ef9cd3a4 Mon Sep 17 00:00:00 2001 From: Olanti Date: Wed, 1 Nov 2023 17:10:24 +0300 Subject: [PATCH] ci(port): Fix clang 14 build in GHA (#3528) * Set up a mock GCC toolchain root for Clang on GHA * Adjust clang version to 14 used by BN --------- Co-authored-by: Binrui Dong --- .github/workflows/matrix.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/.github/workflows/matrix.yml b/.github/workflows/matrix.yml index 9e7a56e4806d..21108d416695 100644 --- a/.github/workflows/matrix.yml +++ b/.github/workflows/matrix.yml @@ -129,6 +129,7 @@ jobs: sound: 0 lua: 0 sanitize: address,undefined + cxxflags: --gcc-toolchain=/opt/mock-gcc-11 native: linux64 ccache_limit: 2G ccache_key: linux-llvm-14-asan @@ -152,6 +153,7 @@ jobs: ZSTD_CLEVEL: 17 CMAKE: ${{ matrix.cmake }} COMPILER: ${{ matrix.compiler }} + CXXFLAGS: ${{ matrix.cxxflags }} OS: ${{ matrix.os }} TILES: ${{ matrix.tiles }} SOUND: ${{ matrix.sound }} @@ -197,6 +199,15 @@ jobs: # Ensure that it is actually needed version ${{ matrix.compiler }} --version | grep -q -E "${{ matrix.grep_clang_version_rxp }}" + - name: set up a mock GCC toolchain root for Clang (Ubuntu) + if: ${{ env.SKIP == 'false' && runner.os == 'Linux' && (matrix.compiler == 'clang++-14') }} + run: | + sudo mkdir /opt/mock-gcc-11 + sudo ln -s /usr/include /opt/mock-gcc-11/include + sudo ln -s /usr/bin /opt/mock-gcc-11/bin + sudo mkdir -p /opt/mock-gcc-11/lib/gcc/x86_64-linux-gnu + sudo ln -s /usr/lib/gcc/x86_64-linux-gnu/11 /opt/mock-gcc-11/lib/gcc/x86_64-linux-gnu/11 + - name: install dependencies (mac) if: ${{ env.SKIP == 'false' && runner.os == 'macOS' }} run: |