jwt-cpp.yml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. name: jwt-cpp Tests
  2. # START OF COMMON SECTION
  3. on:
  4. push:
  5. branches: [ 'master', 'main', 'release/**' ]
  6. pull_request:
  7. branches: [ '*' ]
  8. concurrency:
  9. group: ${{ github.workflow }}-${{ github.ref }}
  10. cancel-in-progress: true
  11. # END OF COMMON SECTION
  12. jobs:
  13. build_wolfssl:
  14. name: Build wolfSSL
  15. # Just to keep it the same as the testing target
  16. runs-on: ubuntu-latest
  17. # This should be a safe limit for the tests to run.
  18. timeout-minutes: 4
  19. steps:
  20. - name: Build wolfSSL
  21. uses: wolfSSL/actions-build-autotools-project@v1
  22. with:
  23. path: wolfssl
  24. configure: --enable-all
  25. install: true
  26. # Don't run tests as this config is tested in many other places
  27. check: false
  28. - name: Upload built lib
  29. uses: actions/upload-artifact@v4
  30. with:
  31. name: wolf-install-jwt-cpp
  32. path: build-dir
  33. retention-days: 5
  34. build_pam-ipmi:
  35. strategy:
  36. fail-fast: false
  37. matrix:
  38. ref: [ 0.6.0 ]
  39. name: ${{ matrix.ref }}
  40. runs-on: ubuntu-latest
  41. needs: build_wolfssl
  42. steps:
  43. - name: Install dependencies
  44. run: |
  45. # Don't prompt for anything
  46. export DEBIAN_FRONTEND=noninteractive
  47. sudo apt-get update
  48. sudo apt-get install libgtest-dev
  49. - name: Download lib
  50. uses: actions/download-artifact@v4
  51. with:
  52. name: wolf-install-jwt-cpp
  53. path: build-dir
  54. - name: Checkout OSP
  55. uses: actions/checkout@v4
  56. with:
  57. repository: wolfssl/osp
  58. path: osp
  59. - name: Checkout jwt-cpp
  60. uses: actions/checkout@v4
  61. with:
  62. repository: Thalhammer/jwt-cpp
  63. path: jwt-cpp
  64. ref: v${{ matrix.ref }}
  65. - name: Build pam-ipmi
  66. working-directory: jwt-cpp
  67. run: |
  68. patch -p1 < ../osp/jwt-cpp/${{ matrix.ref }}.patch
  69. PKG_CONFIG_PATH=$GITHUB_WORKSPACE/build-dir/lib/pkgconfig \
  70. cmake -B build -DJWT_SSL_LIBRARY:STRING=wolfSSL -DJWT_BUILD_TESTS=ON .
  71. make -j -C build
  72. ldd ./build/tests/jwt-cpp-test | grep wolfssl
  73. - name: Run jwt-cpp tests
  74. working-directory: jwt-cpp
  75. run: ./build/tests/jwt-cpp-test