Skip to content

Commit 49b7f79

Browse files
Merge pull request #12230 from danielinux/ci-cross-library-offline-deps
Use offline dependency bundles for cross-repo CI
2 parents 206e9a5 + c1ea3ff commit 49b7f79

6 files changed

Lines changed: 44 additions & 77 deletions

File tree

‎.github/ci-deps/packages-ubuntu-24.04-full.txt‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ bison
1414
bubblewrap
1515
build-essential
1616
ccache
17+
check
1718
clang
1819
clang-14
1920
clang-19
2021
cmake
22+
flex
2123
g++-10
2224
g++-11
2325
g++-12
@@ -103,4 +105,5 @@ python3-yaml
103105
shellcheck
104106
uuid-dev
105107
valgrind
108+
xxd
106109
zlib1g-dev

‎.github/workflows/cross-library.yml‎

Lines changed: 25 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,6 @@ on:
4242
required: false
4343
default: 'script'
4444
type: string
45-
apt_packages:
46-
description: 'Extra apt packages needed to build the product'
47-
required: false
48-
default: ''
49-
type: string
50-
container:
51-
description: 'Container image to build in (e.g. ubuntu:24.04, debian:13)'
52-
required: false
53-
default: 'ubuntu:24.04'
54-
type: string
5545

5646
jobs:
5747
# Build wolfSSL once and publish the install dir. Both compile legs (head,
@@ -61,38 +51,19 @@ jobs:
6151
name: Build wolfSSL (${{ inputs.product }})
6252
if: ${{ (github.repository_owner == 'wolfssl') && (github.event_name != 'pull_request' || github.event.pull_request.draft == false) }}
6353
runs-on: ubuntu-24.04
64-
container:
65-
image: ${{ inputs.container }}
6654
timeout-minutes: 20
6755
steps:
68-
# No git yet, so this is a REST download, only to get apt-install.sh.
69-
- name: Fetch the apt script
70-
uses: actions/checkout@v5
71-
with:
72-
path: apt-script
73-
74-
# Minimal-image containers ship without git/toolchain; install them
75-
# before checkout. Product-specific extras come from apt_packages.
76-
- name: Install build tools
77-
run: |
78-
# Two attempts fit inside this job's timeout-minutes.
79-
sh apt-script/.github/actions/install-apt-deps/apt-install.sh \
80-
--tries 2 --update-timeout 60 --no-install-recommends \
81-
build-essential autoconf automake libtool pkg-config \
82-
git ca-certificates ${{ inputs.apt_packages }}
83-
84-
# Building only needs the commit under test, not history. The break check
85-
# that needs history runs in the compile job, not here.
8656
- name: Checkout wolfSSL
8757
uses: actions/checkout@v5
8858
with:
8959
fetch-depth: 1
9060
fetch-tags: false
9161

92-
# Container job: the bind-mounted workspace is owned by a different uid,
93-
# so mark it safe or git refuses to operate on it ("dubious ownership").
94-
- name: Mark workspace safe for git
95-
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
62+
- name: Install build tools
63+
uses: ./.github/actions/install-apt-deps
64+
with:
65+
packages: build-essential autoconf automake libtool
66+
ghcr-debs-tag: ubuntu-24.04-minimal
9667

9768
# Build wolfSSL and install to a local dir. The configure flags go through
9869
# an env var (not inline ${{ }}) so a quoted CFLAGS/C_EXTRA_FLAGS group
@@ -127,48 +98,39 @@ jobs:
12798
name: Compile ${{ inputs.product }} (${{ matrix.ref_mode }})
12899
needs: build-wolfssl
129100
runs-on: ubuntu-24.04
130-
container:
131-
image: ${{ inputs.container }}
132101
timeout-minutes: 25
133102
strategy:
134103
fail-fast: false
135104
matrix:
136105
ref_mode: [ head, latest ]
137106
steps:
138-
# No git yet, so this is a REST download, only to get apt-install.sh.
139-
- name: Fetch the apt script
107+
- name: Checkout wolfSSL
140108
uses: actions/checkout@v5
141109
with:
142-
path: apt-script
110+
fetch-depth: 1
111+
fetch-tags: false
143112

144-
# Minimal-image containers ship without git/toolchain; install them
145-
# before checkout. Product-specific extras come from apt_packages.
146113
- name: Install build tools
147-
run: |
148-
# Two attempts fit inside this job's timeout-minutes.
149-
sh apt-script/.github/actions/install-apt-deps/apt-install.sh \
150-
--tries 2 --update-timeout 60 --no-install-recommends \
151-
build-essential autoconf automake libtool pkg-config \
152-
git ca-certificates ${{ inputs.apt_packages }}
114+
if: inputs.product != 'wolfip' && inputs.product != 'wolfprovider'
115+
uses: ./.github/actions/install-apt-deps
116+
with:
117+
packages: build-essential autoconf automake libtool
118+
ghcr-debs-tag: ubuntu-24.04-minimal
153119

