mirror of
https://github.com/allankoechke/jwt-cpp.git
synced 2026-11-30 10:18:40 +00:00
🔧 Improved CMake options and macros to prevent collisions (#109)
* exclude any folder prefixed with build * seeing how far generator expresstion will go * refactor cmake + outline some tests * adding missing install destiniation * rolling back some changes since the workflow was no support by CMake * adding missing include * fixing old variable names being used * using target_compile_definitions instead of options * correct options for CI + reporting errors for consumer * using sudo to install * fix bad variable * trying CMAKE_PREFIX_PATH * removing recursive call * remove options from generators + dedicated exports target * remove pthread link lib (unused) * install targets files + include * add missing main * remove install prefix * revive CMAKE_PREFIX_PATH it's really needed * fix collision on DISABLE_BASE64 + more cmake tests * bump cmake version + test minimum * fix job names * fix bad replace * fix bad permissions * fix install of picojson * adding missing ifndef and overload for pico and no base64 * linting * test for version * trying to find version * [test] remove semver prerelase from CMake * fixing some documentation issues * limit cmake test to only related files * touch up docs * making sure new helper supports no base64 mode * some doc fixes * Update cmake.yml * Update .github/workflows/cmake.yml * Update .gitignore
This commit is contained in:
77
.github/workflows/cmake.yml
vendored
Normal file
77
.github/workflows/cmake.yml
vendored
Normal file
@@ -0,0 +1,77 @@
|
||||
name: CMake Integration CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
paths:
|
||||
- 'CMakeLists.txt'
|
||||
- 'include/jwt-cpp/**'
|
||||
- 'tests/cmake/**'
|
||||
- '.github/workflows/cmake.yml'
|
||||
|
||||
jobs:
|
||||
min-req:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: install cmake
|
||||
run: |
|
||||
wget https://cmake.org/files/v3.8/cmake-3.8.2.tar.gz
|
||||
tar -zxf cmake-3.8.2.tar.gz
|
||||
cd cmake-3.8.2
|
||||
./bootstrap && make -j $(nproc) && sudo make install
|
||||
|
||||
- name: setup
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DJWT_BUILD_EXAMPLES=OFF
|
||||
sudo make install
|
||||
|
||||
- name: test
|
||||
run: |
|
||||
cd tests/cmake
|
||||
cmake . -DCMAKE_PREFIX_PATH=/usr/local/cmake -DTEST:STRING="defaults-enabled"
|
||||
cmake --build .
|
||||
|
||||
no-pico:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: install cmake
|
||||
uses: lukka/get-cmake@latest
|
||||
|
||||
- name: setup
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DJWT_DISABLE_PICOJSON=ON -DJWT_BUILD_EXAMPLES=OFF
|
||||
sudo make install
|
||||
|
||||
- name: test
|
||||
run: |
|
||||
cd tests/cmake
|
||||
cmake . -DCMAKE_PREFIX_PATH=/usr/local/cmake -DTEST:STRING="picojson-is-disabled"
|
||||
cmake --build .
|
||||
|
||||
no-base64:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: install cmake
|
||||
uses: lukka/get-cmake@latest
|
||||
|
||||
- name: setup
|
||||
run: |
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DJWT_DISABLE_BASE64=ON -DJWT_BUILD_EXAMPLES=OFF
|
||||
sudo make install
|
||||
|
||||
- name: test
|
||||
run: |
|
||||
cd tests/cmake
|
||||
cmake . -DCMAKE_PREFIX_PATH=/usr/local/cmake -DTEST:STRING="base64-is-disabled"
|
||||
cmake --build .
|
||||
6
.github/workflows/coverage.yml
vendored
6
.github/workflows/coverage.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: C/C++ CI
|
||||
name: Coverage CI
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -15,7 +15,7 @@ jobs:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- name: install cmake
|
||||
uses: lukka/get-cmake@v3.17.2
|
||||
uses: lukka/get-cmake@latest
|
||||
|
||||
- name: configure
|
||||
run: |
|
||||
@@ -27,7 +27,7 @@ jobs:
|
||||
sudo ln -s /usr/src/gtest/libgtest_main.a /usr/lib/libgtest_main.a
|
||||
mkdir build
|
||||
cd build
|
||||
cmake .. -DBUILD_TESTS=ON -DCOVERAGE=ON -DCMAKE_BUILD_TYPE=Debug
|
||||
cmake .. -DJWT_BUILD_TESTS=ON -DJWT_ENABLE_COVERAGE=ON -DCMAKE_BUILD_TYPE=Debug
|
||||
|
||||
- name: make
|
||||
run: cd build && make jwt-cpp-test coverage
|
||||
|
||||
Reference in New Issue
Block a user