2
0

cyrus-sasl.yml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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. if: github.repository_owner == 'wolfssl'
  16. # Just to keep it the same as the testing target
  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-sasl
  35. path: build-dir.tgz
  36. retention-days: 5
  37. sasl_check:
  38. strategy:
  39. fail-fast: false
  40. matrix:
  41. # List of releases to test
  42. ref: [ 2.1.28 ]
  43. name: ${{ matrix.ref }}
  44. if: github.repository_owner == 'wolfssl'
  45. runs-on: ubuntu-22.04
  46. # This should be a safe limit for the tests to run.
  47. timeout-minutes: 4
  48. needs: build_wolfssl
  49. steps:
  50. - name: Install dependencies
  51. run: |
  52. # Don't prompt for anything
  53. export DEBIAN_FRONTEND=noninteractive
  54. sudo apt-get update
  55. sudo apt-get install krb5-kdc krb5-otp libkrb5-dev \
  56. libsocket-wrapper libnss-wrapper krb5-admin-server libdb5.3-dev
  57. - name: Download lib
  58. uses: actions/download-artifact@v4
  59. with:
  60. name: wolf-install-sasl
  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 sasl
  69. uses: actions/checkout@v4
  70. with:
  71. repository: cyrusimap/cyrus-sasl
  72. ref: cyrus-sasl-${{ matrix.ref }}
  73. path: sasl
  74. - name: Build cyrus-sasl
  75. working-directory: sasl
  76. run: |
  77. patch -p1 < $GITHUB_WORKSPACE/osp/cyrus-sasl/${{ matrix.ref }}/${{ matrix.ref }}.patch
  78. autoreconf -ivf
  79. ./configure --with-openssl=no --with-wolfssl=$GITHUB_WORKSPACE/build-dir --with-dblib=berkeley --disable-shared
  80. # Need to run 'make' twice with '--disable-shared' for some reason
  81. make -j || make -j
  82. - name: Run testsuite
  83. working-directory: sasl
  84. run: |
  85. make -j -C utils testsuite saslpasswd2
  86. # Retry up to five times
  87. for i in {1..5}; do
  88. TEST_RES=0
  89. $GITHUB_WORKSPACE/osp/cyrus-sasl/${{ matrix.ref }}/run-tests.sh || TEST_RES=$?
  90. if [ "$TEST_RES" -eq "0" ]; then
  91. break
  92. fi
  93. done