krb5.yml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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: workaround high-entropy ASLR
  13. # not needed after either an update to llvm or runner is done
  14. run: sudo sysctl vm.mmap_rnd_bits=28
  15. - name: Build wolfSSL
  16. uses: wolfSSL/actions-build-autotools-project@v1
  17. with:
  18. path: wolfssl
  19. configure: --enable-krb CC='gcc -fsanitize=address'
  20. install: true
  21. - name: Upload built lib
  22. uses: actions/upload-artifact@v4
  23. with:
  24. name: wolf-install-krb5
  25. path: build-dir
  26. retention-days: 5
  27. krb5_check:
  28. strategy:
  29. fail-fast: false
  30. matrix:
  31. # List of releases to test
  32. ref: [ 1.21.1 ]
  33. name: ${{ matrix.ref }}
  34. runs-on: ubuntu-latest
  35. # This should be a safe limit for the tests to run.
  36. timeout-minutes: 8
  37. needs: build_wolfssl
  38. steps:
  39. - name: Download lib
  40. uses: actions/download-artifact@v4
  41. with:
  42. name: wolf-install-krb5
  43. path: build-dir
  44. - name: Checkout OSP
  45. uses: actions/checkout@v4
  46. with:
  47. repository: wolfssl/osp
  48. path: osp
  49. - name: Checkout krb5
  50. uses: actions/checkout@v4
  51. with:
  52. repository: krb5/krb5
  53. ref: krb5-${{ matrix.ref }}-final
  54. path: krb5
  55. - name: Apply patch
  56. working-directory: ./krb5
  57. run: |
  58. patch -p1 < $GITHUB_WORKSPACE/osp/krb5/Patch-for-Kerberos-5-${{ matrix.ref }}.patch
  59. - name: workaround high-entropy ASLR
  60. # not needed after either an update to llvm or runner is done
  61. run: sudo sysctl vm.mmap_rnd_bits=28
  62. - name: Build krb5
  63. working-directory: ./krb5/src
  64. run: |
  65. autoreconf -ivf
  66. # Using rpath because LD_LIBRARY_PATH is overwritten during testing
  67. export WOLFSSL_CFLAGS="-I$GITHUB_WORKSPACE/build-dir/include -I$GITHUB_WORKSPACE/build-dir/include/wolfssl -Wl,-rpath=$GITHUB_WORKSPACE/build-dir/lib"
  68. export WOLFSSL_LIBS="-lwolfssl -L$GITHUB_WORKSPACE/build-dir/lib -Wl,-rpath=$GITHUB_WORKSPACE/build-dir/lib"
  69. ./configure --with-crypto-impl=wolfssl --with-tls-impl=wolfssl --disable-pkinit \
  70. CFLAGS='-fsanitize=address' LDFLAGS='-fsanitize=address'
  71. CFLAGS='-fsanitize=address' LDFLAGS='-fsanitize=address' make -j
  72. - name: Run tests
  73. working-directory: ./krb5/src
  74. run: |
  75. CFLAGS='-fsanitize=address' LDFLAGS='-fsanitize=address' make -j check