Skip to content

Commit 3fb30e0

Browse files
committed
ci: use artifacts for mbedtls/nss interop output
The test jobs used actions/cache/restore with fail-on-cache-miss, which aborted when the cache key was scoped to another PR or had been evicted, even though the build job reported success. Upload the build output as a workflow artifact and download it in the test job. Artifacts are scoped to the workflow run, so the test job always gets the data. The cache is kept as a speed optimization; on miss the build job rebuilds from scratch.
1 parent a50a540 commit 3fb30e0

2 files changed

Lines changed: 22 additions & 12 deletions

File tree

.github/workflows/mbedtls.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,6 @@ jobs:
2929
with:
3030
path: mbedtls
3131
key: mbedtls-${{ env.MBED_REF }}
32-
lookup-only: true
3332

3433
- name: Checkout mbedtls
3534
if: steps.cache.outputs.cache-hit != 'true'
@@ -53,6 +52,14 @@ jobs:
5352
openssl pkey -in framework/data_files/cli-rsa-sha256.key.der -text > framework/data_files/cli-rsa-sha256.key.pem
5453
openssl pkey -in framework/data_files/server2.key.der -text > framework/data_files/server2.key.pem
5554
55+
- name: Upload mbedtls build
56+
uses: actions/upload-artifact@v4
57+
with:
58+
name: mbedtls-build
59+
path: mbedtls
60+
retention-days: 1
61+
include-hidden-files: true
62+
5663
mbedtls_test:
5764
name: Test interop with mbedtls
5865
if: github.repository_owner == 'wolfssl'
@@ -63,13 +70,11 @@ jobs:
6370
- name: Disable IPv6 (IMPORTANT, OTHERWISE DTLS MBEDTLS CLIENT WON'T CONNECT)
6471
run: echo 1 | sudo tee /proc/sys/net/ipv6/conf/lo/disable_ipv6
6572

66-
- name: Checking if we have mbed in cache
67-
uses: actions/cache/restore@v4
68-
id: cache
73+
- name: Download mbedtls build
74+
uses: actions/download-artifact@v4
6975
with:
76+
name: mbedtls-build
7077
path: mbedtls
71-
key: mbedtls-${{ env.MBED_REF }}
72-
fail-on-cache-miss: true
7378

7479
- name: Build wolfSSL
7580
uses: wolfSSL/actions-build-autotools-project@v1

.github/workflows/nss.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ jobs:
3737
with:
3838
path: dist
3939
key: nss-${{ env.NSS_REF }}
40-
lookup-only: true
4140

4241
- name: Install dependencies
4342
if: steps.cache.outputs.cache-hit != 'true'
@@ -61,20 +60,26 @@ jobs:
6160
cd nss
6261
./build.sh
6362
63+
- name: Upload nss build
64+
uses: actions/upload-artifact@v4
65+
with:
66+
name: nss-build
67+
path: dist
68+
retention-days: 1
69+
include-hidden-files: true
70+
6471
nss_test:
6572
name: Test interop with nss
6673
if: github.repository_owner == 'wolfssl'
6774
runs-on: ubuntu-24.04
6875
needs: build_nss
6976
timeout-minutes: 10
7077
steps:
71-
- name: Checking if we have nss in cache
72-
uses: actions/cache/restore@v4
73-
id: cache
78+
- name: Download nss build
79+
uses: actions/download-artifact@v4
7480
with:
81+
name: nss-build
7582
path: dist
76-
key: nss-${{ env.NSS_REF }}
77-
fail-on-cache-miss: true
7883

7984
- name: Build wolfSSL
8085
uses: wolfSSL/actions-build-autotools-project@v1

0 commit comments

Comments
 (0)