Skip to content

Commit

Permalink
Drop clang 12
Browse files Browse the repository at this point in the history
  • Loading branch information
gracicot committed Sep 16, 2024
1 parent 1ea166a commit dce6f18
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 30 deletions.
33 changes: 9 additions & 24 deletions .github/workflows/all-os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,30 +19,15 @@ jobs:
steps:
- uses: actions/checkout@v4

- name: get-cmake
uses: lukka/get-cmake@v3.26.0

- name: Run vcpkg
uses: lukka/run-vcpkg@v11
- uses: cachix/install-nix-action@v27
with:
# Location of the vcpkg as submodule of the repository.
vcpkgDirectory: '${{ github.workspace }}/vcpkg'
vcpkgGitCommitId: '3508985146f1b1d248c67ead13f8f54be5b4f5da'
# Since the cache must be invalidated when content of the vcpkg.json file changes, let's
# compute its hash and append this to the computed cache's key.
appendedCacheKey: ${{ hashFiles( '**/vcpkg.json' ) }}
github_access_token: ${{ secrets.GITHUB_TOKEN }}

- uses: maxim-lobanov/setup-xcode@v1.5.1
with:
xcode-version: ${{ matrix.xcode }}

- name: 'Run CMake'
uses: lukka/run-cmake@v10
with:
configurePreset: 'ci'
buildPreset: 'ci'
testPreset: 'ci'
configurePresetCmdString: '[`--preset`, `$[env.CONFIGURE_PRESET_NAME]`]'
- run: nix develop .#ci-nocc --command bash -c "cmake --preset ci-macos && cmake --build --preset ci-macos && ctest --preset ci-macos"

linux-clang:
name: Clang ${{ matrix.clang }} Linux
Expand Down Expand Up @@ -101,9 +86,9 @@ jobs:
- name: 'Run CMake'
uses: lukka/run-cmake@v10
with:
configurePreset: 'ci'
buildPreset: 'ci'
testPreset: 'ci'
configurePreset: 'ci-linux'
buildPreset: 'ci-linux'
testPreset: 'ci-linux'
configurePresetCmdString: '[`--preset`, `$[env.CONFIGURE_PRESET_NAME]`]'

windows-msvc:
Expand Down Expand Up @@ -139,8 +124,8 @@ jobs:
- name: 'Run CMake'
uses: lukka/run-cmake@v10
with:
configurePreset: 'ci'
buildPreset: 'ci'
testPreset: 'ci'
configurePreset: 'ci-windows'
buildPreset: 'ci-windows'
testPreset: 'ci-windows'
configurePresetCmdString: '[`--preset`, `$[env.CONFIGURE_PRESET_NAME]`]'

