Skip to content

Commit 1af9d70

Browse files
committed
Fix CI builds with ubuntu-latest
- gcc10 is no longer available on ubuntu-latest - ubuntu-latest no longer supports Format.cmake 1.8.1, see TheLartians/Format.cmake#45 - Format.cmake 1.8.3 now tries to format json, which needs changes to the clang-format configuration file
1 parent 85a5835 commit 1af9d70

File tree

3 files changed

+11
-7
lines changed

3 files changed

+11
-7
lines changed

.clang-format

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,5 +60,8 @@ SpacesInParentheses: 'false'
6060
SpacesInSquareBrackets: 'false'
6161
Standard: Cpp11
6262
UseTab: Never
63-
63+
---
64+
Language: Json
65+
BasedOnStyle: llvm
66+
IndentWidth: '4'
6467
...

.github/workflows/ctest.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ jobs:
1010
strategy:
1111
matrix:
1212
os: [ubuntu-latest]
13-
compiler: [{cpp: g++-10, c: gcc-10}]
13+
version: [11, 12, 13]
14+
15+
name: Build (GCC ${{ matrix.version }})
1416

1517
runs-on: ${{ matrix.os }}
1618

@@ -23,13 +25,12 @@ jobs:
2325
- name: Prepare build environment
2426
run: |
2527
sudo apt update
26-
sudo apt-get install ninja-build gcovr
28+
sudo apt-get install ninja-build gcovr cmake gcc-${{ matrix.version }} g++-${{ matrix.version }}
29+
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ matrix.version }} ${{ matrix.version }}
30+
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-${{ matrix.version }} ${{ matrix.version }}
2731
2832
- name: Configure CMake
2933
run: cmake --preset=debug -DPASTA_BIT_VECTOR_BUILD_TESTS=On -DPASTA_BIT_VECTOR_COVERAGE_REPORTING=On
30-
env:
31-
CC: gcc-10
32-
CXX: g++-10
3334

3435
- name: Build
3536
run: cmake --build ${{github.workspace}}/debug/

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ if (PROJECT_IS_TOP_LEVEL)
3737
FetchContent_Declare(
3838
Format.cmake
3939
GIT_REPOSITORY https://github.com/TheLartians/Format.cmake
40-
GIT_TAG v1.8.1
40+
GIT_TAG v1.8.3
4141
)
4242
FetchContent_MakeAvailable(Format.cmake)
4343

0 commit comments

Comments
 (0)