From 5ceafea0eca31301f962f572c757f97674e968fb Mon Sep 17 00:00:00 2001 From: Krystine Sherwin <93062060+KrystalDelusion@users.noreply.github.com> Date: Tue, 6 Feb 2024 17:25:25 +1300 Subject: [PATCH] ci: Default clang build Switch build artifact to a default clang build. Testing with the build artifact locally, `make test` is failing with `/lib/x86_64-linux-gnu/libstdc++.so.6: version 'GLIBCXX_3.4.29' not found`. Using the gcc-11 build (might be?) installing GLIBCXX_3.4.29 but not linking it into the build. Rather than trying to get it to link, just use the pre-installed `clang` instead. --- .github/workflows/test-linux.yml | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test-linux.yml b/.github/workflows/test-linux.yml index 17aa05055..489995615 100644 --- a/.github/workflows/test-linux.yml +++ b/.github/workflows/test-linux.yml @@ -29,12 +29,14 @@ jobs: runs-on: ${{ matrix.os.id }} env: CC: ${{ matrix.compiler }} + CXX: ${{ matrix.compiler }} CXXSTD: ${{ matrix.cpp_std }} strategy: matrix: os: - { id: ubuntu-20.04, name: focal } compiler: + - 'clang' - 'clang-12' - 'gcc-11' cpp_std: @@ -70,7 +72,7 @@ jobs: echo "CXXFLAGS=-Wp,-D_GLIBCXX_ASSERTIONS" >> $GITHUB_ENV - name: Setup Clang - if: startsWith(matrix.compiler, 'clang') + if: startsWith(matrix.compiler, 'clang') && (matrix.compiler != 'clang') shell: bash run: | wget https://apt.llvm.org/llvm-snapshot.gpg.key @@ -105,7 +107,7 @@ jobs: mkdir build cd build make -f ../Makefile config-${CC%%-*} - make -f ../Makefile -j$procs CXXSTD=$CXXSTD CC=$CC CXX=$CC LD=$CC + make -f ../Makefile -j$procs CXXSTD=$CXXSTD CC=$CC CXX=$CXX LD=$CC - name: Log yosys-config output run: | @@ -118,7 +120,7 @@ jobs: tar -cvf ../build.tar share/ yosys yosys-* - name: Store build artifact - if: (matrix.cpp_std == 'c++11') && (matrix.compiler == 'gcc-11') + if: (matrix.cpp_std == 'c++11') && (matrix.compiler == 'clang') uses: actions/upload-artifact@v4 with: name: build-artifact