jwt-cpp.yml 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  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. if: github.repository_owner == 'wolfssl'
  17. runs-on: ubuntu-22.04
  18. # This should be a safe limit for the tests to run.
  19. timeout-minutes: 4
  20. steps:
  21. - name: Build wolfSSL
  22. uses: wolfSSL/actions-build-autotools-project@v1
  23. with:
  24. path: wolfssl
  25. configure: --enable-all
  26. install: true
  27. # Don't run tests as this config is tested in many other places
  28. check: false
  29. - name: tar build-dir
  30. run: tar -zcf build-dir.tgz build-dir
  31. - name: Upload built lib
  32. uses: actions/upload-artifact@v4
  33. with:
  34. name: wolf-install-jwt-cpp
  35. path: build-dir.tgz
  36. retention-days: 5
  37. build_pam-ipmi:
  38. strategy:
  39. fail-fast: false
  40. matrix:
  41. ref: [ 0.6.0 ]
  42. name: ${{ matrix.ref }}
  43. if: github.repository_owner == 'wolfssl'
  44. runs-on: ubuntu-22.04
  45. needs: build_wolfssl
  46. steps:
  47. - name: Install dependencies
  48. run: |
  49. # Don't prompt for anything
  50. export DEBIAN_FRONTEND=noninteractive
  51. sudo apt-get update
  52. sudo apt-get install libgtest-dev
  53. - name: Download lib
  54. uses: actions/download-artifact@v4
  55. with:
  56. name: wolf-install-jwt-cpp
  57. - name: untar build-dir
  58. run: tar -xf build-dir.tgz
  59. - name: Checkout OSP
  60. uses: actions/checkout@v4
  61. with:
  62. repository: wolfssl/osp
  63. path: osp
  64. - name: Checkout jwt-cpp
  65. uses: actions/checkout@v4
  66. with:
  67. repository: Thalhammer/jwt-cpp
  68. path: jwt-cpp
  69. ref: v${{ matrix.ref }}
  70. - name: Build pam-ipmi
  71. working-directory: jwt-cpp
  72. run: |
  73. patch -p1 < ../osp/jwt-cpp/${{ matrix.ref }}.patch
  74. PKG_CONFIG_PATH=$GITHUB_WORKSPACE/build-dir/lib/pkgconfig \
  75. cmake -B build -DJWT_SSL_LIBRARY:STRING=wolfSSL -DJWT_BUILD_TESTS=ON .
  76. make -j -C build
  77. ldd ./build/tests/jwt-cpp-test | grep wolfssl
  78. - name: Run jwt-cpp tests
  79. working-directory: jwt-cpp
  80. run: ./build/tests/jwt-cpp-test