154-
# This job does not build wolfSSL, but the latest leg still checks out
155-
# wolfSSL history because check-break.sh scans commit messages here. The
156-
# head leg never waives a break, so a depth-1 checkout is enough for it.
157-
- name: Checkout wolfSSL
158-
uses: actions/checkout@v5
120+
# wolfIP uses Check for the unit suite and xxd for the test certificates.
121+
- name: Install wolfIP build and test tools
122+
if: inputs.product == 'wolfip'
123+
uses: ./.github/actions/install-apt-deps
159124
with:
160-
fetch-depth: 1
161-
fetch-tags: false
125+
packages: build-essential autoconf automake libtool check xxd
126+
ghcr-debs-tag: ubuntu-24.04-full
162127

163-
# This is a container job: the workspace is a host bind-mount owned by a
164-
# different uid than the (root) container user, so git refuses to operate
165-
# on it ("detected dubious ownership") unless it is marked safe. actions/
166-
# checkout marks it safe only under its own *temporary* HOME, which our
167-
# run: steps (HOME=/github/home) do not inherit, so check-break.sh's
168-
# `git tag`/`git log` would fail and, with stderr hidden, look like "no
169-
# break declared". Mark it safe under this HOME for all following steps.
170-
- name: Mark workspace safe for git
171-
run: git config --global --add safe.directory "$GITHUB_WORKSPACE"
128+
- name: Install wolfProvider build tools and OpenSSL headers
129+
if: inputs.product == 'wolfprovider'
130+
uses: ./.github/actions/install-apt-deps
131+
with:
132+
packages: build-essential autoconf automake libtool libssl-dev
133+
ghcr-debs-tag: ubuntu-24.04-full
172134

173135
# The `latest` leg is the only one that reads wolfSSL history: it needs the
174136
# commit messages check-break.sh scans (the last two release cycles) plus

‎.github/workflows/cross-library/scripts/wolfprovider.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
# Compile-check wolfProvider against a locally-built wolfSSL.
33
#
44
# wolfProvider is an OpenSSL 3.x provider, so unlike the other products it also
5-
# needs OpenSSL dev headers/libs (installed via the caller's apt_packages, e.g.
6-
# libssl-dev) and an extra --with-openssl. NOTE: the exact flag set may need
5+
# needs OpenSSL dev headers/libs (libssl-dev) and an extra --with-openssl.
6+
# NOTE: the exact flag set may need
77
# tuning per release; adjust the caller's wolfssl_configure / product_configure.
88
#
99
# Usage: wolfprovider.sh [-t <ref>] <wolfssl_install_dir> <repo> [product_configure...]

‎.github/workflows/cross-wolfip.yml‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,3 @@ jobs:
2727
# wolfIP's native CI is Makefile-based; keep the matching commands
2828
# inline in the reusable workflow rather than in a product shell adapter.
2929
build_mode: makefile
30-
# check runs the unprivileged unit suite; xxd converts its generated
31-
# test certificates into C arrays for build/test-wolfssl.
32-
apt_packages: check xxd

‎.github/workflows/cross-wolfprovider.yml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,3 @@ jobs:
2929
CFLAGS="-DWC_RSA_NO_PADDING -DWOLFSSL_PUBLIC_MP -DHAVE_PUBLIC_FFDHE -DHAVE_FFDHE_6144 -DHAVE_FFDHE_8192 -DWOLFSSL_PSS_LONG_SALT -DWOLFSSL_PSS_SALT_LEN_DISCOVER -DRSA_MIN_SIZE=1024 -DWOLFSSL_OLD_OID_SUM"
3030
product_configure: ''
3131
script: wolfprovider.sh
32-
apt_packages: libssl-dev

‎.github/workflows/hitch.yml‎

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,22 @@ jobs:
5151
name: ${{ matrix.ref }}
5252
if: github.repository_owner == 'wolfssl'
5353
runs-on: ubuntu-24.04
54-
# This should be a safe limit for the tests to run.
55-
timeout-minutes: 4
54+
timeout-minutes: 10
5655
needs: build_wolfssl
5756
steps:
57+
- name: Checkout the dependency action
58+
uses: actions/checkout@v5
59+
with:
60+
sparse-checkout: .github/actions/install-apt-deps
61+
62+
- name: Install dependencies
63+
uses: ./.github/actions/install-apt-deps
64+
with:
65+
packages: libev-dev automake python3-docutils flex bison pkg-config make
66+
ghcr-debs-tag: ubuntu-24.04-full
67+
budget-seconds: '300'
68+
pull-timeout: '120'
69+
5870
- name: Download lib
5971
uses: actions/download-artifact@v7
6072
with:
@@ -69,12 +81,6 @@ jobs:
6981
repository: wolfssl/osp
7082
path: osp
7183

72-
- name: Install dependencies
73-
run: |
74-
export DEBIAN_FRONTEND=noninteractive
75-
sudo apt-get update
76-
sudo apt-get install -y libev-dev automake python3-docutils flex bison pkg-config make
77-
7884
- name: Checkout hitch
7985
uses: actions/checkout@v5
8086
with:

0 commit comments

Comments
 (0)