Skip to content

Commit 81cd8f4

Browse files
authored
Merge pull request #279 from padelsbach/wp_test_deb_ci0
Update CI workflows to use Debian packages only
2 parents 2189a23 + 8337582 commit 81cd8f4

56 files changed

Lines changed: 2511 additions & 1474 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
28.4 MB
Binary file not shown.

.github/scripts/check-workflow-result.sh

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,30 +107,41 @@ if [ "$WOLFPROV_FORCE_FAIL" = "WOLFPROV_FORCE_FAIL=1" ]; then
107107

108108
# Define expected failures
109109
EXPECTED_FAILS="auth_token_testdriver crypto_testdriver pkt_testdriver tls_crypt_testdriver"
110+
111+
# This test may fail when replace-default is enabled
112+
OPTIONAL_FAILS="provider_testdriver"
110113

111114
# Create temporary files for sorted lists
112115
TEMP_DIR=$(mktemp -d)
113116
ACTUAL_SORTED="${TEMP_DIR}/actual_sorted.txt"
114117
EXPECTED_SORTED="${TEMP_DIR}/expected_sorted.txt"
118+
OPTIONAL_SORTED="${TEMP_DIR}/optional_sorted.txt"
115119

116120
# Clean and sort both lists
117121
echo "$ACTUAL_FAILS" | tr ' ' '\n' | grep -v '^$' | sort > "$ACTUAL_SORTED"
118122
echo "$EXPECTED_FAILS" | tr ' ' '\n' | grep -v '^$' | sort > "$EXPECTED_SORTED"
119-
123+
echo "$OPTIONAL_FAILS" | tr ' ' '\n' | grep -v '^$' | sort > "$OPTIONAL_SORTED"
124+
120125
echo "DEBUG: Actual failed tests: $(tr '\n' ' ' < "$ACTUAL_SORTED")"
121126
echo "DEBUG: Expected failed tests: $(tr '\n' ' ' < "$EXPECTED_SORTED")"
122-
127+
echo "DEBUG: Optional failed tests: $(tr '\n' ' ' < "$OPTIONAL_SORTED")"
128+
123129
# Find missing in actual (in expected but not in actual)
124130
MISSING=$(comm -23 "$EXPECTED_SORTED" "$ACTUAL_SORTED" | tr '\n' ' ')
125131
# Find extra in actual (in actual but not in expected)
126132
EXTRA=$(comm -13 "$EXPECTED_SORTED" "$ACTUAL_SORTED" | tr '\n' ' ')
127-
133+
# Strip out optional failures
134+
EXTRA=$(comm -23 "$EXTRA" "$OPTIONAL_SORTED" | tr '\n' ' ')
135+
# List the optional failures
136+
OPTIONAL_FAILS=$(comm -13 "$EXPECTED_SORTED" "$OPTIONAL_SORTED" | tr '\n' ' ')
137+
128138
# Clean up temporary files
129139
rm -rf "$TEMP_DIR"
130140

