Skip to content

Commit a67179e

Browse files
authored
Merge pull request #10202 from LinuxJedi/fix-gha-cache
ci: rebuild mbedtls/nss in test job on cache miss
2 parents c4e7198 + 08aac33 commit a67179e

File tree

2 files changed

+55
-7
lines changed

2 files changed

+55
-7
lines changed

.github/workflows/mbedtls.yml

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
mkdir build
4949
cd build
5050
cmake ..
51-
make -j
51+
make -j$(nproc)
5252
# convert key to pem format
5353
openssl pkey -in framework/data_files/cli-rsa-sha256.key.der -text > framework/data_files/cli-rsa-sha256.key.pem
5454
openssl pkey -in framework/data_files/server2.key.der -text > framework/data_files/server2.key.pem
@@ -58,18 +58,38 @@ jobs:
5858
if: github.repository_owner == 'wolfssl'
5959
runs-on: ubuntu-24.04
6060
needs: build_mbedtls
61-
timeout-minutes: 10
61+
timeout-minutes: 15
6262
steps:
6363
- name: Disable IPv6 (IMPORTANT, OTHERWISE DTLS MBEDTLS CLIENT WON'T CONNECT)
6464
run: echo 1 | sudo tee /proc/sys/net/ipv6/conf/lo/disable_ipv6
6565

6666
- name: Checking if we have mbed in cache
67-
uses: actions/cache/restore@v4
67+
uses: actions/cache@v4
6868
id: cache
6969
with:
7070
path: mbedtls
7171
key: mbedtls-${{ env.MBED_REF }}
72-
fail-on-cache-miss: true
72+
73+
- name: Checkout mbedtls (fallback on cache miss)
74+
if: steps.cache.outputs.cache-hit != 'true'
75+
uses: actions/checkout@v4
76+
with:
77+
repository: Mbed-TLS/mbedtls
78+
ref: ${{ env.MBED_REF }}
79+
path: mbedtls
80+
fetch-depth: 1
81+
82+
- name: Compile mbedtls (fallback on cache miss)
83+
if: steps.cache.outputs.cache-hit != 'true'
84+
working-directory: mbedtls
85+
run: |
86+
git submodule update --init
87+
mkdir build
88+
cd build
89+
cmake ..
90+
make -j$(nproc)
91+
openssl pkey -in framework/data_files/cli-rsa-sha256.key.der -text > framework/data_files/cli-rsa-sha256.key.pem
92+
openssl pkey -in framework/data_files/server2.key.der -text > framework/data_files/server2.key.pem
7393
7494
- name: Build wolfSSL
7595
uses: wolfSSL/actions-build-autotools-project@v1

.github/workflows/nss.yml

Lines changed: 31 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,15 +66,43 @@ jobs:
6666
if: github.repository_owner == 'wolfssl'
6767
runs-on: ubuntu-24.04
6868
needs: build_nss
69-
timeout-minutes: 10
69+
timeout-minutes: 30
7070
steps:
7171
- name: Checking if we have nss in cache
72-
uses: actions/cache/restore@v4
72+
uses: actions/cache@v4
7373
id: cache
7474
with:
7575
path: dist
7676
key: nss-${{ env.NSS_REF }}
77-
fail-on-cache-miss: true
77+
78+
- name: Checkout wolfSSL CI actions (fallback on cache miss)
79+
if: steps.cache.outputs.cache-hit != 'true'
80+
uses: actions/checkout@v4
81+
with:
82+
sparse-checkout: .github/actions
83+
fetch-depth: 1
84+
85+
- name: Install dependencies (fallback on cache miss)
86+
if: steps.cache.outputs.cache-hit != 'true'
87+
uses: ./.github/actions/install-apt-deps
88+
with:
89+
packages: gyp ninja-build
90+
91+
- name: Checkout nss (fallback on cache miss)
92+
if: steps.cache.outputs.cache-hit != 'true'
93+
uses: actions/checkout@v4
94+
with:
95+
repository: nss-dev/nss
96+
ref: ${{ env.NSS_REF }}
97+
path: nss
98+
fetch-depth: 1
99+
100+
- name: Compile nss (fallback on cache miss)
101+
if: steps.cache.outputs.cache-hit != 'true'
102+
run: |
103+
hg clone https://hg.mozilla.org/projects/nspr
104+
cd nss
105+
./build.sh
78106
79107
- name: Build wolfSSL
80108
uses: wolfSSL/actions-build-autotools-project@v1

0 commit comments

Comments
 (0)