Skip to content

Commit f6e4815

Browse files
committed
Add openssh workflow
1 parent eeab709 commit f6e4815

File tree

1 file changed

+122
-0
lines changed

1 file changed

+122
-0
lines changed

.github/workflows/openssh.yml

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
name: openssh 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+
key: wolfprov-${{ matrix.wolfssl_ref }}-${{ github.sha }}
39+
lookup-only: true
40+
41+
# If wolfssl/wolfprovider have not yet been built, pull ossl from cache
42+
- name: Checking OpenSSL in cache
43+
if: steps.wolfprov-${{ matrix.wolfssl_ref }}-cache.hit != 'true'
44+
uses: actions/cache@v4
45+
id: openssl-cache
46+
with:
47+
path: |
48+
openssl-source
49+
openssl-install
50+
key: ossl-depends
51+
52+
# If not yet built this version, build it now
53+
- name: Build wolfProvider
54+
if: steps.wolfprov-${{ matrix.wolfssl_ref }}-cache.hit != 'true'
55+
run: |
56+
WOLFSSL_TAG=${{ matrix.wolfssl_ref }} ./scripts/build-wolfprovider.sh
57+
- name: Print errors
58+
if: ${{ failure() }}
59+
run: |
60+
if [ -f test-suite.log ] ; then
61+
cat test-suite.log
62+
fi
63+
64+
openssh_check:
65+
runs-on: ubuntu-22.04
66+
needs: build_wolfprovider
67+
# This should be a safe limit for the tests to run.
68+
timeout-minutes: 20
69+
strategy:
70+
matrix:
71+
wolfssl_ref: [ 'master', 'v5.7.4-stable' ]
72+
steps:
73+
- name: Retrieving OpenSSL from cache
74+
uses: actions/cache/restore@v4
75+
id: openssl-cache
76+
with:
77+
path: |
78+
openssl-source
79+
openssl-install
80+
key: ossl-depends
81+
fail-on-cache-miss: true
82+
83+
- name: Retrieving wolfSSL/wolfProvider from cache
84+
uses: actions/cache/restore@v4
85+
id: wolfprov-cache
86+
with:
87+
path: |
88+
wolfssl-source
89+
wolfssl-install
90+
wolfprov-install
91+
provider.conf
92+
key: wolfprov-${{ matrix.wolfssl_ref }}-${{ github.sha }}
93+
fail-on-cache-miss: true
94+
95+
- name: Checkout OSP
96+
uses: actions/checkout@v4
97+
with:
98+
repository: wolfssl/osp
99+
path: osp
100+
101+
- name: Checkout openssh
102+
uses: actions/checkout@v4
103+
with:
104+
repository: openssh/openssh-portable
105+
path: openssh-portable
106+
107+
- name: Build openssh-portable
108+
working-directory: openssh-portable
109+
run: |
110+
patch -p1 < $GITHUB_WORKSPACE/osp/wolfProvider/openssh/openssh-9.9.p1-wolfprov.patch
111+
autoreconf
112+
./configure
113+
make -j
114+
- name: Test openssh with wolfProvider
115+
working-directory: openssh-portable
116+
run: |
117+
export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/wolfssl-install/lib:$GITHUB_WORKSPACE/openssl-install/lib64
118+
export OPENSSL_CONF=$GITHUB_WORKSPACE/provider.conf
119+
export OPENSSL_MODULES=$GITHUB_WORKSPACE/wolfprov-install/lib
120+
# Run all the tests except (t-exec) as it takes too long
121+
make file-tests interop-tests extra-tests unit
122+

0 commit comments

Comments
 (0)