ntp.yml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293
  1. name: ntp 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. 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-ntp
  34. path: build-dir.tgz
  35. retention-days: 5
  36. ntp_check:
  37. strategy:
  38. fail-fast: false
  39. matrix:
  40. # List of releases to test
  41. ref: [ 4.2.8p15 ]
  42. name: ${{ matrix.ref }}
  43. if: github.repository_owner == 'wolfssl'
  44. runs-on: ubuntu-22.04
  45. # This should be a safe limit for the tests to run.
  46. timeout-minutes: 10
  47. needs: build_wolfssl
  48. steps:
  49. - name: Download lib
  50. uses: actions/download-artifact@v4
  51. with:
  52. name: wolf-install-ntp
  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. # Avoid DoS'ing ntp site so cache the tar.gz
  61. - name: Check if we have ntp
  62. uses: actions/cache@v4
  63. id: cache
  64. with:
  65. path: ntp-${{ matrix.ref }}.tar.gz
  66. key: ntp-${{ matrix.ref }}.tar.gz
  67. - name: Download ntp
  68. if: steps.cache.outputs.cache-hit != 'true'
  69. run: |
  70. wget https://downloads.nwtime.org/ntp/4.2.8/ntp-${{ matrix.ref }}.tar.gz
  71. - name: Extract ntp
  72. run: |
  73. tar -xf ntp-${{ matrix.ref }}.tar.gz
  74. - name: Build and test ntp
  75. working-directory: ntp-${{ matrix.ref }}
  76. run: |
  77. patch -p1 < $GITHUB_WORKSPACE/osp/ntp/${{ matrix.ref }}/ntp-${{ matrix.ref }}.patch
  78. ./bootstrap
  79. ./configure --with-wolfssl=$GITHUB_WORKSPACE/build-dir
  80. make -j
  81. make -j check