|
9 | 9 | openssl_ref: |
10 | 10 | required: true |
11 | 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 | 12 |
|
17 | 13 | jobs: |
18 | | - build_wolfprovider: |
| 14 | + bwp: |
19 | 15 | name: Build wolfProvider |
20 | 16 | runs-on: ubuntu-22.04 |
21 | 17 | timeout-minutes: 20 |
22 | | - outputs: |
23 | | - cache_key: wolfprov-${{ inputs.wolfssl_ref }}-${{ github.sha }} |
24 | 18 | steps: |
| 19 | + # Must come first so that the directory is present |
25 | 20 | - name: Checkout wolfProvider |
26 | 21 | 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 |
27 | 32 |
|
28 | 33 | # Check if this version of wolfssl/wolfprovider has already been built, |
29 | 34 | # 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 |
39 | 44 |
|
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 |
42 | 49 |
|
43 | 50 | # If wolfssl/wolfprovider have not yet been built, pull ossl from cache |
44 | 51 | - 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 |
47 | 54 | id: openssl-cache |
48 | 55 | with: |
49 | 56 | path: | |
50 | 57 | openssl-source |
51 | 58 | openssl-install |
52 | 59 |
|
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 |
55 | 75 |
|
56 | 76 | # If not yet built this version, build it now |
57 | 77 | - name: Build wolfProvider |
58 | | - if: steps.wolfprov-cache.outputs.cache-hit != 'true' |
| 78 | + # if: steps.wolfprov-cache.outputs.cache-hit != 'true' |
59 | 79 | run: | |
60 | 80 | OPENSSL_TAG=${{ inputs.openssl_ref }} WOLFSSL_TAG=${{ inputs.wolfssl_ref }} ./scripts/build-wolfprovider.sh |
61 | 81 |
|
| 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 | + |
62 | 93 | - name: Print errors |
63 | 94 | if: ${{ failure() }} |
64 | 95 | run: | |
|
0 commit comments