85 changes: 80 additions & 5 deletions CMakePresets.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,7 @@
"KANGARU_BUILD_EXAMPLES": "ON",
"KANGARU_REVERSE_DESTRUCTION": "ON",
"KANGARU_NO_EXCEPTION": "OFF",
"KANGARU_BENCHMARK": "OFF",
"KANGARU_TEST": "ON",
"CMAKE_CXX_FLAGS": "-Werror -Wall -Wextra -Wno-error=unused-parameter -Wno-error=unused-variable -Wno-error=unused-private-field",
"CMAKE_CXX_FLAGS_RELWITHDEBINFO": "-g -O2 -fsanitize=address,undefined"
"KANGARU_TEST": "ON"
}
},
{
Expand All @@ -54,19 +51,53 @@
"KANGARU_NO_EXCEPTION": "OFF",
"KANGARU_TEST": "ON",
"CMAKE_COLOR_DIAGNOSTICS": "ON",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON",
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON"
}
},
{
"name": "platform-linux",
"hidden": true,
"cacheVariables": {
"CMAKE_CXX_FLAGS": "-Werror -Wall -Wextra -Wno-error=unused-parameter -Wno-error=unused-variable -Wno-error=unused-private-field",
"CMAKE_CXX_FLAGS_DEBUG": "-g -O0 -fsanitize=address,undefined",
"CMAKE_CXX_FLAGS_RELWITHDEBINFO": "-g -O2 -fsanitize=address,undefined",
"CMAKE_CXX_FLAGS_RELEASE": "-O3 -flto"
}
},
{
"name": "platform-macos",
"hidden": true,
"cacheVariables": {
"CMAKE_CXX_FLAGS": "-Werror -Wall -Wextra -Wno-error=unused-parameter -Wno-error=unused-variable -Wno-error=unused-private-field",
"CMAKE_CXX_FLAGS_DEBUG": "-g -O0 -fsanitize=address,undefined",
"CMAKE_CXX_FLAGS_RELWITHDEBINFO": "-g -O2 -fsanitize=address,undefined",
"CMAKE_CXX_FLAGS_RELEASE": "-O3 -flto"
}
},
{
"name": "platform-windows",
"hidden": true,
"architecture": "x64",
"cacheVariables": {
"CMAKE_CXX_FLAGS": "/sdl /guard:cf /utf-8 /diagnostics:caret /w14165 /w44242 /w44254 /w44263 /w34265 /w34287 /w44296 /w44365 /w44388 /w44464 /w14545 /w14546 /w14547 /w14549 /w14555 /w34619 /w34640 /w24826 /w14905 /w14906 /w14928 /w45038 /W4 /permissive- /volatile:iso /Zc:inline /Zc:preprocessor /Zc:enumTypes /Zc:lambda /Zc:__cplusplus /Zc:externConstexpr /Zc:throwingNew /EHsc",
"CMAKE_EXE_LINKER_FLAGS": "/machine:x64 /guard:cf",
"CMAKE_CXX_FLAGS_DEBUG": "/DEBUG /ZI /fsanitize=address",
"CMAKE_CXX_FLAGS_RELWITHDEBINFO": "/DEBUG /ZI /O2 /fsanitize=address",
"CMAKE_CXX_FLAGS_RELEASE": "/O2 /GL"
}
},
{
"name": "dev-linux",
"displayName": "Linux development",
"binaryDir": "${sourceDir}/build/dev-linux",
"inherits": ["generator-multi", "vcpkg", "dev"]
},
{
"name": "dev-macos",
"displayName": "macOS development",
"binaryDir": "${sourceDir}/build/dev-linux",
"inherits": ["generator-multi", "vcpkg", "dev"]
},
{
"name": "ci-linux",
"displayName": "Linux Continuous Integration",
Expand All @@ -75,6 +106,24 @@
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
},
{
"name": "ci-macos",
"displayName": "macOS Continuous Integration",
"binaryDir": "${sourceDir}/build/ci-macos",
"inherits": ["generator-single", "vcpkg", "dev"],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
},
{
"name": "ci-windows",
"displayName": "macOS Continuous Integration",
"binaryDir": "${sourceDir}/build/ci-windows",
"inherits": ["generator-single", "vcpkg", "dev"],
"cacheVariables": {
"CMAKE_BUILD_TYPE": "RelWithDebInfo"
}
}
],
"buildPresets": [
Expand Down Expand Up @@ -105,6 +154,20 @@
"description": "The build configuration for CI",
"configuration": "RelWithDebInfo",
"configurePreset": "ci-linux"
},
{
"name": "ci-macos",
"displayName": "CI",
"description": "The build configuration for CI",
"configuration": "RelWithDebInfo",
"configurePreset": "ci-macos"
},
{
"name": "ci-windows",
"displayName": "CI",
"description": "The build configuration for CI",
"configuration": "RelWithDebInfo",
"configurePreset": "ci-windows"
}
],
"testPresets": [
Expand Down Expand Up @@ -137,6 +200,18 @@
"inherits": "default-test",
"configuration": "RelWithDebInfo",
"configurePreset": "ci-linux"
},
{
"name": "ci-macos",
"inherits": "default-test",
"configuration": "RelWithDebInfo",
"configurePreset": "ci-macos"
},
{
"name": "ci-windows",
"inherits": "default-test",
"configuration": "RelWithDebInfo",
"configurePreset": "ci-windows"
}
]
}
1 change: 0 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,6 @@
#mkShell = pkgs.mkShell.override {stdenv = pkgs.gcc13Stdenv; };
in {
default = makeShell { inherit pkgs; stdenv = pkgs.llvmPackages_18.libcxxStdenv; };
ci-clang12 = makeShell { inherit pkgs; stdenv = pkgs.llvmPackages_12.stdenv; };
ci-clang13 = makeShell { inherit pkgs; stdenv = pkgs.llvmPackages_13.libcxxStdenv; };
ci-clang14 = makeShell { inherit pkgs; stdenv = pkgs.llvmPackages_14.libcxxStdenv; };
ci-clang15 = makeShell { inherit pkgs; stdenv = pkgs.llvmPackages_15.libcxxStdenv; };
Expand Down

0 comments on commit dce6f18

Please sign in to comment.