-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-update sfun to v5.1.0 -added CMakePresets.json -set version to 2.6.0
- Loading branch information
1 parent
80d9673
commit c69a5c7
Showing
4 changed files
with
146 additions
and
19 deletions.
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 |
---|---|---|
|
@@ -26,29 +26,33 @@ jobs: | |
- { | ||
name: "Ubuntu Latest gcc", | ||
os: ubuntu-latest, | ||
cc: "gcc", | ||
cxx: "g++", | ||
flags: "-Wall -Werror -Wextra -Wpedantic -Wcast-align -Wnon-virtual-dtor -Woverloaded-virtual -Wunused" | ||
cmake-preset: "gcc-release" | ||
} | ||
- { | ||
name: "Ubuntu Latest clang", | ||
os: ubuntu-latest, | ||
cc: "clang", | ||
cxx: "clang++", | ||
flags: "-Wall -Werror -Wextra -Wpedantic -Wcast-align -Wnon-virtual-dtor -Woverloaded-virtual -Wunused" | ||
cmake-preset: "clang-release" | ||
} | ||
- { | ||
name: "Windows Latest MSVC", | ||
os: windows-latest, | ||
cc: "cl", | ||
cxx: "cl", | ||
flags: "/EHsc /W4 /WX" | ||
cmake-preset: "msvc-release" | ||
} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install ninja (Windows) | ||
if: matrix.config.os == 'windows-latest' | ||
run: choco install ninja | ||
- name: Install ninja (Linux) | ||
if: matrix.config.os == 'ubuntu-latest' | ||
run: sudo apt install ninja-build | ||
|
||
- uses: actions/checkout@v4 | ||
- uses: rui314/setup-mold@v1 | ||
- uses: hendrikmuhs/[email protected] | ||
- uses: ilammy/msvc-dev-cmd@v1 | ||
|
||
- name: Configure CMake | ||
run: cmake -B ${{github.workspace}}/build -DENABLE_TESTS=ON -DENABLE_EXAMPLES=ON -DCMDLIME_USE_NAMEOF=${{ matrix.use_nameof }} -DCMAKE_CXX_FLAGS="${{ matrix.config.flags }}" | ||
run: cmake -B ${{github.workspace}}/build -DENABLE_TESTS=ON -DENABLE_EXAMPLES=ON -DCMDLIME_USE_NAMEOF=${{ matrix.use_nameof }} --preset="${{ matrix.config.cmake-preset }}" | ||
|
||
- name: Build | ||
run: cmake --build ${{github.workspace}}/build | ||
|
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,123 @@ | ||
{ | ||
"version": 6, | ||
"configurePresets": [ | ||
{ | ||
"name": "base-linux", | ||
"hidden": true, | ||
"displayName": "linux base preset", | ||
"generator": "Ninja", | ||
"binaryDir": "build-${presetName}", | ||
"cacheVariables": { | ||
"CMAKE_EXE_LINKER_FLAGS": "-fuse-ld=mold", | ||
"CMAKE_CXX_COMPILER_LAUNCHER": "ccache", | ||
"CPM_SOURCE_CACHE": "cpm_cache" | ||
} | ||
}, | ||
{ | ||
"name": "clang-base", | ||
"hidden": true, | ||
"displayName": "clang base preset", | ||
"inherits": "base-linux", | ||
"cacheVariables": { | ||
"CMAKE_CXX_COMPILER": "clang++", | ||
"CMAKE_C_COMPILER": "clang", | ||
"CMAKE_CXX_FLAGS": "-Wall -Wextra -Wpedantic -Werror -Wcast-align -Wnon-virtual-dtor -Woverloaded-virtual -Wunused" | ||
} | ||
}, | ||
{ | ||
"name": "clang-debug", | ||
"displayName": "clang (Debug)", | ||
"inherits": "clang-base", | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "Debug" | ||
} | ||
}, | ||
{ | ||
"name": "clang-release", | ||
"displayName": "clang (Release)", | ||
"inherits": "clang-base", | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "Release" | ||
} | ||
}, | ||
{ | ||
"name": "gcc-base", | ||
"hidden": true, | ||
"displayName": "gcc base preset", | ||
"inherits": "base-linux", | ||
"cacheVariables": { | ||
"CMAKE_CXX_COMPILER": "g++", | ||
"CMAKE_C_COMPILER": "gcc", | ||
"CMAKE_CXX_FLAGS": "-Wall -Wextra -Wpedantic -Werror -Wcast-align -Wnon-virtual-dtor -Woverloaded-virtual -Wunused" | ||
} | ||
}, | ||
{ | ||
"name": "gcc-debug", | ||
"displayName": "gcc (Debug)", | ||
"inherits": "gcc-base", | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "Debug" | ||
} | ||
}, | ||
{ | ||
"name": "gcc-release", | ||
"displayName": "gcc (Release)", | ||
"inherits": "gcc-base", | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "Release" | ||
} | ||
}, | ||
{ | ||
"name": "base-windows", | ||
"displayName": "windows base preset", | ||
"hidden": true, | ||
"generator": "Ninja", | ||
"binaryDir": "build-${presetName}", | ||
"architecture": { | ||
"value": "x64", | ||
"strategy": "external" | ||
}, | ||
"cacheVariables": { | ||
"CPM_SOURCE_CACHE": "cpm_cache", | ||
"CMAKE_CXX_COMPILER_LAUNCHER": "ccache" | ||
}, | ||
"vendor": { | ||
"microsoft.com/VisualStudioSettings/CMake/1.0": { | ||
"hostOS": [ | ||
"Windows" | ||
] | ||
}, | ||
"jetbrains.com/clion": { | ||
"toolchain": "Visual Studio" | ||
} | ||
} | ||
}, | ||
{ | ||
"name": "msvc-base", | ||
"hidden": true, | ||
"displayName": "msvc base preset", | ||
"inherits": "base-windows", | ||
"cacheVariables": { | ||
"CMAKE_CXX_COMPILER": "cl.exe", | ||
"CMAKE_C_COMPILER": "cl.exe", | ||
"CMAKE_CXX_FLAGS": "/EHsc /W4 /WX" | ||
} | ||
}, | ||
{ | ||
"name": "msvc-debug", | ||
"displayName": "msvc (Debug)", | ||
"inherits": "msvc-base", | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "Debug" | ||
} | ||
}, | ||
{ | ||
"name": "msvc-release", | ||
"displayName": "msvc (Release)", | ||
"inherits": "msvc-base", | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "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