ntp.yml 2.3 KB

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