Skip to content

Commit bb5a3d1

Browse files
committed
Add FIPS support for Debian package build
1 parent a0f393a commit bb5a3d1

File tree

1 file changed

+36
-1
lines changed

1 file changed

+36
-1
lines changed

.github/workflows/debian-package.yml

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,18 @@ on:
99
jobs:
1010
bookworm:
1111
runs-on: ubuntu-22.04
12+
<<<<<<< HEAD
1213
# Important: use Debian Bookworm for compatibility
14+
=======
15+
strategy:
16+
matrix:
17+
include:
18+
- fips_mode: true
19+
description: "FIPS Mode"
20+
- fips_mode: false
21+
description: "Non-FIPS Mode"
22+
# Important: use Debian Bookwork for compatibility
23+
>>>>>>> 08f4141 (Add FIPS support for Debian package build)
1324
container:
1425
image: debian:bookworm # or debian:bookworm-slim
1526
env:
@@ -61,9 +72,21 @@ jobs:
6172
mkdir -p "$RUNNER_TEMP/wolfssl-pkg"
6273
cd "$RUNNER_TEMP/wolfssl-pkg"
6374
75+
<<<<<<< HEAD
6476
echo "Using standard wolfSSL package"
6577
tar -xvf $GITHUB_WORKSPACE/.github/packages/debian-wolfssl.tar.gz
6678

79+
=======
80+
# Use FIPS tarball if fips_flag is not empty, otherwise use standard tarball
81+
if [ "${{ matrix.fips_mode }}" = "true" ]; then
82+
echo "Using FIPS wolfSSL package"
83+
tar -xvf $GITHUB_WORKSPACE/.github/packages/debian-wolfssl-fips.tar.gz
84+
else
85+
echo "Using standard wolfSSL package"
86+
tar -xvf $GITHUB_WORKSPACE/.github/packages/debian-wolfssl.tar.gz
87+
fi
88+
89+
>>>>>>> 08f4141 (Add FIPS support for Debian package build)
6790
# Get current architecture
6891
CURRENT_ARCH=$(dpkg --print-architecture)
6992
echo "Current architecture: $CURRENT_ARCH"
@@ -87,8 +110,16 @@ jobs:
87110

88111
- name: Build Debian package
89112
run: |
113+
<<<<<<< HEAD
114+
=======
115+
# Run the build script with or without FIPS based on matrix
116+
FIPS_FLAG=""
117+
if [ "${{ matrix.fips_mode }}" = "true" ]; then
118+
FIPS_FLAG="--enable-fips"
119+
fi
120+
>>>>>>> 08f4141 (Add FIPS support for Debian package build)
90121
# Bypass the warning prompt with 'yes Y'
91-
yes Y | ./scripts/build-wolfprovider.sh --debian
122+
yes Y | ./scripts/build-wolfprovider.sh --debian $FIPS_FLAG
92123

93124
# List generated packages
94125
echo "Generated Packages:"
@@ -204,7 +235,11 @@ jobs:
204235
if: always()
205236
uses: actions/upload-artifact@v4
206237
with:
238+
<<<<<<< HEAD
207239
name: wolfprovider-debian-packages
240+
=======
241+
name: wolfprovider-debian-packages${{ matrix.fips_mode && '-fips' }}
242+
>>>>>>> 08f4141 (Add FIPS support for Debian package build)
208243
path: |
209244
${{ runner.temp }}/*.deb
210245
${{ runner.temp }}/*.dsc

0 commit comments

Comments
 (0)