Skip to content

Commit 02b71d3

Browse files
committed
Use GCC 13 in the CI bots to avoid GCC 12 bug.
On GCC 12, a mutable variable can't be used in a constexpr context, but it now works in GCC 13. Unfortunately, (or fortunately?) GCC 13 reports an OOB write in fmtlib's float formatting. We disable that warning for now so that we can build, and it is reported upstream at fmtlib/fmt#3533
1 parent 9301433 commit 02b71d3

File tree

2 files changed

+22
-4
lines changed

2 files changed

+22
-4
lines changed

.github/workflows/ci.yml

+11-2
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ jobs:
5151
artifact: "Linux-GCC.tar.xz",
5252
os: ubuntu-latest,
5353
build_type: "Release",
54-
cc: "gcc-12",
55-
cxx: "g++-12",
54+
cc: "gcc-13",
55+
cxx: "g++-13",
5656
}
5757

5858
# Clang doesn't have good enough C++20 support to compile this library
@@ -76,6 +76,15 @@ jobs:
7676
chmod +x llvm.sh
7777
sudo ./llvm.sh 16 all
7878
79+
- name: Install GCC 13
80+
if: matrix.config.name == 'Ubuntu GCC'
81+
run: |
82+
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
83+
sudo apt update
84+
sudo apt-get install g++-13
85+
# GCC 13 and fmtlib error: https://github.com/fmtlib/fmt/issues/3533
86+
echo "CXXFLAGS=$CXXFLAGS -Wno-stringop-overflow" >> $GITHUB_ENV
87+
7988
- name: Install Python3
8089
if: startsWith(matrix.config.os, 'ubuntu-')
8190
run: |

.github/workflows/try.yml

+11-2
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ jobs:
5252
name: "Ubuntu GCC",
5353
os: ubuntu-latest,
5454
build_type: "Release",
55-
cc: "gcc-12",
56-
cxx: "g++-12",
55+
cc: "gcc-13",
56+
cxx: "g++-13",
5757
}
5858

5959
# Clang doesn't have good enough C++20 support to compile this library
@@ -77,6 +77,15 @@ jobs:
7777
chmod +x llvm.sh
7878
sudo ./llvm.sh 16 all
7979
80+
- name: Install GCC 13
81+
if: matrix.config.name == 'Ubuntu GCC'
82+
run: |
83+
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
84+
sudo apt update
85+
sudo apt-get install g++-13
86+
# GCC 13 and fmtlib error: https://github.com/fmtlib/fmt/issues/3533
87+
echo "CXXFLAGS=$CXXFLAGS -Wno-stringop-overflow" >> $GITHUB_ENV
88+
8089
- name: Install Python3
8190
if: startsWith(matrix.config.os, 'ubuntu-')
8291
run: |

0 commit comments

Comments
 (0)