2
0

mosquitto.yml 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
  1. name: mosquitto 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. if: github.repository_owner == 'wolfssl'
  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-mosquitto CFLAGS="-DALLOW_INVALID_CERTSIGN"
  26. install: true
  27. - name: tar build-dir
  28. run: tar -zcf build-dir.tgz build-dir
  29. - name: Upload built lib
  30. uses: actions/upload-artifact@v4
  31. with:
  32. name: wolf-install-mosquitto
  33. path: build-dir.tgz
  34. retention-days: 5
  35. mosquitto_check:
  36. strategy:
  37. fail-fast: false
  38. matrix:
  39. ref: [ 2.0.18 ]
  40. name: ${{ matrix.ref }}
  41. if: github.repository_owner == 'wolfssl'
  42. runs-on: ubuntu-22.04
  43. # This should be a safe limit for the tests to run.
  44. timeout-minutes: 4
  45. needs: build_wolfssl
  46. steps:
  47. - name: Download lib
  48. uses: actions/download-artifact@v4
  49. with:
  50. name: wolf-install-mosquitto
  51. - name: untar build-dir
  52. run: tar -xf build-dir.tgz
  53. - name: Checkout OSP
  54. uses: actions/checkout@v4
  55. with:
  56. repository: wolfssl/osp
  57. path: osp
  58. - name: Install dependencies
  59. run: |
  60. export DEBIAN_FRONTEND=noninteractive
  61. sudo apt-get update
  62. sudo apt-get install -y build-essential libev-dev libssl-dev automake python3-docutils libcunit1 libcunit1-doc libcunit1-dev pkg-config make python3-psutil
  63. - name: Checkout mosquitto
  64. uses: actions/checkout@v4
  65. with:
  66. repository: eclipse/mosquitto
  67. ref: v${{ matrix.ref }}
  68. path: mosquitto
  69. - name: Configure and build mosquitto
  70. run: |
  71. cd $GITHUB_WORKSPACE/mosquitto/
  72. patch -p1 < $GITHUB_WORKSPACE/osp/mosquitto/${{ matrix.ref }}.patch
  73. make WITH_TLS=wolfssl WITH_CJSON=no WITH_DOCS=no WOLFSSLDIR=$GITHUB_WORKSPACE/build-dir
  74. - name: Run mosquitto tests
  75. working-directory: ./mosquitto
  76. run: |
  77. # Retry up to five times
  78. for i in {1..5}; do
  79. TEST_RES=0
  80. make WITH_TLS=wolfssl WITH_CJSON=no WITH_DOCS=no WOLFSSLDIR=$GITHUB_WORKSPACE/build-dir ptest || TEST_RES=$?
  81. if [ "$TEST_RES" -eq "0" ]; then
  82. break
  83. fi
  84. done
  85. if [ "$TEST_RES" -ne "0" ]; then
  86. exit $TEST_RES
  87. fi