131141
echo "Test(s) that should have failed: $MISSING"
132142
echo "Test(s) that shouldn't have failed: $EXTRA"
133-
143+
echo "Test(s) that failed (optional): $OPTIONAL_FAILS"
144+
134145
if [ -z "$MISSING" ] && [ -z "$EXTRA" ]; then
135146
echo "PASS: Actual failed tests match expected."
136147
exit 0
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
#!/bin/bash
2+
# install-packages.sh
3+
#
4+
# Copyright (C) 2006-2025 wolfSSL Inc.
5+
#
6+
# This file is part of wolfProvider.
7+
#
8+
# wolfProvider is free software; you can redistribute it and/or modify
9+
# it under the terms of the GNU General Public License as published by
10+
# the Free Software Foundation; either version 3 of the License, or
11+
# (at your option) any later version.
12+
#
13+
# wolfProvider is distributed in the hope that it will be useful,
14+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16+
# GNU General Public License for more details.
17+
#
18+
# You should have received a copy of the GNU General Public License
19+
# along with wolfProvider. If not, see <http://www.gnu.org/licenses/>.
20+
21+
set -e
22+
23+
echo "WolfSSL artifacts:"
24+
ls -la /tmp/wolfssl-artifacts || true
25+
echo "OpenSSL/wolfProvider artifacts:"
26+
ls -la /tmp/openssl-wolfprov-artifacts || true
27+
28+
# Install wolfSSL first
29+
wolfssl_debs=$(ls -1 /tmp/wolfssl-artifacts/*.deb 2>/dev/null || true)
30+
if [ -n "$wolfssl_debs" ]; then
31+
echo "Installing wolfSSL packages: $wolfssl_debs"
32+
apt install -y $wolfssl_debs
33+
fi
34+
35+
# Install OpenSSL packages (runtime + development headers)
36+
openssl_debs=$(ls -1 /tmp/openssl-wolfprov-artifacts/openssl_[0-9]*.deb 2>/dev/null || true)
37+
libssl3_debs=$(ls -1 /tmp/openssl-wolfprov-artifacts/libssl3_[0-9]*.deb 2>/dev/null || true)
38+
libssl_dev_debs=$(ls -1 /tmp/openssl-wolfprov-artifacts/libssl-dev_[0-9]*.deb 2>/dev/null || true)
39+
40+
# Install in dependency order: libssl3 first, then openssl, then dev headers
41+
if [ -n "$libssl3_debs" ]; then
42+
echo "Installing libssl3: $libssl3_debs"
43+
apt install -y $libssl3_debs
44+
fi
45+
if [ -n "$openssl_debs" ]; then
46+
echo "Installing openssl: $openssl_debs"
47+
apt install -y $openssl_debs
48+
fi
49+
if [ -n "$libssl_dev_debs" ]; then
50+
echo "Installing libssl-dev: $libssl_dev_debs"
51+
apt install -y $libssl_dev_debs
52+
fi
53+
54+
# Install wolfProvider main package only (no dev/debug needed for testing)
55+
wolfprov_main=$(ls -1 /tmp/openssl-wolfprov-artifacts/libwolfprov_[0-9]*.deb 2>/dev/null | head -n1 || true)
56+
57+
if [ -z "$wolfprov_main" ]; then
58+
echo "ERROR: libwolfprov main package not found in artifacts"
59+
ls -la /tmp/openssl-wolfprov-artifacts
60+
exit 1
61+
fi
62+
63+
echo "Installing wolfProvider main package: $wolfprov_main"
64+
apt install -y "$wolfprov_main"

.github/scripts/pam-pkcs11-test.sh

Lines changed: 6 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,12 @@
11
#!/bin/bash
22
set -euo pipefail
3+
set -x
34

4-
echo "[*] Setting up environment..."
5-
SCRIPT_PATH="$(cd "$(dirname "$0")" && pwd)/$(basename "$0")"
6-
REPO_ROOT=$(git -C "$(dirname "$SCRIPT_PATH")" rev-parse --show-toplevel)
7-
source $REPO_ROOT/scripts/env-setup || true
8-
9-
if [[ -z "${OPENSSL_MODULES:-}" ]]; then
10-
echo "Environment not set up: OPENSSL_MODULES is not defined or empty"
11-
exit 1
12-
elif [[ ! -d "$OPENSSL_MODULES" ]]; then
13-
echo "Could not find wolfProvider at $OPENSSL_MODULES"
14-
echo "Please build it first..."
5+
# Confirm wolfProvider is configured by running openssl list -providers
6+
if openssl list -providers | grep -qi wolf; then
7+
echo "wolfProvider is configured"
8+
else
9+
echo "wolfProvider is not configured"
1510
exit 1
1611
fi
1712

.github/workflows/bind9.yml

Lines changed: 48 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -18,52 +18,78 @@ jobs:
1818
with:
1919
wolfssl_ref: ${{ matrix.wolfssl_ref }}
2020
openssl_ref: ${{ matrix.openssl_ref }}
21+
replace_default: ${{ matrix.replace_default }}
2122
strategy:
2223
matrix:
23-
wolfssl_ref: [ 'master', 'v5.8.0-stable' ]
24-
openssl_ref: [ 'openssl-3.5.0' ]
24+
wolfssl_ref: [ 'v5.8.2-stable' ]
25+
openssl_ref: [ 'openssl-3.5.2' ]
26+
replace_default: [ true ]
2527

2628
test_bind:
2729
runs-on: ubuntu-22.04
30+
container:
31+
image: debian:bookworm
32+
env:
33+
DEBIAN_FRONTEND: noninteractive
2834
needs: build_wolfprovider
2935
# This should be a safe limit for the tests to run.
3036
timeout-minutes: 20
3137
strategy:
3238
fail-fast: false
3339
matrix:
3440
bind_ref: [ 'v9.18.28' ]
35-
wolfssl_ref: [ 'master', 'v5.8.0-stable' ]
36-
openssl_ref: [ 'openssl-3.5.0' ]
41+
wolfssl_ref: [ 'v5.8.2-stable' ]
42+
openssl_ref: [ 'openssl-3.5.2' ]
3743
force_fail: ['WOLFPROV_FORCE_FAIL=1', '']
44+
replace_default: [ true ]
45+
env:
46+
WOLFSSL_PACKAGES_PATH: /tmp/wolfssl-packages
47+
OPENSSL_PACKAGES_PATH: /tmp/openssl-packages
48+
WOLFPROV_PACKAGES_PATH: /tmp/wolfprov-packages
3849
steps:
3950
- name: Checkout wolfProvider
4051
uses: actions/checkout@v4
4152
with:
4253
fetch-depth: 1
4354

44-
- name: Retrieving wolfSSL/wolfProvider from cache
55+
- name: Checking OpenSSL/wolfProvider packages in cache
4556
uses: actions/cache/restore@v4
4657
id: wolfprov-cache
4758
with:
4859
path: |
49-
wolfssl-install
50-
wolfprov-install
51-
openssl-install/lib64
52-
openssl-install/include
53-
openssl-install/bin
54-
55-
key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }}
60+
${{ env.WOLFSSL_PACKAGES_PATH }}
61+
${{ env.OPENSSL_PACKAGES_PATH }}
62+
${{ env.WOLFPROV_PACKAGES_PATH }}
63+
key: openssl-wolfprov-debian-packages-${{ github.sha }}${{ matrix.replace_default && '-replace-default' || '' }}
5664
fail-on-cache-miss: true
5765

66+
- name: Install wolfSSL/OpenSSL/wolfprov packages
67+
run: |
68+
printf "Installing OpenSSL/wolfProvider packages:\n"
69+
ls -la ${{ env.WOLFSSL_PACKAGES_PATH }}
70+
ls -la ${{ env.OPENSSL_PACKAGES_PATH }}
71+
ls -la ${{ env.WOLFPROV_PACKAGES_PATH }}
72+
73+
apt install --reinstall -y \
74+
${{ env.WOLFSSL_PACKAGES_PATH }}/libwolfssl_*.deb
75+
76+
apt install --reinstall -y \
77+
${{ env.OPENSSL_PACKAGES_PATH }}/openssl_*.deb \
78+
${{ env.OPENSSL_PACKAGES_PATH }}/libssl3_*.deb \
79+
${{ env.OPENSSL_PACKAGES_PATH }}/libssl-dev_*.deb
80+
81+
apt install --reinstall -y \
82+
${{ env.WOLFPROV_PACKAGES_PATH }}/libwolfprov_*.deb
83+
5884
- name: Install bind9 test dependencies
5985
run: |
60-
export DEBIAN_FRONTEND=noninteractive
61-
sudo apt-get update
62-
sudo apt install -y build-essential automake libtool gnutls-bin \
63-
pkg-config make libidn2-dev libuv1-dev libnghttp2-dev libcap-dev \
64-
libjemalloc-dev zlib1g-dev libxml2-dev libjson-c-dev libcmocka-dev \
65-
python3-pytest python3-dnspython python3-hypothesis
66-
sudo PERL_MM_USE_DEFAULT=1 cpan -i Net::DNS
86+
apt-get update
87+
apt install -y build-essential automake libtool gnutls-bin \
88+
pkg-config make libidn2-dev libuv1-dev libnghttp2-dev libcap-dev \
89+
libjemalloc-dev zlib1g-dev libxml2-dev libjson-c-dev libcmocka-dev \
90+
python3-pytest python3-dnspython python3-hypothesis patch iproute2 \
91+
net-tools git
92+
PERL_MM_USE_DEFAULT=1 cpan -i Net::DNS
6793
6894
- name: Checkout bind9
6995
uses: actions/checkout@v4
@@ -85,15 +111,14 @@ jobs:
85111
86112
- name: Build and test bind9 with wolfProvider
87113
working-directory: bind9
114+
shell: bash
88115
run: |
89-
# Set up the environment for wolfProvider
90-
source $GITHUB_WORKSPACE/scripts/env-setup
91-
116+
set +o pipefail # ignore errors from make check
92117
autoreconf -ivf
93118
./configure
94119
make clean
95120
make -j$(nproc)
96-
sudo ./bin/tests/system/ifconfig.sh up
121+
./bin/tests/system/ifconfig.sh up
97122
98123
export ${{ matrix.force_fail }}
99124
make -j$(nproc) check 2>&1 | tee bind9-test.log

0 commit comments

Comments
 (0)