Skip to content

Commit c10acca

Browse files
committed
ci: publish dep cache for bare-ubuntu too, not just bookworm
Adds a second publish job that builds the same versions outside the bookworm container, on a plain ubuntu-22.04 runner. The cache key includes the compiler binary, so bookworm gcc and ubuntu-22.04 gcc get separate entries -- bare-ubuntu consumers (simple, cmdline, smoke-test, seed-src, fips-ready, multi-compiler) now have something to pull from ghcr instead of always rebuilding. Matrix is openssl {master, latest, 3.0.17} x wolfssl {master, latest, v5.8.4-stable} -- the tags those workflows actually request. Replace-default / debug variants stay out of the publisher matrix for now; they auto-populate from canonical master pushes (cheap, one build per combo).
1 parent a479db2 commit c10acca

1 file changed

Lines changed: 52 additions & 0 deletions

File tree

.github/workflows/publish-dep-cache.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,3 +103,55 @@ jobs:
103103
WOLFSSL_TAG: ${{ matrix.wolfssl_ref }}
104104
WOLFPROV_SKIP_TEST: '1'
105105
run: ./scripts/build-wolfprovider.sh --cache-publish
106+
107+
# Bare-ubuntu mirror of the publish job: same versions, no container, so
108+
# consumers running directly on ubuntu-22.04 (simple, cmdline, smoke-test,
109+
# seed-src, fips-ready, multi-compiler) hit the cache. Different compiler
110+
# binary than bookworm gcc, so it lives at its own keys.
111+
publish_bare:
112+
needs: discover_versions
113+
if: |
114+
github.repository == 'wolfSSL/wolfProvider' &&
115+
(
116+
github.event_name != 'pull_request_target' ||
117+
contains(fromJSON('["OWNER", "MEMBER"]'),
118+
github.event.pull_request.author_association)
119+
)
120+
runs-on: ubuntu-22.04
121+
timeout-minutes: 60
122+
strategy:
123+
fail-fast: false
124+
matrix:
125+
openssl_ref:
126+
- master
127+
- ${{ needs.discover_versions.outputs.openssl_latest_ref }}
128+
- openssl-3.0.17
129+
wolfssl_ref:
130+
- master
131+
- ${{ needs.discover_versions.outputs.wolfssl_latest_ref }}
132+
- v5.8.4-stable
133+
steps:
134+
- uses: actions/checkout@v4
135+
with:
136+
fetch-depth: 1
137+
ref: ${{ github.event.pull_request.head.sha || github.sha }}
138+
139+
- name: Install ORAS
140+
run: |
141+
VERSION=1.2.0
142+
curl -fsSL -o /tmp/oras.tar.gz \
143+
"https://github.com/oras-project/oras/releases/download/v${VERSION}/oras_${VERSION}_linux_amd64.tar.gz"
144+
sudo tar -xzf /tmp/oras.tar.gz -C /usr/local/bin oras
145+
rm -f /tmp/oras.tar.gz
146+
oras version
147+
148+
- name: Log in to ghcr
149+
run: echo "${{ secrets.GITHUB_TOKEN }}" \
150+
| oras login ghcr.io -u ${{ github.actor }} --password-stdin
151+
152+
- name: Build and publish OpenSSL + wolfSSL (bare ubuntu, non-FIPS)
153+
env:
154+
OPENSSL_TAG: ${{ matrix.openssl_ref }}
155+
WOLFSSL_TAG: ${{ matrix.wolfssl_ref }}
156+
WOLFPROV_SKIP_TEST: '1'
157+
run: ./scripts/build-wolfprovider.sh --cache-publish

0 commit comments

Comments
 (0)