cyrus-sasl.yml 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103
  1. name: cyrus-sasl 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: 4
  19. steps:
  20. - name: Build wolfSSL
  21. uses: wolfSSL/actions-build-autotools-project@v1
  22. with:
  23. path: wolfssl
  24. configure: --enable-all
  25. install: true
  26. # Don't run tests as this config is tested in many other places
  27. check: false
  28. - name: tar build-dir
  29. run: tar -zcf build-dir.tgz build-dir
  30. - name: Upload built lib
  31. uses: actions/upload-artifact@v4
  32. with:
  33. name: wolf-install-sasl
  34. path: build-dir.tgz
  35. retention-days: 5
  36. sasl_check:
  37. strategy:
  38. fail-fast: false
  39. matrix:
  40. # List of releases to test
  41. ref: [ 2.1.28 ]
  42. name: ${{ matrix.ref }}
  43. runs-on: ubuntu-latest
  44. # This should be a safe limit for the tests to run.
  45. timeout-minutes: 4
  46. needs: build_wolfssl
  47. steps:
  48. - name: Install dependencies
  49. run: |
  50. # Don't prompt for anything
  51. export DEBIAN_FRONTEND=noninteractive
  52. sudo apt-get update
  53. sudo apt-get install krb5-kdc krb5-otp libkrb5-dev \
  54. libsocket-wrapper libnss-wrapper krb5-admin-server libdb5.3-dev
  55. - name: Download lib
  56. uses: actions/download-artifact@v4
  57. with:
  58. name: wolf-install-sasl
  59. - name: untar build-dir
  60. run: tar -xf build-dir.tgz
  61. - name: Checkout OSP
  62. uses: actions/checkout@v4
  63. with:
  64. repository: wolfssl/osp
  65. path: osp
  66. - name: Checkout sasl
  67. uses: actions/checkout@v4
  68. with:
  69. repository: cyrusimap/cyrus-sasl
  70. ref: cyrus-sasl-${{ matrix.ref }}
  71. path: sasl
  72. - name: Build cyrus-sasl
  73. working-directory: sasl
  74. run: |
  75. patch -p1 < $GITHUB_WORKSPACE/osp/cyrus-sasl/${{ matrix.ref }}/${{ matrix.ref }}.patch
  76. autoreconf -ivf
  77. ./configure --with-openssl=no --with-wolfssl=$GITHUB_WORKSPACE/build-dir --with-dblib=berkeley --disable-shared
  78. # Need to run 'make' twice with '--disable-shared' for some reason
  79. make -j || make -j
  80. - name: Run testsuite
  81. working-directory: sasl
  82. run: |
  83. make -j -C utils testsuite saslpasswd2
  84. # Retry up to five times
  85. for i in {1..5}; do
  86. TEST_RES=0
  87. $GITHUB_WORKSPACE/osp/cyrus-sasl/${{ matrix.ref }}/run-tests.sh || TEST_RES=$?
  88. if [ "$TEST_RES" -eq "0" ]; then
  89. break
  90. fi
  91. done