krb5.yml 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. name: Kerberos 5 Tests
  2. on:
  3. workflow_call:
  4. jobs:
  5. build_wolfssl:
  6. name: Build wolfSSL
  7. # Just to keep it the same as the testing target
  8. runs-on: ubuntu-latest
  9. # This should be a safe limit for the tests to run.
  10. timeout-minutes: 5
  11. steps:
  12. - name: Build wolfSSL
  13. uses: wolfSSL/actions-build-autotools-project@v1
  14. with:
  15. path: wolfssl
  16. configure: --enable-krb CFLAGS='-fsanitize=address'
  17. install: true
  18. - name: Upload built lib
  19. uses: actions/upload-artifact@v3
  20. with:
  21. name: wolf-install-krb5
  22. path: build-dir
  23. retention-days: 1
  24. krb5_check:
  25. strategy:
  26. fail-fast: false
  27. matrix:
  28. # List of releases to test
  29. ref: [ 1.21.1 ]
  30. name: ${{ matrix.ref }}
  31. runs-on: ubuntu-latest
  32. # This should be a safe limit for the tests to run.
  33. timeout-minutes: 8
  34. needs: build_wolfssl
  35. steps:
  36. - name: Download lib
  37. uses: actions/download-artifact@v3
  38. with:
  39. name: wolf-install-krb5
  40. path: build-dir
  41. - name: Checkout OSP
  42. uses: actions/checkout@v3
  43. with:
  44. repository: wolfssl/osp
  45. path: osp
  46. - name: Checkout krb5
  47. uses: actions/checkout@v3
  48. with:
  49. repository: krb5/krb5
  50. ref: krb5-${{ matrix.ref }}-final
  51. path: krb5
  52. - name: Apply patch
  53. working-directory: ./krb5
  54. run: |
  55. patch -p1 < $GITHUB_WORKSPACE/osp/krb5/Patch-for-Kerberos-5-${{ matrix.ref }}.patch
  56. - name: Build krb5
  57. working-directory: ./krb5/src
  58. run: |
  59. autoreconf -ivf
  60. # Using rpath because LD_LIBRARY_PATH is overwritten during testing
  61. export WOLFSSL_CFLAGS="-I$GITHUB_WORKSPACE/build-dir/include -I$GITHUB_WORKSPACE/build-dir/include/wolfssl -Wl,-rpath=$GITHUB_WORKSPACE/build-dir/lib"
  62. export WOLFSSL_LIBS="-lwolfssl -L$GITHUB_WORKSPACE/build-dir/lib -Wl,-rpath=$GITHUB_WORKSPACE/build-dir/lib"
  63. ./configure --with-crypto-impl=wolfssl --with-tls-impl=wolfssl --disable-pkinit \
  64. CFLAGS='-fsanitize=address' LDFLAGS='-fsanitize=address'
  65. CFLAGS='-fsanitize=address' LDFLAGS='-fsanitize=address' make -j
  66. - name: Run tests
  67. working-directory: ./krb5/src
  68. run: |
  69. CFLAGS='-fsanitize=address' LDFLAGS='-fsanitize=address' make -j check