2
0

krb5.yml 3.0 KB

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