forked from Thalhammer/jwt-cpp
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for CMake Presets (Thalhammer#348)
* dev container + vscode extensions * exploring cmake presets for CI * ignore user presets * add configure to build preset windows ran in debug, which means the multi config needs more help * coverage preset * creating a fuzzing preset * fuzzing fix cwd + more configs to preset * move cmake set vars to right section https://learn.microsoft.com/en-us/cpp/build/cmake-presets-vs?view=msvc-170 "You can set C and C++ compilers by using cacheVariables.CMAKE_C_COMPILER and cacheVariables.CMAKE_CXX_COMPILER in a Configure Preset. It's equivalent to passing -D CMAKE_C_COMPILER=<value> and -D CMAKE_CXX_COMPILER=<value> to CMake from the command line." * fix workdir for new fuzz run targets * split up presets into more files * fix include order (liking this less) * add asan to presets * fix copy paste * add asan build preset * move ubsan to presets * replace mustache with a cmake script * touch ups * restore file to void merge conflicts * fix order for args * remove action wrapper more quotes for inputs * revert bad render of boost_json * fix casing * format changes * test to see if output is working * last try * git revert moving mustache to cmake * cmake not enough for presets * drop ci prefix * new test for `library_ROOT` search path * install with presets * cmake --install does not take a preset * install with preset is not yet supported https://gitlab.kitware.com/cmake/cmake/-/issues/23208 * add missing build step * more global fuzzing flags to toolchain file * fixup toolchain in presets * fix pathing and limit configs to tested platforms * clean up + use presets for clang-tidy * dry up sanitizer flags * try install with a preset * remove duplicated test * notes about hunter test * skip checking the compiler since this causes errors with the same CMake uses in combinations with the fuzz sanitizer flag https://github.com/prince-chrismc/jwt-cpp/actions/runs/7481024827/job/20361722539?pr=33 ``` /usr/bin/ld: /usr/bin/ld: DWARF error: invalid or unhandled FORM value: 0x22 CMakeFiles/cmTC_ff7c6.dir/testCCompiler.c.o: in function `main': testCCompiler.c:(.text.main[main]+0x0): multiple definition of `main'; /usr/lib/llvm-14/lib/clang/14.0.0/lib/linux/libclang_rt.fuzzer-x86_64.a(FuzzerMain.cpp.o):(.text.main+0x0): first defined here /usr/bin/ld: /usr/lib/llvm-14/lib/clang/14.0.0/lib/linux/libclang_rt.fuzzer-x86_64.a(FuzzerMain.cpp.o): in function `main': (.text.main+0x12): undefined reference to `LLVMFuzzerTestOneInput' ``` * remove system name to disable cross compiling * tests do not pass clang-tidy * drop toolchain, use target specific flags * leave flags in cmake * missing deps + clean apt files * remove some code duplication * fix typo * devcontainers fix, test and add wolfssl refactored installer to have a script that could be reused * add missing build context * pass version to script * dont use bash syntax * fix typo * upload tar.gz for new releases * revert name to manually trigger it * Update and rename nuget.yml to release.yml * disable nuget for testing * add a zip as well * back to basics * remove remove testing code * update workflow name * enable testing needs to be in the root * add a test preset and use it in some workflows * fix linting tests * bump github actions * bump python setup * drop dev containers * dont install openssl on windows * revert merge conflicts * fix whitespace * fix private claims example to have a valid token Thalhammer#351 * put back versioned format I dont remember why, it looks like it was debugging
- Loading branch information
1 parent
0d03bc5
commit a6927cb
Showing
15 changed files
with
351 additions
and
80 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
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
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
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,10 @@ | ||
{ | ||
"recommendations": [ | ||
"ms-vscode.cpptools", | ||
"ms-vscode.cpptools-extension-pack", | ||
"ms-vscode.cmake-tools", | ||
"twxs.cmake", | ||
"matepek.vscode-catch2-test-adapter", | ||
"GitHub.vscode-github-actions" | ||
] | ||
} |
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,33 @@ | ||
{ | ||
"version": 6, | ||
"cmakeMinimumRequired": { | ||
"major": 3, | ||
"minor": 25, | ||
"patch": 0 | ||
}, | ||
"include": [ | ||
"example/CMakePresets.json", | ||
"tests/CMakePresets.json" | ||
], | ||
"configurePresets": [ | ||
{ | ||
"name": "dev", | ||
"displayName": "Development", | ||
"inherits": "debug", | ||
"environment": { | ||
"CMAKE_EXPORT_COMPILE_COMMANDS": "ON" | ||
}, | ||
"cacheVariables": { | ||
"JWT_BUILD_EXAMPLES": "ON", | ||
"JWT_BUILD_TESTS": "ON" | ||
} | ||
} | ||
], | ||
"buildPresets": [ | ||
{ | ||
"name": "dev", | ||
"configurePreset": "dev", | ||
"configuration": "Debug" | ||
} | ||
] | ||
} |
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, | ||
"cmakeMinimumRequired": { | ||
"major": 3, | ||
"minor": 25, | ||
"patch": 0 | ||
}, | ||
"configurePresets": [ | ||
{ | ||
"name": "default", | ||
"displayName": "Default Config", | ||
"hidden": true, | ||
"binaryDir": "${sourceDir}/build", | ||
"cacheVariables": { | ||
"JWT_BUILD_EXAMPLES": "OFF", | ||
"JWT_BUILD_TESTS": "OFF" | ||
} | ||
}, | ||
{ | ||
"name": "debug", | ||
"displayName": "Debug", | ||
"inherits": "default", | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "Debug" | ||
} | ||
}, | ||
{ | ||
"name": "release", | ||
"displayName": "Release", | ||
"inherits": "default", | ||
"cacheVariables": { | ||
"CMAKE_BUILD_TYPE": "Release" | ||
} | ||
} | ||
], | ||
"buildPresets": [ | ||
{ | ||
"name": "debug", | ||
"configurePreset": "debug", | ||
"configuration": "Debug" | ||
}, | ||
{ | ||
"name": "release", | ||
"configurePreset": "release", | ||
"configuration": "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
Oops, something went wrong.