Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add more compiler support #76

Merged
merged 3 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,14 @@ jobs:
fail-fast: false
matrix:
config:
- {name: "Ubuntu Clang 17", os: ubuntu-24.04, toolchain: "clang-17", clang_version: 17, installed_clang_version: 17, cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Asan\" "}
- {name: "Ubuntu Clang 18", os: ubuntu-24.04, toolchain: "clang-18", clang_version: 18, installed_clang_version: 17, cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Asan\" "}
- {name: "Ubuntu Clang 20", os: ubuntu-24.04, toolchain: "clang-20", clang_version: 20, installed_clang_version: 17, cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Asan\" "}
# Note: clang-19 + Asan setup causes errors on some platforms. Temporary skip some checks via .asan_options.
- {name: "Ubuntu Clang 19", os: ubuntu-24.04, toolchain: "clang-19", clang_version: 19, installed_clang_version: 17, cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Asan\" ", asan_options: "new_delete_type_mismatch=0"}
- {name: "Ubuntu GCC 12", os: ubuntu-24.04, toolchain: "gcc-12", cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Asan\" "}
- {name: "Ubuntu GCC 13", os: ubuntu-24.04, toolchain: "gcc-13", cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Asan\" "}
- {name: "Ubuntu Clang 18", os: ubuntu-24.04, toolchain: "clang-18", clang_version: 18, installed_clang_version: 17, cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Asan\" "}
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just reordering for clang-18/17 and gcc-12, 13, 14 to match the order from local presets json. Ordering: latest first.

- {name: "Ubuntu Clang 17", os: ubuntu-24.04, toolchain: "clang-17", clang_version: 17, installed_clang_version: 17, cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Asan\" "}
- {name: "Ubuntu GCC 14", os: ubuntu-24.04, toolchain: "gcc-14", cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Asan\" "}
- {name: "Ubuntu GCC 13", os: ubuntu-24.04, toolchain: "gcc-13", cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Asan\" "}
- {name: "Ubuntu GCC 12", os: ubuntu-24.04, toolchain: "gcc-12", cmake_args: "-G \"Ninja Multi-Config\" -DCMAKE_CONFIGURATION_TYPES=\"RelWithDebInfo;Asan\" "}
steps:
- uses: actions/checkout@v3
with:
Expand Down
102 changes: 102 additions & 0 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,20 @@
"description": "Build with GCC 13 compilers",
"toolchainFile": "${sourceDir}/etc/gcc-13-toolchain.cmake"
},
{
"name": "gcc-12",
"inherits": "common",
"displayName": "GCC 12",
"description": "Build with GCC 12 compilers",
"toolchainFile": "${sourceDir}/etc/gcc-12-toolchain.cmake"
},
{
"name": "clang-20",
"inherits": "common",
"displayName": "Clang 20",
"description": "Build with Clang 20 compilers",
"toolchainFile": "${sourceDir}/etc/clang-20-toolchain.cmake"
},
{
"name": "clang-19",
"inherits": "common",
Expand All @@ -58,6 +72,13 @@
"displayName": "Clang 17",
"description": "Build with Clang 17 compilers",
"toolchainFile": "${sourceDir}/etc/clang-17-toolchain.cmake"
},
{
"name": "clang-16",
"inherits": "common",
"displayName": "Clang 16",
"description": "Build with Clang 16 compilers",
"toolchainFile": "${sourceDir}/etc/clang-16-toolchain.cmake"
}
],
"buildPresets": [
Expand All @@ -81,6 +102,16 @@
"inherits": "common",
"configurePreset": "gcc-13"
},
{
"name": "gcc-12",
"inherits": "common",
"configurePreset": "gcc-12"
},
{
"name": "clang-20",
"inherits": "common",
"configurePreset": "clang-20"
},
{
"name": "clang-19",
"inherits": "common",
Expand All @@ -95,6 +126,11 @@
"name": "clang-17",
"inherits": "common",
"configurePreset": "clang-17"
},
{
"name": "clang-16",
"inherits": "common",
"configurePreset": "clang-16"
}
],
"testPresets": [
Expand Down Expand Up @@ -125,6 +161,16 @@
"inherits": "common",
"configurePreset": "gcc-13"
},
{
"name": "gcc-12",
"inherits": "common",
"configurePreset": "gcc-12"
},
{
"name": "clang-20",
"inherits": "common",
"configurePreset": "clang-20"
},
{
"name": "clang-19",
"inherits": "common",
Expand All @@ -139,6 +185,11 @@
"name": "clang-17",
"inherits": "common",
"configurePreset": "clang-17"
},
{
"name": "clang-16",
"inherits": "common",
"configurePreset": "clang-16"
}
],
"workflowPresets": [
Expand Down Expand Up @@ -193,6 +244,40 @@
}
]
},
{
"name": "gcc-12",
"steps": [
{
"type": "configure",
"name": "gcc-12"
},
{
"type": "build",
"name": "gcc-12"
},
{
"type": "test",
"name": "gcc-12"
}
]
},
{
"name": "clang-20",
"steps": [
{
"type": "configure",
"name": "clang-20"
},
{
"type": "build",
"name": "clang-20"
},
{
"type": "test",
"name": "clang-20"
}
]
},
{
"name": "clang-19",
"steps": [
Expand Down Expand Up @@ -243,6 +328,23 @@
"name": "clang-17"
}
]
},
{
"name": "clang-16",
"steps": [
{
"type": "configure",
"name": "clang-16"
},
{
"type": "build",
"name": "clang-16"
},
{
"type": "test",
"name": "clang-16"
}
]
}
]
}
5 changes: 5 additions & 0 deletions etc/clang-20-toolchain.cmake
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
# cmake-format: off
# etc/clang-20-toolchain.cmake -*-cmake-*-
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
# cmake-format: on

include_guard(GLOBAL)

set(CMAKE_C_COMPILER clang-20)
Expand Down
Loading