1+ name : ntp Tests
2+
3+ # START OF COMMON SECTION
4+ on :
5+ push :
6+ branches : [ 'master', 'main', 'release/**' ]
7+ pull_request :
8+ branches : [ '*' ]
9+
10+ concurrency :
11+ group : ${{ github.workflow }}-${{ github.ref }}
12+ cancel-in-progress : true
13+ # END OF COMMON SECTION
14+
15+ jobs :
16+ build_wolfssl :
17+ name : Build wolfSSL
18+ # Just to keep it the same as the testing target
19+ runs-on : ubuntu-latest
20+ # This should be a safe limit for the tests to run.
21+ timeout-minutes : 4
22+ steps :
23+ - name : Build wolfSSL
24+ uses : wolfSSL/actions-build-autotools-project@v1
25+ with :
26+ path : wolfssl
27+ configure : --enable-all
28+ install : true
29+ check : false
30+
31+ - name : Upload built lib
32+ uses : actions/upload-artifact@v4
33+ with :
34+ name : wolf-install-ntp
35+ path : build-dir
36+ retention-days : 5
37+
38+ ntp_check :
39+ strategy :
40+ fail-fast : false
41+ matrix :
42+ # List of releases to test
43+ ref : [ 4.2.8p15 ]
44+ name : ${{ matrix.ref }}
45+ runs-on : ubuntu-latest
46+ # This should be a safe limit for the tests to run.
47+ timeout-minutes : 10
48+ needs : build_wolfssl
49+ steps :
50+ - name : Download lib
51+ uses : actions/download-artifact@v4
52+ with :
53+ name : wolf-install-ntp
54+ path : build-dir
55+
56+ - name : Checkout OSP
57+ uses : actions/checkout@v4
58+ with :
59+ repository : wolfssl/osp
60+ path : osp
61+
62+ # Avoid DoS'ing ntp site so cache the tar.gz
63+ - name : Check if we have ntp
64+ uses : actions/cache@v4
65+ id : cache
66+ with :
67+ path : ntp-${{ matrix.ref }}.tar.gz
68+ key : ntp-${{ matrix.ref }}.tar.gz
69+
70+ - name : Download ntp
71+ if : steps.cache.outputs.cache-hit != 'true'
72+ run : |
73+ wget https://downloads.nwtime.org/ntp/4.2.8/ntp-${{ matrix.ref }}.tar.gz
74+
75+ - name : Extract ntp
76+ run : |
77+ tar -xf ntp-${{ matrix.ref }}.tar.gz
78+
79+ - name : Build and test ntp
80+ working-directory : ntp-${{ matrix.ref }}
81+ run : |
82+ patch -p1 < $GITHUB_WORKSPACE/osp/ntp/${{ matrix.ref }}/ntp-${{ matrix.ref }}.patch
83+ ./bootstrap
84+ ./configure --with-wolfssl=$GITHUB_WORKSPACE/build-dir
85+ make -j
86+ make -j check
87+
0 commit comments