Skip to content

Commit 884d99c

Browse files
committed
Squashed commit of the following:
commit 3b97af0 Author: Aidan Garske <aidan@wolfssl.com> Date: Thu Sep 11 11:09:23 2025 -0700 Add better failure detection commit d6cfd4c Author: Aidan Garske <aidan@wolfssl.com> Date: Thu Sep 11 10:17:24 2025 -0700 Add DRY install and fix bug commit 82a6c82 Author: Aidan Garske <aidan@wolfssl.com> Date: Thu Sep 11 09:43:02 2025 -0700 Add correct exit handling commit ab74618 Author: Aidan Garske <aidan@wolfssl.com> Date: Wed Sep 10 18:12:06 2025 -0700 Update debug to work correctly commit a3c82ea Author: Aidan Garske <aidan@wolfssl.com> Date: Wed Sep 10 18:04:00 2025 -0700 Add debug to figure out ret commit 741ba83 Author: Aidan Garske <aidan@wolfssl.com> Date: Wed Sep 10 17:35:59 2025 -0700 Dont do the source env commit 162ecbc Author: Aidan Garske <aidan@wolfssl.com> Date: Wed Sep 10 17:24:33 2025 -0700 Install in correct order commit 13d014e Author: Aidan Garske <aidan@wolfssl.com> Date: Wed Sep 10 17:16:24 2025 -0700 Add _dev as well for ossl commit c130172 Author: Aidan Garske <aidan@wolfssl.com> Date: Wed Sep 10 17:00:16 2025 -0700 Add debug and dont specify the ossl install commit 4354399 Author: Aidan Garske <aidan@wolfssl.com> Date: Wed Sep 10 16:35:53 2025 -0700 Add only the main wp package commit bc64e27 Author: Aidan Garske <aidan@wolfssl.com> Date: Wed Sep 10 16:09:07 2025 -0700 Add correct syntax to find package commit f3fdc43 Author: Aidan Garske <aidan@wolfssl.com> Date: Wed Sep 10 15:46:44 2025 -0700 Add distinct commit hash commit 808c4f8 Author: Aidan Garske <aidan@wolfssl.com> Date: Wed Sep 10 13:19:25 2025 -0700 Only test 5.8.2 commit 08ac4d7 Author: Aidan Garske <aidan@wolfssl.com> Date: Wed Sep 10 12:42:48 2025 -0700 Add comment out commit 9e26b93 Author: Aidan Garske <aidan@wolfssl.com> Date: Wed Sep 10 12:31:41 2025 -0700 Add .deb support for Github Workflows
1 parent d02b4a4 commit 884d99c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+288
-187
lines changed
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/workflows/asan.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ name: Asan Test
44
on:
55
push:
66
branches: [ "*" ]
7-
pull_request:
8-
branches: [ "*" ]
7+
#pull_request:
8+
#branches: [ "*" ]
99

1010
concurrency:
1111
group: ${{ github.workflow }}-${{ github.ref }}

.github/workflows/bind9.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ name: Bind9 Tests
44
on:
55
push:
66
branches: [ 'master', 'main', 'release/**' ]
7-
pull_request:
8-
branches: [ '*' ]
7+
#pull_request:
8+
#branches: [ '*' ]
99

1010
concurrency:
1111
group: ${{ github.workflow }}-${{ github.ref }}

.github/workflows/build-wolfprovider.yml

Lines changed: 76 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -18,87 +18,103 @@ jobs:
1818
build_wolfprovider_common:
1919
name: Build wolfProvider
2020
runs-on: ubuntu-22.04
21+
# Run inside Debian Bookworm to match packaging environment
22+
container:
23+
image: debian:bookworm
24+
env:
25+
DEBIAN_FRONTEND: noninteractive
2126
timeout-minutes: 20
2227
outputs:
2328
cache_key: wolfprov-${{ inputs.wolfssl_ref }}-${{ inputs.openssl_ref }}-${{ github.sha }}
2429
steps:
30+
- name: Set up environment
31+
run: |
32+
apt-get update
33+
apt-get install -y \
34+
build-essential \
35+
devscripts \
36+
debhelper \
37+
dh-autoreconf \
38+
libtool \
39+
pkg-config \
40+
git \
41+
wget \
42+
curl \
43+
ca-certificates \
44+
openssl \
45+
dpkg-dev \
46+
lintian \
47+
fakeroot \
48+
dh-exec \
49+
equivs \
50+
expect \
51+
xxd
52+
53+
- name: Ensure the working directory safe
54+
run: |
55+
git config --global --add safe.directory "$GITHUB_WORKSPACE"
56+
2557
- name: Checkout wolfProvider
2658
uses: actions/checkout@v4
2759
with:
2860
fetch-depth: 1
2961

