Files
jwt-cpp/.github/workflows/traits.yml
Chris Mc 5c9787ebca 🚢 Provide trait implementation for supported JSON libraries (#193)
* quick poc for Thalhammer#174

* Copy paste

* Rename include/jwt-cpp/traits/traits.h to include/jwt-cpp/traits/danielaparker-jsoncons/traits.h

* Create traits.h

* adding a namespace

* mustache + action to automate defaults generation

since they should always be the same

* fix order

* traits tests should use traits

* playing with header order

to make clang happy

* install all possible traits 

switch badge name to sha

* Update CMakeLists.txt

* Update traits.h

* try commenting corrected code

* rm typescript

* make sure to implace edit

* dont comment when no diff

* apply linting

* fixup boost-json traits

* move comment and render to composite action

* actions/github-script does not leave context in the usual spot

* enabled globstar

* make sure to forward inputs

* try using env normally

* fix typo

* pass in linter name correctly

* debug print

* fix linting issues

* more debug printing

* fix linting issues

* fix typpo + more rebug print

* apply linting

* more debug

* try npm install global to be less intrusive

* wip render traits tests

* Update lint.yml

* global install does not work

* Update action.yml

* Update defaults.h

* remove nodejs action poc

* include jsoncons in main test application (for coverage of new files)

* do not exclude json (since it's used by all the traits)

* exclude bundled json libraries

* apply linting

* add jsoncons for coverage testing

* jsoncons set default to a viable version

* exploring ci failure

* Revert "exploring ci failure" it's overlapping symbols

This reverts commit 3d5b7f9f5d4f393f03b84a59557fecdee833c822.

* add missing specialization

* be explicit with the tests

* Create CMakeLists.txt

* Create danielaparker-jsoncons.cpp

* Update lint.yml

* Update traits.yml

* lint

* better access too decoded claims

* more tests on verify

* tweak test

trying to find minimum

* lets enable linting tests

* using env impl for github script

* fix typo

* apply linting

* add boost to the tests (very hacky)

* Update lint.yml

* ceate light boost installer

there is no cmake install anymore so just a blanket copy should do

* remove path requirement

* outline for commit and push linting on comment

* try different webhook target

* more event types

* fix if for more event types

* just a test commit

* Update lint.yml

* Update lint.yml

* Update lint.yml

* Apply automatic changes

* add token

* screw up formatting

* Update lint.yml

* Update lint.yml

* Apply automatic changes

* fix merge conflicts

* missing errors

* playing with globbing

* lint issues

* matrix on comment should give many pushes

* Apply automatic changes

* Update lint.yml

* Apply automatic changes

* Apply automatic changes

* fix rebase

* apply render tests

* Apply automatic changes

* Apply automatic changes

* Delete package-lock.json

* fail linting

* Update .gitignore

* Update lint.yml

* Update lint.yml

* Update lint.yml

* Apply automatic changes

* Update lint.yml

* Update CMakeLists.txt

* refactor boost.json inclusion

- find paths
- compile library
- code coverage
- traits example

* Apply automatic changes

* debug log

* Update action.yml

* debug output

* Update action.yml

* Delete private-boost-json.cpp.in

* Update private-find-boost-json.cmake

* Update CMakeLists.txt

* Update CMakeLists.txt

* Create CMakeLists.txt

* Update boost-json.cpp

* Update boost-json.cpp

* Update boost-json.cpp

* Update boost-json.cpp

* remove old boost tests

* examples to include traits

* fix compilation

* test nlohmann json traits

* linting

* refactor traits to make badges

* try with less expression syntax

* trying single quotes

* advertise traits support

* Update lint.yml

* Update lint.yml

* Update lint.yml

* sync (prince-chrismc/jwt-cpp#16)

* 🔧 Replace RSA related deprecated functions (#189)

* RSA_size() --> EVP_PKEY_size()

* getting rid of deprecated functions in rsa-pss signature creation

* getting rid of deprecated functions in rsa-pss signature verification

* generate_hash not used in pss

* Update lint.yml

* Update lint.yml

* Update lint.yml

Co-authored-by: Marek Klein <kleinmrk@gmail.com>

* Update lint.yml

* make sure to use install `nlohmann-json`

* make action folder match trait names

* add example + badge for kazuho-picojson

* link to new examples

* revert debug code

* dont mix matrix with uses

* fix bad copy paste

* spec interface library so it's no compiled

* fix installer

* fix to interface

* fix example

* attempt 2

* make sure to avoid circular reference

* attempt 3

* white space

* white space

* Update and rename .github/actions/comment-linting/action.yml to .github/actions/process-linting-results/action.yml

* Update lint.yml

* Update action.yml

* Update action.yml

* Update README.md

Co-authored-by: prince-chrismc <prince-chrismc@users.noreply.github.com>
Co-authored-by: Marek Klein <kleinmrk@gmail.com>
2022-01-17 14:05:01 -08:00

82 lines
2.5 KiB
YAML

name: Traits CI
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
traits:
name: Traits (${{ matrix.target.name }})
runs-on: ubuntu-latest
strategy:
matrix:
target:
- { name: "danielaparker-jsoncons", tag: "0.167.1", version: "v0.167.1" }
- { name: "boost-json", tag: "1.77.0", version: "v1.77.0" }
- { name: "nlohmann-json", tag: "3.10.4", version: "v3.10.4" }
- { name: "kazuho-picojson", tag: "111c9be5188f7350c2eac9ddaedd8cca3d7bf394", version: "111c9be" }
steps:
- uses: actions/checkout@v2
- uses: lukka/get-cmake@latest
- name: setup
run: |
mkdir build
cd build
cmake .. -DJWT_BUILD_EXAMPLES=OFF
sudo cmake --install .
# Install the JSON library
- if: matrix.target.name == 'danielaparker-jsoncons'
uses: ./.github/actions/install/danielaparker-jsoncons
with:
version: ${{matrix.target.tag}}
- if: matrix.target.name == 'boost-json'
uses: ./.github/actions/install/boost-json
with:
version: ${{matrix.target.tag}}
- if: matrix.target.name == 'nlohmann-json'
run: rm -rf include/nlohmann
- if: matrix.target.name == 'nlohmann-json'
uses: ./.github/actions/install/nlohmann-json
with:
version: ${{matrix.target.tag}}
- if: matrix.target.name == 'kazuho-picojson'
run: rm -rf include/picojson
- if: matrix.target.name == 'kazuho-picojson'
uses: ./.github/actions/install/kazuho-picojson
with:
version: ${{matrix.target.tag}}
- name: test
working-directory: example/traits
run: |
cmake . -DCMAKE_FIND_DEBUG_MODE=1
cmake --build . --target ${{ matrix.target.name }}
./${{ matrix.target.name }}
- name: badge success
if: github.event_name == 'push' && success()
uses: ./.github/actions/badge
with:
category: traits
label: ${{ matrix.target.name }}
message: ${{ matrix.target.version }}
color: lightblue # turquoise
- if: github.event_name == 'push' && success()
uses: ./.github/actions/badge/publish
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: badge failure
if: github.event_name == 'push' && !success()
uses: ./.github/actions/badge/failure
with:
category: traits
label: ${{ matrix.target.name }}
github_token: ${{ secrets.GITHUB_TOKEN }}