Skip to content

Commit

Permalink
Use GCC 13 in the CI bots to avoid GCC 12 bug.
Browse files Browse the repository at this point in the history
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
  • Loading branch information
danakj committed Jul 17, 2023
1 parent 9c27d00 commit ad5ce58
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 4 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ jobs:
artifact: "Linux-GCC.tar.xz",
os: ubuntu-latest,
build_type: "Release",
cc: "gcc-12",
cxx: "g++-12",
cc: "gcc-13",
cxx: "g++-13",
}

# Clang doesn't have good enough C++20 support to compile this library
Expand All @@ -76,6 +76,15 @@ jobs:
chmod +x llvm.sh
sudo ./llvm.sh 16 all
- name: Install GCC 13
if: matrix.config.name == 'Ubuntu GCC'
run: |
sudo add-apt-repository ppa:ubuntu-toolchain-r/ppa
sudo apt update
sudo apt-get install g++-13
# GCC 13 and fmtlib error: https://github.com/fmtlib/fmt/issues/3533
echo "CXXFLAGS=$CXXFLAGS -Wno-stringop-overflow" >> $GITHUB_ENV
- name: Install Python3
if: startsWith(matrix.config.os, 'ubuntu-')
run: |
Expand Down
13 changes: 11 additions & 2 deletions .github/workflows/try.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ jobs:
name: "Ubuntu GCC",
os: ubuntu-latest,
build_type: "Release",
cc: "gcc-12",
cxx: "g++-12",
cc: "gcc-13",
cxx: "g++-13",
}

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

0 comments on commit ad5ce58

Please sign in to comment.