Skip to content

Commit 0fdce6b

Browse files
committed
Fix for OSSL caching in github actions
1 parent 664b75a commit 0fdce6b

19 files changed

Lines changed: 57 additions & 1694 deletions

.github/workflows/asan.yml

Lines changed: 0 additions & 35 deletions
This file was deleted.

.github/workflows/build-wolfprovider.yml

Lines changed: 54 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -9,56 +9,87 @@ on:
99
openssl_ref:
1010
required: true
1111
type: string
12-
outputs:
13-
cache_key:
14-
description: "Cache key for the build artifacts"
15-
value: ${{ jobs.build_wolfprovider.outputs.cache_key }}
1612

1713
jobs:
18-
build_wolfprovider:
14+
bwp:
1915
name: Build wolfProvider
2016
runs-on: ubuntu-22.04
2117
timeout-minutes: 20
22-
outputs:
23-
cache_key: wolfprov-${{ inputs.wolfssl_ref }}-${{ github.sha }}
2418
steps:
19+
# Must come first so that the directory is present
2520
- name: Checkout wolfProvider
2621
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 1
24+
25+
# Enable ccache to speed up builds
26+
# # Must be after the checkout step
27+
# - name: ccache
28+
# if: steps.wolfprov-cache.outputs.cache-hit != 'true'
29+
# uses: hendrikmuhs/ccache-action@v1.2
30+
# with:
31+
# create-symlink: true
2732

2833
# Check if this version of wolfssl/wolfprovider has already been built,
2934
# 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
35+
# - name: Checking wolfSSL/wolfProvider in cache
36+
# uses: actions/cache/restore@v4
37+
# id: wolfprov-cache
38+
# with:
39+
# path: |
40+
# wolfssl-source
41+
# wolfssl-install
42+
# wolfprov-install
43+
# provider.conf
3944

40-
key: wolfprov-${{ inputs.wolfssl_ref }}-${{ github.sha }}
41-
lookup-only: true
45+
# key: wolfprov-${{ inputs.wolfssl_ref }}-${{ inputs.openssl_ref }}-${{ github.sha }}
46+
# # no need to restore from cache here since it will be restored
47+
# # in the main workflows
48+
# lookup-only: true
4249

4350
# If wolfssl/wolfprovider have not yet been built, pull ossl from cache
4451
- name: Checking OpenSSL in cache
45-
if: steps.wolfprov-cache.outputs.cache-hit != 'true'
46-
uses: actions/cache@v4
52+
# if: steps.wolfprov-cache.outputs.cache-hit != 'true'
53+
uses: actions/cache/restore@v4
4754
id: openssl-cache
4855
with:
4956
path: |
5057
openssl-source
5158
openssl-install
5259
53-
key: ossl-depends-${{ inputs.openssl_ref }}-${{ github.sha }}
54-
lookup-only: true
60+
key: ossl-depends-${{ inputs.openssl_ref }}
61+
lookup-only: false
62+
63+
# If wolfssl/wolfprovider have not yet been built, pull wolfssl from cache
64+
- name: Checking WolfSSL in cache
65+
# if: steps.wolfprov-cache.outputs.cache-hit != 'true'
66+
uses: actions/cache/restore@v4
67+
id: wolfssl-cache
68+
with:
69+
path: |
70+
wolfssl-source
71+
wolfssl-install
72+
73+
key: wolfssl-depends-${{ inputs.wolfssl_ref }}
74+
lookup-only: false
5575

5676
# If not yet built this version, build it now
5777
- name: Build wolfProvider
58-
if: steps.wolfprov-cache.outputs.cache-hit != 'true'
78+
# if: steps.wolfprov-cache.outputs.cache-hit != 'true'
5979
run: |
6080
OPENSSL_TAG=${{ inputs.openssl_ref }} WOLFSSL_TAG=${{ inputs.wolfssl_ref }} ./scripts/build-wolfprovider.sh
6181
82+
- name: Save wolfProvider into cache
83+
# if: steps.wolfprov-cache.outputs.cache-hit != 'true'
84+
uses: actions/cache/save@v4
85+
with:
86+
path: |
87+
wolfssl-source
88+
wolfssl-install
89+
wolfprov-install
90+
provider.conf
91+
key: wolfprov-${{ inputs.wolfssl_ref }}-${{ inputs.openssl_ref }}-${{ github.sha }}
92+
6293
- name: Print errors
6394
if: ${{ failure() }}
6495
run: |

.github/workflows/cjose.yml

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -42,28 +42,15 @@ jobs:
4242
sparse-checkout: |
4343
.github
4444
45-
- name: Retrieving OpenSSL from cache
45+
- name: Retrieving wolfProvider from cache
4646
uses: actions/cache/restore@v4
47-
id: openssl-cache
47+
id: wolfprov-cache-restore
4848
with:
4949
path: |
50-
openssl-source
51-
openssl-install
52-
53-
key: ossl-depends-${{ matrix.openssl_ref }}-${{ github.sha }}
54-
fail-on-cache-miss: true
55-
56-
- name: Retrieving wolfSSL/wolfProvider from cache
57-
uses: actions/cache/restore@v4
58-
id: wolfprov-cache
59-
with:
60-
path: |
61-
wolfssl-source
62-
wolfssl-install
6350
wolfprov-install
6451
provider.conf
6552
66-
key: wolfprov-${{ matrix.wolfssl_ref }}-${{ github.sha }}
53+
key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }}
6754
fail-on-cache-miss: true
6855

6956
- name: Install cjose dependencies

.github/workflows/codespell.yml

Lines changed: 0 additions & 47 deletions
This file was deleted.

.github/workflows/curl.yml

Lines changed: 0 additions & 105 deletions
This file was deleted.

0 commit comments

Comments
 (0)