@@ -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() }}
0 commit comments