30-
- name: Get OpenSSL commit hash
31-
id: openssl-ref
62+
- name: Fetch tags (for Debian versioning)
3263
run: |
33-
sha=$(./scripts/resolve-ref.sh "${{ inputs.openssl_ref }}" "openssl/openssl")
34-
echo "ref=$sha" >> "$GITHUB_OUTPUT"
35-
env:
36-
# Used token to bypass rate limits
37-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
64+
git fetch --tags --force --prune
3865
39-
- name: Get WolfSSL commit hash
40-
id: wolfssl-ref
66+
- name: Install wolfSSL Debian packages from repo tarball
4167
run: |
42-
sha=$(./scripts/resolve-ref.sh "${{ inputs.wolfssl_ref }}" "wolfssl/wolfssl")
43-
echo "ref=$sha" >> "$GITHUB_OUTPUT"
44-
env:
45-
# Used token to bypass rate limits
46-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
68+
mkdir -p "/tmp/wolfssl-pkg"
69+
chmod +x $GITHUB_WORKSPACE/debian/install-wolfssl.sh
70+
$GITHUB_WORKSPACE/debian/install-wolfssl.sh \
71+
$GITHUB_WORKSPACE/.github/packages/debian-wolfssl.tar.gz \
72+
"/tmp/wolfssl-pkg"
4773
48-
# Look for a cached version of OpenSSL
49-
- name: Checking OpenSSL in cache
50-
uses: actions/cache/restore@v4
51-
id: openssl-cache
52-
with:
53-
path: |
54-
openssl-install
55-
key: ossl-depends-${{ steps.openssl-ref.outputs.ref }}
56-
lookup-only: false
74+
# Stage wolfSSL debs into artifacts directory
75+
mkdir -p "/tmp/wolfprov-packages"
76+
echo "Moving wolfssl files to artifacts directory..."
5777
58-
# Look for a cached version of WolfSSL
59-
- name: Checking WolfSSL in cache
60-
uses: actions/cache/restore@v4
61-
id: wolfssl-cache
62-
with:
63-
path: |
64-
wolfssl-install
65-
key: wolfssl-depends-${{ steps.wolfssl-ref.outputs.ref }}
66-
lookup-only: false
78+
find /tmp/wolfssl-pkg -name "*wolfssl*" -type f -name "*.deb" -exec cp {} /tmp/wolfprov-packages/ \;
79+
find /tmp/wolfssl-pkg -name "*wolfssl*" -type f -name "*.dsc" -exec cp {} /tmp/wolfprov-packages/ \;
80+
find /tmp/wolfssl-pkg -name "*wolfssl*" -type f -name "*.tar.gz" -exec cp {} /tmp/wolfprov-packages/ \;
81+
find /tmp/wolfssl-pkg -name "*wolfssl*" -type f -name "*.orig.tar.gz" -exec cp {} /tmp/wolfprov-packages/ \;
6782
68-
- name: Build wolfProvider
83+
- name: Build Debian packages (wolfProvider + OpenSSL)
6984
run: |
70-
OPENSSL_TAG=${{ inputs.openssl_ref }} WOLFSSL_TAG=${{ inputs.wolfssl_ref }} ./scripts/build-wolfprovider.sh
85+
yes Y | ./scripts/build-wolfprovider.sh --debian
7186
72-
# Save the wolfProvider outputs for use by the parent jobs.
73-
# Note that we don't try to restore since it will likely always
74-
# be a cache miss.
75-
- name: Save wolfProvider into cache
76-
uses: actions/cache/save@v4
77-
with:
78-
path: |
79-
wolfssl-install
80-
wolfprov-install
81-
openssl-install/lib64
82-
openssl-install/include
83-
openssl-install/bin
84-
key: wolfprov-${{ inputs.wolfssl_ref }}-${{ inputs.openssl_ref }}-${{ github.sha }}
87+
echo "Generated packages in parent dir:"
88+
ls -la ../ || true
89+
ls -la ../*.deb ../*.dsc ../*.tar.gz 2>/dev/null || true
90+
91+
- name: Collect package artifacts
92+
run: |
93+
mkdir -p "/tmp/wolfprov-packages"
94+
mv ../*.deb /tmp/wolfprov-packages/ 2>/dev/null || true
95+
mv ../*.dsc /tmp/wolfprov-packages/ 2>/dev/null || true
96+
mv ../*.tar.gz /tmp/wolfprov-packages/ 2>/dev/null || true
97+
echo "Artifacts to upload:"
98+
ls -la /tmp/wolfprov-packages || true
8599
86-
# If openssl cache miss, save it to the cache
87-
- name: Save OpenSSL into cache
88-
if: steps.openssl-cache.outputs.cache-hit != 'true'
89-
uses: actions/cache/save@v4
90-
with:
100+
- name: Upload wolfSSL packages
101+
uses: actions/upload-artifact@v4
102+
with:
103+
name: wolfssl-debian-packages-${{ github.sha }}
91104
path: |
92-
openssl-install
93-
key: ossl-depends-${{ steps.openssl-ref.outputs.ref }}
105+
/tmp/wolfprov-packages/*wolfssl*.deb
106+
retention-days: 7
94107

95-
- name: Save WolfSSL into cache
96-
if: steps.wolfssl-cache.outputs.cache-hit != 'true'
97-
uses: actions/cache/save@v4
98-
with:
108+
- name: Upload OpenSSL/wolfProvider packages
109+
uses: actions/upload-artifact@v4
110+
with:
111+
name: openssl-wolfprov-debian-packages-${{ github.sha }}
99112
path: |
100-
wolfssl-install
101-
key: wolfssl-depends-${{ steps.wolfssl-ref.outputs.ref }}
113+
/tmp/wolfprov-packages/*openssl*.deb
114+
/tmp/wolfprov-packages/*libssl3*.deb
115+
/tmp/wolfprov-packages/*libssl-dev*.deb
116+
/tmp/wolfprov-packages/*libwolfprov*.deb
117+
retention-days: 7
102118

103119
- name: Print errors
104120
if: ${{ failure() }}

.github/workflows/cjose.yml

Lines changed: 35 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -19,44 +19,54 @@ jobs:
1919
wolfssl_ref: ${{ matrix.wolfssl_ref }}
2020
openssl_ref: ${{ matrix.openssl_ref }}
2121
strategy:
22-
matrix:
23-
wolfssl_ref: [ 'master', 'v5.8.0-stable' ]
22+
matrix:
23+
# Test 5.8.2 since our .deb is based on that version
24+
wolfssl_ref: [ 'v5.8.2-stable' ]
2425
openssl_ref: [ 'openssl-3.5.0' ]
2526

2627
test_cjose:
2728
runs-on: ubuntu-22.04
2829
needs: build_wolfprovider
2930
# This should be a safe limit for the tests to run.
3031
timeout-minutes: 20
32+
container:
33+
image: debian:bookworm
34+
env:
35+
DEBIAN_FRONTEND: noninteractive
3136
strategy:
3237
matrix:
33-
cjose_ref: [ 'master', 'v0.6.2.1' ]
34-
wolfssl_ref: [ 'master', 'v5.8.0-stable' ]
38+
# Dont test osp master since it might be unstable
39+
cjose_ref: [ 'v0.6.2.1' ]
40+
wolfssl_ref: [ 'v5.8.2-stable' ]
3541
openssl_ref: [ 'openssl-3.5.0' ]
3642
force_fail: [ 'WOLFPROV_FORCE_FAIL=1', '' ]
3743
steps:
44+
- name: Set up environment
45+
run: |
46+
apt-get update
47+
apt-get install -y git sudo build-essential autoconf automake \
48+
libtool pkg-config libjansson-dev check ca-certificates dpkg-dev
49+
3850
- name: Checkout wolfProvider
3951
uses: actions/checkout@v4
4052
with:
4153
fetch-depth: 1
4254

43-
- name: Retrieving wolfProvider from cache
44-
uses: actions/cache/restore@v4
45-
id: wolfprov-cache-restore
55+
- name: Download wolfSSL packages
56+
uses: actions/download-artifact@v4
4657
with:
47-
path: |
48-
wolfssl-install
49-
wolfprov-install
50-
openssl-install/lib64
51-
openssl-install/include
52-
openssl-install/bin
58+
name: wolfssl-debian-packages-${{ github.sha }}
59+
path: /tmp/wolfssl-artifacts
5360

54-
key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }}
55-
fail-on-cache-miss: true
61+
- name: Download OpenSSL/wolfProvider packages
62+
uses: actions/download-artifact@v4
63+
with:
64+
name: openssl-wolfprov-debian-packages-${{ github.sha }}
65+
path: /tmp/openssl-wolfprov-artifacts
5666

57-
- name: Install cjose dependencies
67+
- name: Install wolfSSL/OpenSSL/wolfprov packages
5868
run: |
59-
sudo apt-get install -y libjansson-dev check
69+
$GITHUB_WORKSPACE/.github/scripts/install-packages.sh
6070
6171
- name: Download cjose
6272
uses: actions/checkout@v4
@@ -69,22 +79,21 @@ jobs:
6979
- name: Build cjose
7080
working-directory: cjose
7181
run: |
72-
# Configure with OpenSSL
73-
./configure CFLAGS="-Wno-error=deprecated-declarations" --with-openssl=$GITHUB_WORKSPACE/openssl-install
82+
./configure CFLAGS="-Wno-error=deprecated-declarations"
7483
7584
# Build cjose
7685
make
7786
7887
- name: Run cjose tests
7988
working-directory: cjose
8089
run: |
81-
# Set up the environment for wolfProvider
82-
source $GITHUB_WORKSPACE/scripts/env-setup
90+
# wolfProvider is already loaded as the default provider
91+
echo "Current OpenSSL providers:"
92+
openssl list -providers
93+
openssl list -providers | grep -q "wolfSSL Provider" || (echo "ERROR: libwolfprov not found in OpenSSL providers" && exit 1)
8394
export ${{ matrix.force_fail }}
8495
85-
# Run tests
86-
make test || true
87-
88-
# Capture result
89-
TEST_RESULT=$(tail -1 ./test/check_cjose.log | grep PASS; echo $?)
96+
make test 2>&1 | tee cjose-test.log
97+
TEST_RESULT=$(grep -q "FAIL: check_cjose" cjose-test.log && echo "1" || echo "0")
98+
echo "TEST_RESULT = $TEST_RESULT"
9099
$GITHUB_WORKSPACE/.github/scripts/check-workflow-result.sh $TEST_RESULT ${{ matrix.force_fail }} cjose

.github/workflows/cmdline.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ name: Command Line Tests
44
on:
55
push:
66
branches: [ 'master', 'main', 'release/**' ]
7-
pull_request:
8-
branches: [ '*' ]
7+
#pull_request:
8+
#branches: [ '*' ]
99

1010
concurrency:
1111
group: ${{ github.workflow }}-${{ github.ref }}

.github/workflows/codespell.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ name: Codespell test
44
on:
55
push:
66
branches: [ 'master', 'main', 'release/**' ]
7-
pull_request:
8-
branches: [ '*' ]
7+
#pull_request:
8+
#branches: [ '*' ]
99

1010
concurrency:
1111
group: ${{ github.workflow }}-${{ github.ref }}

.github/workflows/curl.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ name: Curl Tests
44
on:
55
push:
66
branches: [ 'master', 'main', 'release/**' ]
7-
pull_request:
8-
branches: [ '*' ]
7+
#pull_request:
8+
#branches: [ '*' ]
99

1010
concurrency:
1111
group: ${{ github.workflow }}-${{ github.ref }}

0 commit comments

Comments
 (0)