Skip to content

Commit 7a708ac

Browse files
committed
Add github action to test wolfProvider with curl
1 parent ec27f8e commit 7a708ac

File tree

1 file changed

+122
-0
lines changed

1 file changed

+122
-0
lines changed

.github/workflows/curl.yml

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
name: Curl 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_wolfprovider:
17+
name: Build wolfProvider
18+
runs-on: ubuntu-22.04
19+
timeout-minutes: 20
20+
strategy:
21+
matrix:
22+
wolfssl_ref: [ 'master', 'v5.7.4-stable' ]
23+
steps:
24+
- name: Checkout wolfProvider
25+
uses: actions/checkout@v4
26+
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
55+
- name: Build wolfProvider
56+
if: steps.wolfprov-${{ matrix.wolfssl_ref }}-cache.hit != 'true'
57+
run: |
58+
WOLFSSL_TAG=${{ matrix.wolfssl_ref }} ./scripts/build-wolfprovider.sh
59+
make check
60+
61+
- name: Print errors
62+
if: ${{ failure() }}
63+
run: |
64+
if [ -f test-suite.log ] ; then
65+
cat test-suite.log
66+
fi
67+
68+
test_curl:
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+
curl_ref: [ 'master', 'curl-8_4_0' ]
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+
102+
- name: Install curl test dependencies
103+
run: |
104+
sudo apt-get update
105+
sudo apt-get install nghttp2 libpsl5 libpsl-dev python3-impacket
106+
107+
- name: Build curl
108+
uses: wolfSSL/actions-build-autotools-project@v1
109+
with:
110+
repository: curl/curl
111+
path: curl
112+
ref: ${{ matrix.curl_ref }}
113+
configure: --with-openssl=$GITHUB_WORKSPACE/openssl-install/
114+
check: false
115+
116+
- name: Test curl with wolfProvider
117+
working-directory: curl
118+
run: |
119+
export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/wolfssl-install/lib:$GITHUB_WORKSPACE/openssl-install/lib64
120+
export OPENSSL_CONF=$GITHUB_WORKSPACE/provider.conf
121+
export OPENSSL_MODULES=$GITHUB_WORKSPACE/wolfprov-install/lib
122+
make -j $(nproc) test-ci

0 commit comments

Comments
 (0)