@@ -13,17 +13,49 @@ concurrency:
1313# END OF COMMON SECTION
1414
1515jobs :
16- test_nginx :
17- runs-on : ubuntu-latest
18- # This should be a safe limit for the tests to run.
16+ build_wolfprovider :
17+ name : Build wolfProvider
18+ runs-on : ubuntu-22.04
1919 timeout-minutes : 20
20+ strategy :
21+ matrix :
22+ wolfssl_ref : [ 'master', 'v5.7.4-stable' ]
2023 steps :
2124 - name : Checkout wolfProvider
2225 uses : actions/checkout@v4
2326
27+ # Check if this version of wolfssl/wolfprovider has already been built,
28+ # mark to cache these items on post if we do end up building
29+ - name : Checking wolfSSL/wolfProvider in cache
30+ uses : actions/cache@v4
31+ id : wolfprov-cache
32+ with :
33+ path : |
34+ wolfssl-source
35+ wolfssl-install
36+ wolfprov-install
37+ provider.conf
38+
39+ key : wolfprov-${{ matrix.wolfssl_ref }}-${{ github.sha }}
40+ lookup-only : true
41+
42+ # If wolfssl/wolfprovider have not yet been built, pull ossl from cache
43+ - name : Checking OpenSSL in cache
44+ if : steps.wolfprov-${{ matrix.wolfssl_ref }}-cache.hit != 'true'
45+ uses : actions/cache@v4
46+ id : openssl-cache
47+ with :
48+ path : |
49+ openssl-source
50+ openssl-install
51+
52+ key : ossl-depends
53+
54+ # If not yet built this version, build it now
2455 - name : Build wolfProvider
56+ if : steps.wolfprov-${{ matrix.wolfssl_ref }}-cache.hit != 'true'
2557 run : |
26- OPENSSL_TAG=master WOLFSSL_TAG=master ./scripts/build-wolfprovider.sh
58+ WOLFSSL_TAG=${{ matrix.wolfssl_ref }} ./scripts/build-wolfprovider.sh
2759 make check
2860
2961 - name : Print errors
3365 cat test-suite.log
3466 fi
3567
68+ test_nginx :
69+ runs-on : ubuntu-22.04
70+ needs : build_wolfprovider
71+ # This should be a safe limit for the tests to run.
72+ timeout-minutes : 20
73+ strategy :
74+ matrix :
75+ nginx_ref : [ 'master', 'release-1.27.4' ]
76+ wolfssl_ref : [ 'master', 'v5.7.4-stable' ]
77+ steps :
78+ - name : Retrieving OpenSSL from cache
79+ uses : actions/cache/restore@v4
80+ id : openssl-cache
81+ with :
82+ path : |
83+ openssl-source
84+ openssl-install
85+
86+ key : ossl-depends
87+ fail-on-cache-miss : true
88+
89+ - name : Retrieving wolfSSL/wolfProvider from cache
90+ uses : actions/cache/restore@v4
91+ id : wolfprov-cache
92+ with :
93+ path : |
94+ wolfssl-source
95+ wolfssl-install
96+ wolfprov-install
97+ provider.conf
98+
99+ key : wolfprov-${{ matrix.wolfssl_ref }}-${{ github.sha }}
100+ fail-on-cache-miss : true
101+
36102 - name : Install nginx dependencies
37103 run : |
38104 sudo cpan -iT Proc::Find Net::SSLeay IO::Socket::SSL
42108 with :
43109 repository : nginx/nginx
44110 path : nginx
45- ref : release-1.27.4
111+ ref : ${{ matrix.nginx_ref }}
46112
47113 - name : Build nginx
48114 working-directory : nginx
63129 export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/wolfssl-install/lib:$GITHUB_WORKSPACE/openssl-install/lib64
64130 export OPENSSL_CONF=$GITHUB_WORKSPACE/provider.conf
65131 export OPENSSL_MODULES=$GITHUB_WORKSPACE/wolfprov-install/lib
66- TEST_NGINX_VERBOSE=y TEST_NGINX_CATLOG=y TEST_NGINX_BINARY=../nginx/objs/nginx prove -v .
132+ TEST_NGINX_VERBOSE=y TEST_NGINX_CATLOG=y TEST_NGINX_BINARY=../nginx/objs/nginx prove -v .
0 commit comments