jwt-cpp.yml 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596
  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. if: github.repository_owner == 'wolfssl'
  39. strategy:
  40. fail-fast: false
  41. matrix:
  42. config:
  43. - ref: 0.7.0
  44. runner: ubuntu-22.04
  45. - ref: 0.6.0
  46. runner: ubuntu-22.04
  47. name: ${{ matrix.config.ref }}
  48. runs-on: ${{ matrix.config.runner }}
  49. needs: build_wolfssl
  50. steps:
  51. - name: Install dependencies
  52. run: |
  53. # Don't prompt for anything
  54. export DEBIAN_FRONTEND=noninteractive
  55. sudo apt-get update
  56. sudo apt-get install libgtest-dev
  57. - name: Download lib
  58. uses: actions/download-artifact@v4
  59. with:
  60. name: wolf-install-jwt-cpp
  61. - name: untar build-dir
  62. run: tar -xf build-dir.tgz
  63. - name: Checkout OSP
  64. uses: actions/checkout@v4
  65. with:
  66. repository: wolfssl/osp
  67. path: osp
  68. - name: Checkout jwt-cpp
  69. uses: actions/checkout@v4
  70. with:
  71. repository: Thalhammer/jwt-cpp
  72. path: jwt-cpp
  73. ref: v${{ matrix.config.ref }}
  74. - name: Build pam-ipmi
  75. working-directory: jwt-cpp
  76. run: |
  77. patch -p1 < ../osp/jwt-cpp/${{ matrix.config.ref }}.patch
  78. PKG_CONFIG_PATH=$GITHUB_WORKSPACE/build-dir/lib/pkgconfig \
  79. cmake -B build -DJWT_SSL_LIBRARY:STRING=wolfSSL -DJWT_BUILD_TESTS=ON .
  80. make -j -C build
  81. ldd ./build/tests/jwt-cpp-test | grep wolfssl
  82. - name: Run jwt-cpp tests
  83. working-directory: jwt-cpp
  84. run: ./build/tests/jwt-cpp-test