jwt-cpp.yml 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  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: tar build-dir
  29. run: tar -zcf build-dir.tgz build-dir
  30. - name: Upload built lib
  31. uses: actions/upload-artifact@v4
  32. with:
  33. name: wolf-install-jwt-cpp
  34. path: build-dir.tgz
  35. retention-days: 5
  36. build_pam-ipmi:
  37. strategy:
  38. fail-fast: false
  39. matrix:
  40. ref: [ 0.6.0 ]
  41. name: ${{ matrix.ref }}
  42. runs-on: ubuntu-latest
  43. needs: build_wolfssl
  44. steps:
  45. - name: Install dependencies
  46. run: |
  47. # Don't prompt for anything
  48. export DEBIAN_FRONTEND=noninteractive
  49. sudo apt-get update
  50. sudo apt-get install libgtest-dev
  51. - name: Download lib
  52. uses: actions/download-artifact@v4
  53. with:
  54. name: wolf-install-jwt-cpp
  55. - name: untar build-dir
  56. run: tar -xf build-dir.tgz
  57. - name: Checkout OSP
  58. uses: actions/checkout@v4
  59. with:
  60. repository: wolfssl/osp
  61. path: osp
  62. - name: Checkout jwt-cpp
  63. uses: actions/checkout@v4
  64. with:
  65. repository: Thalhammer/jwt-cpp
  66. path: jwt-cpp
  67. ref: v${{ matrix.ref }}
  68. - name: Build pam-ipmi
  69. working-directory: jwt-cpp
  70. run: |
  71. patch -p1 < ../osp/jwt-cpp/${{ matrix.ref }}.patch
  72. PKG_CONFIG_PATH=$GITHUB_WORKSPACE/build-dir/lib/pkgconfig \
  73. cmake -B build -DJWT_SSL_LIBRARY:STRING=wolfSSL -DJWT_BUILD_TESTS=ON .
  74. make -j -C build
  75. ldd ./build/tests/jwt-cpp-test | grep wolfssl
  76. - name: Run jwt-cpp tests
  77. working-directory: jwt-cpp
  78. run: ./build/tests/jwt-cpp-test