Skip to content

Commit 988e613

Browse files
authored
Merge pull request #147 from aidangarske/build-WP-workflow
Support for `build-wolfprovider.yml` workflows
2 parents c1f7010 + 6868fb7 commit 988e613

File tree

11 files changed

+125
-479
lines changed

11 files changed

+125
-479
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Build wolfProvider
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
wolfssl_ref:
7+
required: true
8+
type: string
9+
openssl_ref:
10+
required: true
11+
type: string
12+
outputs:
13+
cache_key:
14+
description: "Cache key for the build artifacts"
15+
value: ${{ jobs.build_wolfprovider.outputs.cache_key }}
16+
17+
jobs:
18+
build_wolfprovider:
19+
name: Build wolfProvider
20+
runs-on: ubuntu-22.04
21+
timeout-minutes: 20
22+
outputs:
23+
cache_key: wolfprov-${{ inputs.wolfssl_ref }}-${{ github.sha }}
24+
steps:
25+
- name: Checkout wolfProvider
26+
uses: actions/checkout@v4
27+
28+
# Check if this version of wolfssl/wolfprovider has already been built,
29+
# mark to cache these items on post if we do end up building
30+
- name: Checking wolfSSL/wolfProvider in cache
31+
uses: actions/cache@v4
32+
id: wolfprov-cache
33+
with:
34+
path: |
35+
wolfssl-source
36+
wolfssl-install
37+
wolfprov-install
38+
provider.conf
39+
40+
key: wolfprov-${{ inputs.wolfssl_ref }}-${{ github.sha }}
41+
lookup-only: true
42+
43+
# If wolfssl/wolfprovider have not yet been built, pull ossl from cache
44+
- name: Checking OpenSSL in cache
45+
if: steps.wolfprov-cache.outputs.cache-hit != 'true'
46+
uses: actions/cache@v4
47+
id: openssl-cache
48+
with:
49+
path: |
50+
openssl-source
51+
openssl-install
52+
53+
key: ossl-depends-${{ inputs.openssl_ref }}-${{ github.sha }}
54+
lookup-only: true
55+
56+
# If not yet built this version, build it now
57+
- name: Build wolfProvider
58+
if: steps.wolfprov-cache.outputs.cache-hit != 'true'
59+
run: |
60+
OPENSSL_TAG=${{ inputs.openssl_ref }} WOLFSSL_TAG=${{ inputs.wolfssl_ref }} ./scripts/build-wolfprovider.sh
61+
62+
- name: Print errors
63+
if: ${{ failure() }}
64+
run: |
65+
if [ -f test-suite.log ] ; then
66+
cat test-suite.log
67+
fi

.github/workflows/curl.yml

Lines changed: 5 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -14,57 +14,14 @@ concurrency:
1414

1515
jobs:
1616
build_wolfprovider:
17-
name: Build wolfProvider
18-
runs-on: ubuntu-22.04
19-
timeout-minutes: 20
17+
uses: ./.github/workflows/build-wolfprovider.yml
18+
with:
19+
wolfssl_ref: ${{ matrix.wolfssl_ref }}
20+
openssl_ref: ${{ matrix.openssl_ref }}
2021
strategy:
2122
matrix:
2223
wolfssl_ref: [ 'master', 'v5.8.0-stable' ]
2324
openssl_ref: [ 'openssl-3.5.0' ]
24-
steps:
25-
- name: Checkout wolfProvider
26-
uses: actions/checkout@v4
27-
28-
# Check if this version of wolfssl/wolfprovider has already been built,
29-
# mark to cache these items on post if we do end up building
30-
- name: Checking wolfSSL/wolfProvider in cache
31-
uses: actions/cache@v4
32-
id: wolfprov-cache
33-
with:
34-
path: |
35-
wolfssl-source
36-
wolfssl-install
37-
wolfprov-install
38-
provider.conf
39-
40-
key: wolfprov-${{ matrix.wolfssl_ref }}-${{ github.sha }}
41-
lookup-only: true
42-
43-
# If wolfssl/wolfprovider have not yet been built, pull ossl from cache
44-
- name: Checking OpenSSL in cache
45-
if: steps.wolfprov-${{ matrix.wolfssl_ref }}-cache.hit != 'true'
46-
uses: actions/cache@v4
47-
id: openssl-cache
48-
with:
49-
path: |
50-
openssl-source
51-
openssl-install
52-
53-
key: ossl-depends-${{ matrix.openssl_ref }}-${{ github.sha }}
54-
lookup-only: true
55-
56-
# If not yet built this version, build it now
57-
- name: Build wolfProvider
58-
if: steps.wolfprov-${{ matrix.wolfssl_ref }}-cache.hit != 'true'
59-
run: |
60-
OPENSSL_TAG=${{ matrix.openssl_ref }} WOLFSSL_TAG=${{ matrix.wolfssl_ref }} ./scripts/build-wolfprovider.sh
61-
62-
- name: Print errors
63-
if: ${{ failure() }}
64-
run: |
65-
if [ -f test-suite.log ] ; then
66-
cat test-suite.log
67-
fi
6825

