-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix windows build and add CI for macos and windows
- Loading branch information
1 parent
4bbbe4e
commit 071bde5
Showing
10 changed files
with
368 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
# .github/workflows/macos.yml | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
name: Macos Build | ||
|
||
on: | ||
push: | ||
branches: ["main", "develop"] | ||
pull_request: | ||
branches: ["main", "develop"] | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-15 | ||
strategy: | ||
fail-fast: false | ||
|
||
matrix: | ||
preset: [debug, release] | ||
# TODO: compiler: [g++, clang++-19] | ||
compiler: [g++, clang++-18] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Cpp | ||
# if: startsWith(matrix.compiler, 'clang') | ||
uses: aminya/setup-cpp@v1 | ||
with: | ||
# TODO: compiler: llvm-19 | ||
# clangtidy: true | ||
# cmake: true | ||
ninja: true | ||
|
||
- name: Install llvm-19 | ||
if: startsWith(matrix.compiler, 'clang') | ||
run: | | ||
brew install llvm@19 || echo ignored | ||
- name: macos clang++-18 ${{ matrix.preset }} | ||
if: startsWith(matrix.compiler, 'clang') | ||
run: CXX=$(brew --prefix llvm@18)/bin/clang++ cmake --workflow --preset ${{ matrix.preset }} | ||
|
||
- name: macos g++ ${{ matrix.preset }} | ||
if: startsWith(matrix.compiler, 'g++') | ||
run: CXX=${{ matrix.compiler }} cmake --workflow --preset ${{ matrix.preset }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
# .github/workflows/windows.yml | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
name: Windows Build | ||
|
||
on: | ||
push: | ||
branches: ["main", "develop"] | ||
pull_request: | ||
branches: ["main", "develop"] | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
strategy: | ||
fail-fast: false | ||
|
||
matrix: | ||
preset: [debug, release] | ||
# TODO: compiler: [cl, clang-cl] | ||
compiler: [cl] | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
# see https://github.com/marketplace/actions/enable-developer-command-prompt | ||
- uses: ilammy/msvc-dev-cmd@v1 | ||
with: | ||
vsversion: 2022 | ||
|
||
# - name: build environment | ||
# run: pip install -r requirements.txt | ||
|
||
- name: cmake workflow ${{ matrix.preset }} | ||
shell: bash | ||
run: | | ||
cmake --version | ||
ninja --version | ||
CXX=${{ matrix.compiler }} cmake --workflow --preset ${{ matrix.preset }} | ||
# - name: configure | ||
# run: CXX=${{ matrix.compiler }} cmake --preset ${{ matrix.preset }} | ||
|
||
# - name: build | ||
# run: cmake --build --preset ${{ matrix.preset }} | ||
|
||
# - name: ctest | ||
# run: ctest --preset ${{ matrix.preset }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
/stagedir | ||
/build | ||
/out | ||
CMakeUserPresets.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,107 @@ | ||
{ | ||
"version": 9, | ||
"cmakeMinimumRequired": { | ||
"major": 3, | ||
"minor": 30, | ||
"patch": 0 | ||
}, | ||
"include": [ | ||
"cmake/CMake${hostSystemName}Presets.json" | ||
], | ||
"buildPresets": [ | ||
{ | ||
"name": "debug", | ||
"configurePreset": "debug", | ||
"configuration": "Debug", | ||
"targets": [ | ||
"install" | ||
] | ||
}, | ||
{ | ||
"name": "release", | ||
"configurePreset": "release", | ||
"configuration": "Release", | ||
"targets": [ | ||
"all_verify_interface_header_sets", | ||
"install" | ||
] | ||
} | ||
], | ||
"testPresets": [ | ||
{ | ||
"name": "test_base", | ||
"hidden": true, | ||
"output": { | ||
"outputOnFailure": true | ||
}, | ||
"execution": { | ||
"noTestsAction": "error", | ||
"stopOnFailure": false | ||
} | ||
}, | ||
{ | ||
"name": "debug", | ||
"inherits": "test_base", | ||
"configuration": "Debug", | ||
"configurePreset": "debug" | ||
}, | ||
{ | ||
"name": "release", | ||
"inherits": "test_base", | ||
"configuration": "Release", | ||
"configurePreset": "release" | ||
} | ||
], | ||
"packagePresets": [ | ||
{ | ||
"name": "release", | ||
"configurePreset": "release", | ||
"configurations": [ | ||
"Release" | ||
], | ||
"generators": [ | ||
"TGZ" | ||
] | ||
} | ||
], | ||
"workflowPresets": [ | ||
{ | ||
"name": "debug", | ||
"steps": [ | ||
{ | ||
"type": "configure", | ||
"name": "debug" | ||
}, | ||
{ | ||
"type": "build", | ||
"name": "debug" | ||
}, | ||
{ | ||
"type": "test", | ||
"name": "debug" | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "release", | ||
"steps": [ | ||
{ | ||
"type": "configure", | ||
"name": "release" | ||
}, | ||
{ | ||
"type": "build", | ||
"name": "release" | ||
}, | ||
{ | ||
"type": "test", | ||
"name": "release" | ||
}, | ||
{ | ||
"type": "package", | ||
"name": "release" | ||
} | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
{ | ||
"version": 6, | ||
"include": [ | ||
"CMakeGenericPresets.json" | ||
], | ||
"configurePresets": [ | ||
{ | ||
"name": "debug-base-Darwin", | ||
"hidden": true, | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "Debug" | ||
}, | ||
"condition": { | ||
"type": "equals", | ||
"lhs": "${hostSystemName}", | ||
"rhs": "Darwin" | ||
} | ||
}, | ||
{ | ||
"name": "release-base-Darwin", | ||
"hidden": true, | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "RelWithDebInfo" | ||
}, | ||
"condition": { | ||
"type": "equals", | ||
"lhs": "${hostSystemName}", | ||
"rhs": "Darwin" | ||
} | ||
}, | ||
{ | ||
"name": "debug", | ||
"displayName": "Debug Build", | ||
"inherits": [ | ||
"root-config", | ||
"debug-base-Darwin" | ||
] | ||
}, | ||
{ | ||
"name": "release", | ||
"displayName": "Release Build", | ||
"inherits": [ | ||
"root-config", | ||
"release-base-Darwin" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
{ | ||
"version": 6, | ||
"configurePresets": [ | ||
{ | ||
"name": "root-config", | ||
"hidden": true, | ||
"generator": "Ninja", | ||
"binaryDir": "${sourceDir}/build/${presetName}", | ||
"installDir": "${sourceDir}/stagedir", | ||
"cacheVariables": { | ||
"CMAKE_PREFIX_PATH": { | ||
"type": "path", | ||
"value": "${sourceDir}/stagedir" | ||
}, | ||
"CMAKE_CXX_EXTENSIONS": false, | ||
"CMAKE_CXX_STANDARD": "23", | ||
"CMAKE_CXX_STANDARD_REQUIRED": true, | ||
"CMAKE_EXPORT_COMPILE_COMMANDS": true, | ||
"CMAKE_SKIP_TEST_ALL_DEPENDENCY": false | ||
} | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"version": 6, | ||
"include": [ | ||
"CMakeGenericPresets.json" | ||
], | ||
"configurePresets": [ | ||
{ | ||
"name": "debug-base-Linux", | ||
"hidden": true, | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "Debug" | ||
}, | ||
"condition": { | ||
"type": "equals", | ||
"lhs": "${hostSystemName}", | ||
"rhs": "Linux" | ||
} | ||
}, | ||
{ | ||
"name": "release-base-Linux", | ||
"hidden": true, | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "RelWithDebInfo", | ||
"CMAKE_CXX_FLAGS": "-Wall -Wextra -Wpedantic -Wno-shadow -Wconversion -Wsign-conversion -Wcast-align -Wcast-qual -Woverloaded-virtual -Wformat=2 -Wno-error" | ||
}, | ||
"condition": { | ||
"type": "notEquals", | ||
"lhs": "${hostSystemName}", | ||
"rhs": "Windows" | ||
} | ||
}, | ||
{ | ||
"name": "debug", | ||
"displayName": "Debug Build", | ||
"inherits": [ | ||
"root-config", | ||
"debug-base-Linux" | ||
] | ||
}, | ||
{ | ||
"name": "release", | ||
"displayName": "Release Build", | ||
"inherits": [ | ||
"root-config", | ||
"release-base-Linux" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
{ | ||
"version": 6, | ||
"include": [ | ||
"CMakeGenericPresets.json" | ||
], | ||
"configurePresets": [ | ||
{ | ||
"name": "release", | ||
"description": "Windows preset for library developers", | ||
"generator": "Ninja Multi-Config", | ||
"binaryDir": "${sourceDir}/build", | ||
"inherits": [ | ||
"root-config" | ||
], | ||
"cacheVariables": { | ||
"CMAKE_CXX_COMPILER": "cl" | ||
}, | ||
"condition": { | ||
"type": "equals", | ||
"lhs": "${hostSystemName}", | ||
"rhs": "Windows" | ||
} | ||
}, | ||
{ | ||
"name": "debug", | ||
"description": "Windows preset for library developers", | ||
"inherits": [ | ||
"release" | ||
] | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# cmake/Config.cmake.in -*-makefile-*- | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
@PACKAGE_INIT@ | ||
|
||
include("${CMAKE_CURRENT_LIST_DIR}/@TARGETS_EXPORT_NAME@.cmake") | ||
check_required_components("@TARGET_LIBRARY@") |