Skip to content

Commit 0617459

Browse files
committed
Update GHA config to use libstdc++-11 with clang-13 through 15.
clang-12 through 15 do not fully support C++23, so it is not compatible with libstdc++-13 in this mode. GHA config is enabling C++23 only since clang-13, so update clang-13 through 15 jobs to use libstdc++-11.
1 parent 58033b5 commit 0617459

File tree

1 file changed

+35
-5
lines changed

1 file changed

+35
-5
lines changed

.github/workflows/ci.yml

Lines changed: 35 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,7 @@ jobs:
108108
cxxstd: "11,14,17,2a"
109109
os: ubuntu-20.04
110110
install: clang-11
111+
# Note: clang-12 through 15 do not fully support C++23, so it is not compatible with libstdc++-13 in this mode
111112
- toolset: clang
112113
compiler: clang++-12
113114
cxxstd: "11,14,17,2a"
@@ -117,17 +118,26 @@ jobs:
117118
compiler: clang++-13
118119
cxxstd: "11,14,17,20,2b"
119120
os: ubuntu-22.04
120-
install: clang-13
121+
install:
122+
- clang-13
123+
- g++-11
124+
gcc_toolchain: 11
121125
- toolset: clang
122126
compiler: clang++-14
123127
cxxstd: "11,14,17,20,2b"
124128
os: ubuntu-22.04
125-
install: clang-14
129+
install:
130+
- clang-14
131+
- g++-11
132+
gcc_toolchain: 11
126133
- toolset: clang
127134
compiler: clang++-15
128135
cxxstd: "11,14,17,20,2b"
129136
os: ubuntu-22.04
130-
install: clang-15
137+
install:
138+
- clang-15
139+
- g++-11
140+
gcc_toolchain: 11
131141
- toolset: clang
132142
compiler: clang++-16
133143
cxxstd: "11,14,17,20,2b"
@@ -164,7 +174,19 @@ jobs:
164174
if: matrix.install
165175
run: |
166176
sudo apt-get update
167-
sudo apt-get -y install ${{matrix.install}}
177+
sudo apt-get -y install ${{join(matrix.install, ' ')}}
178+
179+
- name: Setup GCC Toolchain
180+
if: matrix.gcc_toolchain
181+
run: |
182+
GCC_TOOLCHAIN_ROOT="$HOME/gcc-toolchain"
183+
echo "GCC_TOOLCHAIN_ROOT=\"$GCC_TOOLCHAIN_ROOT\"" >> $GITHUB_ENV
184+
MULTIARCH_TRIPLET="$(dpkg-architecture -qDEB_HOST_MULTIARCH)"
185+
mkdir -p "$GCC_TOOLCHAIN_ROOT"
186+
ln -s /usr/include "$GCC_TOOLCHAIN_ROOT/include"
187+
ln -s /usr/bin "$GCC_TOOLCHAIN_ROOT/bin"
188+
mkdir -p "$GCC_TOOLCHAIN_ROOT/lib/gcc/$MULTIARCH_TRIPLET"
189+
ln -s "/usr/lib/gcc/$MULTIARCH_TRIPLET/${{matrix.gcc_toolchain}}" "$GCC_TOOLCHAIN_ROOT/lib/gcc/$MULTIARCH_TRIPLET/${{matrix.gcc_toolchain}}"
168190
169191
- name: Setup Boost
170192
run: |
@@ -191,7 +213,15 @@ jobs:
191213
- name: Create user-config.jam
192214
if: matrix.compiler
193215
run: |
194-
echo "using ${{matrix.toolset}} : : ${{matrix.compiler}} ;" > ~/user-config.jam
216+
if [ -n "${{matrix.compiler}}" -o -n "$GCC_TOOLCHAIN_ROOT" ]
217+
then
218+
echo -n "using ${{matrix.toolset}} : : ${{matrix.compiler}}" > ~/user-config.jam
219+
if [ -n "$GCC_TOOLCHAIN_ROOT" ]
220+
then
221+
echo -n " : <compileflags>\"--gcc-toolchain=$GCC_TOOLCHAIN_ROOT\" <linkflags>\"--gcc-toolchain=$GCC_TOOLCHAIN_ROOT\"" >> ~/user-config.jam
222+
fi
223+
echo " ;" >> ~/user-config.jam
224+
fi
195225
196226
- name: Run tests
197227
run: |

0 commit comments

Comments
 (0)