6926
test_curl:
7027
runs-on: ubuntu-22.04
@@ -108,7 +65,7 @@ jobs:
10865
key: wolfprov-${{ matrix.wolfssl_ref }}-${{ github.sha }}
10966
fail-on-cache-miss: true
11067

111-
- name: Install curl test dependencies
68+
- name: Install dependencies
11269
run: |
11370
sudo apt-get update
11471
sudo apt-get install nghttp2 libpsl5 libpsl-dev python3-impacket

.github/workflows/grpc.yml

Lines changed: 9 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -14,57 +14,14 @@ concurrency:
1414

1515
jobs:
1616
build_wolfprovider:
17-
name: Build wolfProvider
18-
runs-on: ubuntu-22.04
19-
timeout-minutes: 20
17+
uses: ./.github/workflows/build-wolfprovider.yml
18+
with:
19+
wolfssl_ref: ${{ matrix.wolfssl_ref }}
20+
openssl_ref: ${{ matrix.openssl_ref }}
2021
strategy:
2122
matrix:
2223
wolfssl_ref: [ 'master', 'v5.8.0-stable' ]
2324
openssl_ref: [ 'openssl-3.5.0' ]
24-
steps:
25-
- name: Checkout wolfProvider
26-
uses: actions/checkout@v4
27-
28-
# Check if this version of wolfssl/wolfprovider has already been built,
29-
# mark to cache these items on post if we do end up building
30-
- name: Checking wolfSSL/wolfProvider in cache
31-
uses: actions/cache@v4
32-
id: wolfprov-cache
33-
with:
34-
path: |
35-
wolfssl-source
36-
wolfssl-install
37-
wolfprov-install
38-
provider.conf
39-
40-
key: wolfprov-${{ matrix.wolfssl_ref }}-${{ github.sha }}
41-
lookup-only: true
42-
43-
# If wolfssl/wolfprovider have not yet been built, pull ossl from cache
44-
- name: Checking OpenSSL in cache
45-
if: steps.wolfprov-cache.outputs.cache-hit != 'true'
46-
uses: actions/cache@v4
47-
id: openssl-cache
48-
with:
49-
path: |
50-
openssl-source
51-
openssl-install
52-
53-
key: ossl-depends-${{ matrix.openssl_ref }}-${{ github.sha }}
54-
lookup-only: true
55-
56-
# If not yet built this version, build it now
57-
- name: Build wolfProvider
58-
if: steps.wolfprov-cache.outputs.cache-hit != 'true'
59-
run: |
60-
OPENSSL_TAG=${{ matrix.openssl_ref }} WOLFSSL_TAG=${{ matrix.wolfssl_ref }} ./scripts/build-wolfprovider.sh
61-
62-
- name: Print errors
63-
if: ${{ failure() }}
64-
run: |
65-
if [ -f test-suite.log ] ; then
66-
cat test-suite.log
67-
fi
6825

6926
test_grpc:
7027
runs-on: ubuntu-22.04
@@ -88,11 +45,6 @@ jobs:
8845
- name: Checkout wolfProvider
8946
uses: actions/checkout@v4
9047

91-
- name: Confirm IPv4 and IPv6 support
92-
run: |
93-
ip addr list lo | grep 'inet '
94-
ip addr list lo | grep 'inet6 '
95-
9648
- name: Retrieving OpenSSL from cache
9749
uses: actions/cache/restore@v4
9850
id: openssl-cache
@@ -117,6 +69,11 @@ jobs:
11769
key: wolfprov-${{ matrix.wolfssl_ref }}-${{ github.sha }}
11870
fail-on-cache-miss: true
11971

72+
- name: Confirm IPv4 and IPv6 support
73+
run: |
74+
ip addr list lo | grep 'inet '
75+
ip addr list lo | grep 'inet6 '
76+
12077
- name: Install prerequisites
12178
run: |
12279
sudo apt-get update

.github/workflows/ipmitool.yml

Lines changed: 8 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -14,57 +14,14 @@ concurrency:
1414

