Skip to content

Commit

Permalink
Add a CI job that builds with GCC/G++ 12 on Linux x86_64 (#174)
Browse files Browse the repository at this point in the history
Fixes #173

Adding `-std=c++14` to CXXFLAGS fixes the build with GCC 12

Signed-off-by: Martin Tzvetanov Grigorov <[email protected]>
  • Loading branch information
martin-g authored Apr 23, 2024
1 parent 21266db commit 4a60b5a
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ jobs:
build:
name: Linux x86_64
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
gcc-version: [10, 12]

steps:
- name: Checkout
Expand All @@ -18,13 +22,16 @@ jobs:
submodules: "recursive"

- name: Install dependencies
run: sudo apt-get update -q -y && sudo apt-get install -q -y cmake libeigen3-dev libboost-dev
run: |
sudo apt-get update -q -y
sudo apt-get install -q -y gcc-${{ matrix.gcc-version }} g++-${{ matrix.gcc-version}} cmake libeigen3-dev libboost-dev
- name: Build
run: |
mkdir build
cd build
cmake ..
export CXXFLAGS="-std=c++14" # this is important to be able to build with g++ newer than v10
cmake .. -DCMAKE_C_COMPILER=$(which gcc-${{ matrix.gcc-version }}) -DCMAKE_CXX_COMPILER=$(which g++-${{ matrix.gcc-version }})
make -j
file iqtree2 | grep x86-64
Expand Down

0 comments on commit 4a60b5a

Please sign in to comment.