Skip to content

Commit

Permalink
Compile with clang 18
Browse files Browse the repository at this point in the history
  • Loading branch information
sjanel committed Mar 13, 2024
1 parent ac1e099 commit 6d0cd3f
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 34 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
xcode-version: latest-stable

- name: Install dependencies
run: brew install ninja
run: brew install cmake ninja

- name: Configure
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DCMAKE_CXX_COMPILER=g++-11 -DOPENSSL_ROOT_DIR=/usr/local/opt/[email protected] -GNinja
Expand All @@ -28,10 +28,6 @@ jobs:
working-directory: ${{github.workspace}}/build
run: ninja

- name: Local Tests
- name: Tests
working-directory: ${{github.workspace}}/build
run: ctest --output-on-failure --exclude-regex api_test

- name: Public API Tests # Tries several times to avoid random timeout errors not coming from coincenter
working-directory: ${{github.workspace}}/build
run: ctest --output-on-failure --tests-regex api_test --repeat until-pass:10
run: ctest -j 2 --output-on-failure
4 changes: 2 additions & 2 deletions .github/workflows/ubuntu-clang-tidy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
clang-version: [17]
clang-version: [18]
buildmode: [Debug]

steps:
Expand All @@ -22,7 +22,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt update
sudo apt install libcurl4-gnutls-dev ninja-build -y --no-install-recommends
sudo apt install cmake libssl-dev libcurl4-gnutls-dev ninja-build -y --no-install-recommends
- name: Install clang (with clang-tidy)
run: |
Expand Down
11 changes: 3 additions & 8 deletions .github/workflows/ubuntu-monitoring.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Prerequisites
run: |
sudo apt update
sudo apt install libcurl4-gnutls-dev ninja-build -y --no-install-recommends
sudo apt install cmake libssl-dev git libcurl4-gnutls-dev ninja-build -y --no-install-recommends
- name: Install prometheus-cpp
run: |
Expand Down Expand Up @@ -54,12 +54,7 @@ jobs:
shell: bash
run: ninja

- name: Local Tests
- name: Tests
working-directory: ${{github.workspace}}/build
shell: bash
run: ctest -j 2 -C ${{matrix.buildmode}} --output-on-failure --exclude-regex api_test

- name: Public API Tests # Tries several times to avoid random timeout errors not coming from coincenter
working-directory: ${{github.workspace}}/build
shell: bash
run: ctest -j 2 -C ${{matrix.buildmode}} --output-on-failure --tests-regex api_test --repeat until-pass:10
run: ctest -j 4 -C ${{matrix.buildmode}} --output-on-failure
16 changes: 6 additions & 10 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
compiler: [g++-11, clang++-17]
compiler: [g++-11, clang++-18]
buildmode: [Debug, Release]

steps:
Expand All @@ -22,7 +22,7 @@ jobs:
- name: Install dependencies
run: |
sudo apt update
sudo apt install libcurl4-gnutls-dev ninja-build -y --no-install-recommends
sudo apt install cmake libssl-dev libcurl4-gnutls-dev ninja-build -y --no-install-recommends
- name: Install gcc
run: |
Expand All @@ -31,9 +31,10 @@ jobs:

- name: Install clang
run: |
CLANG_VERSION=$(echo ${{matrix.compiler}} | cut -d- -f2)
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 17
sudo ./llvm.sh ${CLANG_VERSION}
if: startsWith(matrix.compiler, 'clang++')

- name: Create Build Environment
Expand All @@ -49,12 +50,7 @@ jobs:
shell: bash
run: ninja

- name: Local Tests
- name: Tests
working-directory: ${{github.workspace}}/build
shell: bash
run: ctest -j 2 -C ${{matrix.buildmode}} --output-on-failure --exclude-regex api_test

- name: Public API Tests # Tries several times to avoid random timeout errors not coming from coincenter
working-directory: ${{github.workspace}}/build
shell: bash
run: ctest -j 2 -C ${{matrix.buildmode}} --output-on-failure --tests-regex api_test --repeat until-pass:10
run: ctest -j 4 -C ${{matrix.buildmode}} --output-on-failure
6 changes: 1 addition & 5 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,4 @@ jobs:

- name: Local Tests
working-directory: ${{github.workspace}}/build
run: ctest -C ${{matrix.buildmode}} --output-on-failure --exclude-regex api_test

- name: Public API Tests # Tries several times to avoid random timeout errors not coming from coincenter
working-directory: ${{github.workspace}}/build
run: ctest -C ${{matrix.buildmode}} --output-on-failure --tests-regex api_test --repeat until-pass:10
run: ctest -j 4 -C ${{matrix.buildmode}} --output-on-failure
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ if(CCT_BUILD_PROMETHEUS_FROM_SRC)
FetchContent_Declare(
prometheus-cpp
GIT_REPOSITORY https://github.com/jupp0r/prometheus-cpp.git
GIT_TAG v1.2.3
GIT_TAG v1.2.4
)

FetchContent_MakeAvailable(prometheus-cpp)
Expand Down
2 changes: 1 addition & 1 deletion INSTALL.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ But they have partial support which is sufficient to build `coincenter`.
The following compilers are known to compile `coincenter` (and are tested in the CI):

- **GCC** version >= 11
- **Clang** version >= 17
- **Clang** version >= 18
- **MSVC** version >= 19.39

Other compilers have not been tested.
Expand Down

0 comments on commit 6d0cd3f

Please sign in to comment.