Skip to content

Commit 6d9ecb7

Browse files
author
Test User
committed
Add support for fips in github CI rebase
1 parent 739e502 commit 6d9ecb7

Some content is hidden

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

42 files changed

+1281
-1200
lines changed

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -275,11 +275,11 @@ if [ "$WOLFPROV_FORCE_FAIL" = "WOLFPROV_FORCE_FAIL=1" ]; then
275275
elif [ "$TEST_SUITE" = "tcpdump" ]; then
276276
if [ -f "tcpdump-test.log" ]; then
277277
# Check for expected 7 failed tests (ESP/crypto segfaults)
278-
if grep -q "7 tests failed" tcpdump-test.log; then
279-
echo "PASS: tcpdump tests failed as expected with force fail enabled (7 tests failed)"
278+
if grep -q "2 tests failed" tcpdump-test.log; then
279+
echo "PASS: tcpdump tests failed as expected with force fail enabled (2 tests failed)"
280280
exit 0
281281
else
282-
echo "FAIL: tcpdump tests did not fail as expected (should have 7 failed tests)"
282+
echo "FAIL: tcpdump tests did not fail as expected (should have 2 failed tests)"
283283
exit 1
284284
fi
285285
else

.github/workflows/bind9.yml

Lines changed: 21 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ name: Bind9 Tests
33
# START OF COMMON SECTION
44
on:
55
push:
6-
branches: [ 'master', 'main', 'release/**' ]
6+
branches: [ 'master', 'main', 'build-wolfprov-debian-test', 'release/**' ]
77
pull_request:
88
branches: [ '*' ]
99

@@ -13,26 +13,12 @@ concurrency:
1313
# END OF COMMON SECTION
1414

1515
jobs:
16-
build_wolfprovider:
17-
uses: ./.github/workflows/build-wolfprovider.yml
18-
with:
19-
wolfssl_ref: ${{ matrix.wolfssl_ref }}
20-
openssl_ref: ${{ matrix.openssl_ref }}
21-
replace_default: ${{ matrix.replace_default }}
22-
strategy:
23-
matrix:
24-
wolfssl_ref: [ 'v5.8.2-stable' ]
25-
openssl_ref: [ 'openssl-3.5.2' ]
26-
replace_default: [ true ]
27-
fips: [ false ]
28-
2916
test_bind:
3017
runs-on: ubuntu-22.04
3118
container:
3219
image: debian:bookworm
3320
env:
3421
DEBIAN_FRONTEND: noninteractive
35-
needs: build_wolfprovider
3622
# This should be a safe limit for the tests to run.
3723
timeout-minutes: 20
3824
strategy:
@@ -41,9 +27,9 @@ jobs:
4127
bind_ref: [ 'v9.18.28' ]
4228
wolfssl_ref: [ 'v5.8.2-stable' ]
4329
openssl_ref: [ 'openssl-3.5.2' ]
30+
fips_ref: [ 'FIPS', 'non-FIPS' ]
4431
force_fail: ['WOLFPROV_FORCE_FAIL=1', '']
4532
replace_default: [ true ]
46-
fips: [ false ]
4733
env:
4834
WOLFSSL_PACKAGES_PATH: /tmp/wolfssl-packages
4935
OPENSSL_PACKAGES_PATH: /tmp/openssl-packages
@@ -54,38 +40,44 @@ jobs:
5440
with:
5541
fetch-depth: 1
5642

