Skip to content

Commit

Permalink
Update actions/checkout in GitHub Actions to v4 (#11, thanks @striezel)
Browse files Browse the repository at this point in the history
* Update actions/checkout in GitHub Actions to v4

* Add workaround for incompatibilities between Clang and libstdc++

See <actions/runner-images#8659> for
more information. Currently, Clang and libstdc++ provided by the
GitHub Actions runner image are incompatible. The basic idea of
this workaround is to remove the incompatible g++ 13 and its C++
standard library and replace that with a compatible version of
libstdc++.
  • Loading branch information
striezel committed Jan 17, 2024
1 parent e621200 commit 89b274a
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install GCC ${{ matrix.version }}
run: sudo apt-get install -y gcc-${{ matrix.version }} g++-${{ matrix.version }}
Expand Down Expand Up @@ -52,16 +52,25 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

# Workaround for incompatible clang and libstc++ versions, see
# <https://github.com/actions/runner-images/issues/8659> for more info.
# The basic idea here is to remove g++ 13 and its C++ standard library
# and replace that with a compatible version of libstdc++.
- name: Workaround for GHA runner images issue 8659
run: |
sudo apt-get purge -y g++-13 gcc-13 libstdc++-13-dev
sudo apt-get install -y --allow-downgrades libstdc++-12-dev libstdc++6=12.* libgcc-s1=12.*
- name: Install Clang ${{ matrix.version }}
run: sudo apt-get install -y clang-${{ matrix.version }}

- name: Configure tests
env:
CXX: clang-${{ matrix.version }}
CXX: clang++-${{ matrix.version }}
run: cmake -S . -B build
-D CMAKE_CXX_COMPILER=clang++
-D CMAKE_CXX_COMPILER=clang++-${{ matrix.version }}
-D CMAKE_BUILD_TYPE:STRING=Release
-D ${{ env.PROJECT }}_OPT_SELECT_NONSTD=ON
-D ${{ env.PROJECT }}_OPT_BUILD_TESTS=ON
Expand All @@ -83,7 +92,7 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Configure tests
run: cmake -S . -B build
Expand Down

0 comments on commit 89b274a

Please sign in to comment.