1515
jobs:
1616
build_wolfprovider:
17-
name: Build wolfProvider
18-
runs-on: ubuntu-22.04
19-
timeout-minutes: 20
17+
uses: ./.github/workflows/build-wolfprovider.yml
18+
with:
19+
wolfssl_ref: ${{ matrix.wolfssl_ref }}
20+
openssl_ref: ${{ matrix.openssl_ref }}
2021
strategy:
2122
matrix:
2223
wolfssl_ref: [ 'master', 'v5.8.0-stable' ]
2324
openssl_ref: [ 'openssl-3.5.0' ]
24-
steps:
25-
- name: Checkout wolfProvider
26-
uses: actions/checkout@v4
27-
28-
# Check if this version of wolfssl/wolfprovider has already been built,
29-
# mark to cache these items on post if we do end up building
30-
- name: Checking wolfSSL/wolfProvider in cache
31-
uses: actions/cache@v4
32-
id: wolfprov-cache
33-
with:
34-
path: |
35-
wolfssl-source
36-
wolfssl-install
37-
wolfprov-install
38-
provider.conf
39-
40-
key: wolfprov-${{ matrix.wolfssl_ref }}-${{ github.sha }}
41-
lookup-only: true
42-
43-
# If wolfssl/wolfprovider have not yet been built, pull ossl from cache
44-
- name: Checking OpenSSL in cache
45-
if: steps.wolfprov-cache.outputs.cache-hit != 'true'
46-
uses: actions/cache@v4
47-
id: openssl-cache
48-
with:
49-
path: |
50-
openssl-source
51-
openssl-install
52-
53-
key: ossl-depends-${{ matrix.openssl_ref }}-${{ github.sha }}
54-
lookup-only: true
55-
56-
# If not yet built this version, build it now
57-
- name: Build wolfProvider
58-
if: steps.wolfprov-cache.outputs.cache-hit != 'true'
59-
run: |
60-
OPENSSL_TAG=${{ matrix.openssl_ref }} WOLFSSL_TAG=${{ matrix.wolfssl_ref }} ./scripts/build-wolfprovider.sh
61-
62-
- name: Print errors
63-
if: ${{ failure() }}
64-
run: |
65-
if [ -f test-suite.log ] ; then
66-
cat test-suite.log
67-
fi
6825

6926
test_ipmitool:
7027
runs-on: ubuntu-22.04
@@ -78,6 +35,9 @@ jobs:
7835
wolfssl_ref: [ 'master', 'v5.8.0-stable' ]
7936
openssl_ref: [ 'openssl-3.5.0' ]
8037
steps:
38+
- name: Checkout wolfProvider
39+
uses: actions/checkout@v4
40+
8141
- name: Retrieving OpenSSL from cache
8242
uses: actions/cache/restore@v4
8343
id: openssl-cache
@@ -119,7 +79,7 @@ jobs:
11979
- name: Confirm built with OpenSSL and test with wolfProvider
12080
working-directory: ipmitool
12181
run: |
122-
# Setup environment for wolfProvider
82+
# Setup environment variables
12383
export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/wolfssl-install/lib:$GITHUB_WORKSPACE/openssl-install/lib64
12484
export OPENSSL_CONF=$GITHUB_WORKSPACE/provider.conf
12585
export OPENSSL_MODULES=$GITHUB_WORKSPACE/wolfprov-install/lib

.github/workflows/net-snmp.yml

Lines changed: 4 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -14,57 +14,14 @@ concurrency:
1414

1515
jobs:
1616
build_wolfprovider:
17-
name: Build wolfProvider
18-
runs-on: ubuntu-22.04
19-
timeout-minutes: 20
17+
uses: ./.github/workflows/build-wolfprovider.yml
18+
with:
19+
wolfssl_ref: ${{ matrix.wolfssl_ref }}
20+
openssl_ref: ${{ matrix.openssl_ref }}
2021
strategy:
2122
matrix:
2223
wolfssl_ref: [ 'master', 'v5.8.0-stable' ]
2324
openssl_ref: [ 'openssl-3.5.0' ]
24-
steps:
25-
- name: Checkout wolfProvider
26-
uses: actions/checkout@v4
27-
28-
# Check if this version of wolfssl/wolfprovider has already been built,
29-
# mark to cache these items on post if we do end up building
30-
- name: Checking wolfSSL/wolfProvider in cache
31-
uses: actions/cache@v4
32-
id: wolfprov-cache
33-
with:
34-
path: |
35-
wolfssl-source
36-
wolfssl-install
37-
wolfprov-install
38-
provider.conf
39-
40-
key: wolfprov-${{ matrix.wolfssl_ref }}-${{ github.sha }}
41-
lookup-only: true
42-
43-
# If wolfssl/wolfprovider have not yet been built, pull ossl from cache
44-
- name: Checking OpenSSL in cache
45-
if: steps.wolfprov-cache.outputs.cache-hit != 'true'
46-
uses: actions/cache@v4
47-
id: openssl-cache
48-
with:
49-
path: |
50-
openssl-source
51-
openssl-install
52-
53-
key: ossl-depends-${{ matrix.openssl_ref }}-${{ github.sha }}
54-
lookup-only: true
55-
56-
# If not yet built this version, build it now
57-
- name: Build wolfProvider
58-
if: steps.wolfprov-cache.outputs.cache-hit != 'true'
59-
run: |
60-
OPENSSL_TAG=${{ matrix.openssl_ref }} WOLFSSL_TAG=${{ matrix.wolfssl_ref }} ./scripts/build-wolfprovider.sh
61-
62-
- name: Print errors
63-
if: ${{ failure() }}
64-
run: |
65-
if [ -f test-suite.log ] ; then
66-
cat test-suite.log
67-
fi
6825

6926
test_net_snmp:
7027
runs-on: ubuntu-22.04

0 commit comments

Comments
 (0)