57-
- name: Checking OpenSSL/wolfProvider packages in cache
58-
uses: actions/cache/restore@v4
59-
id: wolfprov-cache
43+
- name: Download wolfProvider packages from nightly build
44+
uses: dawidd6/action-download-artifact@v6
6045
with:
61-
path: |
62-
${{ env.WOLFSSL_PACKAGES_PATH }}
63-
${{ env.OPENSSL_PACKAGES_PATH }}
64-
${{ env.WOLFPROV_PACKAGES_PATH }}
65-
key: openssl-wolfprov-debian-packages-${{ github.sha }}${{ matrix.replace_default && '-replace-default' || '' }}
66-
fail-on-cache-miss: true
46+
github_token: ${{ secrets.GITHUB_TOKEN }}
47+
workflow: build-wolfprovider-nightly.yml
48+
branch: ${{ github.ref_name }}
49+
name: debian-packages-${{ matrix.fips_ref }}${{ matrix.replace_default && '-replace-default' || '' }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}
50+
path: /tmp/packages
51+
52+
- name: Setup package directories
53+
run: |
54+
mv /tmp/packages/wolfssl-packages ${{ env.WOLFSSL_PACKAGES_PATH }}
55+
mv /tmp/packages/openssl-packages ${{ env.OPENSSL_PACKAGES_PATH }}
56+
mv /tmp/packages/wolfprov-packages ${{ env.WOLFPROV_PACKAGES_PATH }}
6757
6858
- name: Install wolfSSL/OpenSSL/wolfprov packages
6959
run: |
70-
printf "Installing OpenSSL/wolfProvider packages:\n"
60+
printf "Installing OpenSSL/wolfProvider packages (${{ matrix.fips_ref }}):\n"
7161
ls -la ${{ env.WOLFSSL_PACKAGES_PATH }}
7262
ls -la ${{ env.OPENSSL_PACKAGES_PATH }}
7363
ls -la ${{ env.WOLFPROV_PACKAGES_PATH }}
7464
7565
apt install --reinstall -y \
76-
${{ env.WOLFSSL_PACKAGES_PATH }}/libwolfssl_*.deb
66+
${{ env.WOLFSSL_PACKAGES_PATH }}/*.deb
7767
7868
apt install --reinstall -y \
7969
${{ env.OPENSSL_PACKAGES_PATH }}/openssl_*.deb \
8070
${{ env.OPENSSL_PACKAGES_PATH }}/libssl3_*.deb \
8171
${{ env.OPENSSL_PACKAGES_PATH }}/libssl-dev_*.deb
8272
8373
apt install --reinstall -y \
84-
${{ env.WOLFPROV_PACKAGES_PATH }}/libwolfprov_*.deb
74+
${{ env.WOLFPROV_PACKAGES_PATH }}/*.deb
8575
8676
- name: Verify wolfProvider is properly installed
8777
run: |
88-
$GITHUB_WORKSPACE/scripts/verify-install.sh ${{ matrix.replace_default && '--replace-default' || '' }} ${{ matrix.fips && '--fips' || '' }}
78+
$GITHUB_WORKSPACE/scripts/verify-install.sh \
79+
${{ matrix.replace_default && '--replace-default' || '' }} \
80+
${{ matrix.fips_ref == 'FIPS' && '--fips' || '' }}
8981
9082
- name: Install bind9 test dependencies
9183
run: |
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: Nightly Build wolfProvider
2+
3+
on:
4+
push:
5+
branches: [ 'master', 'main', 'build-wolfprov-debian-test', 'release/**' ]
6+
pull_request:
7+
branches: [ '*' ]
8+
schedule:
9+
# Jenkins: 2AM UTC nightly - Actual nightly build
10+
# GitHub Actions: 3AM UTC nightly - Update build in github
11+
- cron: "0 3 * * *"
12+
workflow_dispatch:
13+
inputs:
14+
wolfssl_ref:
15+
description: 'wolfSSL ref (tag/branch)'
16+
required: false
17+
default: 'v5.8.2-stable'
18+
type: string
19+
openssl_ref:
20+
description: 'OpenSSL ref (tag/branch)'
21+
required: false
22+
default: 'openssl-3.5.2'
23+
type: string
24+
fips_ref:
25+
description: 'Build type'
26+
required: false
27+
default: 'both'
28+
type: choice
29+
options:
30+
- 'both'
31+
- 'FIPS'
32+
- 'non-FIPS'
33+
replace_default:
34+
description: 'Replace default provider'
35+
required: false
36+
default: true
37+
type: boolean
38+
39+
concurrency:
40+
group: ${{ github.workflow }}-${{ github.ref }}
41+
cancel-in-progress: true
42+
43+
jobs:
44+
build_wolfprovider:
45+
name: Build wolfProvider
46+
uses: ./.github/workflows/build-wolfprovider.yml
47+
strategy:
48+
matrix:
49+
# When manually triggered with 'both', or on schedule, build both FIPS and non-FIPS
50+
# When manually triggered with specific type, only build that type
51+
fips_ref: ${{ (github.event_name == 'schedule' || github.event.inputs.fips_ref == 'both' || github.event.inputs.fips_ref == '') && fromJSON('["FIPS", "non-FIPS"]') || fromJSON(format('["{0}"]', github.event.inputs.fips_ref)) }}
52+
with:
53+
wolfssl_ref: ${{ github.event.inputs.wolfssl_ref || 'v5.8.2-stable' }}
54+
openssl_ref: ${{ github.event.inputs.openssl_ref || 'openssl-3.5.2' }}
55+
fips_ref: ${{ matrix.fips_ref }}
56+
replace_default: ${{ github.event.inputs.replace_default != 'false' }}
57+
secrets: inherit

0 commit comments

Comments
 (0)