Skip to content

Commit 6df72bb

Browse files
committed
Rebase to get master changes
1 parent c5e7219 commit 6df72bb

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

+516
-22
lines changed

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,23 @@ if [ "$WOLFPROV_FORCE_FAIL" = "WOLFPROV_FORCE_FAIL=1" ]; then
293293
echo "Error: $IPERF_TEST_LOG not found"
294294
exit 1
295295
fi
296+
# ----- BIND9 -----
297+
elif [ "$TEST_SUITE" = "bind9" ]; then
298+
if [ -f "bind9-test.log" ]; then
299+
# Check for expected error count (12 errors) and non-zero exit code
300+
if grep -q "ERROR: 12" bind9-test.log && [ $TEST_RESULT -ne 0 ]; then
301+
echo "PASS: BIND9 tests failed as expected with force fail enabled (12 errors)"
302+
exit 0
303+
else
304+
echo "FAIL: BIND9 tests did not fail as expected with force fail enabled"
305+
echo " Expected: 12 errors and non-zero exit code"
306+
echo " Got: $(grep 'ERROR:' bind9-test.log | tail -1) and exit code $TEST_RESULT"
307+
exit 1
308+
fi
309+
else
310+
echo "Error: bind9-test.log not found"
311+
exit 1
312+
fi
296313
else
297314
if [ $TEST_RESULT -eq 0 ]; then
298315
echo "$TEST_SUITE tests unexpectedly succeeded with force fail enabled"

.github/workflows/bind9.yml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,19 @@ jobs:
1818
with:
1919
wolfssl_ref: ${{ matrix.wolfssl_ref }}
2020
openssl_ref: ${{ matrix.openssl_ref }}
21+
replace_default: ${{ matrix.replace_default || false }}
2122
strategy:
2223
matrix:
2324
wolfssl_ref: [ 'master', 'v5.8.0-stable' ]
2425
openssl_ref: [ 'openssl-3.5.0' ]
26+
replace_default: [ false, 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
@@ -34,8 +40,14 @@ jobs:
3440
bind_ref: [ 'v9.18.28' ]
3541
wolfssl_ref: [ 'master', 'v5.8.0-stable' ]
3642
openssl_ref: [ 'openssl-3.5.0' ]
43+
replace_default: [ false, true ]
3744
force_fail: ['WOLFPROV_FORCE_FAIL=1', '']
3845
steps:
46+
- name: Install sudo
47+
run: |
48+
apt-get update
49+
apt-get install -y sudo
50+
3951
- name: Checkout wolfProvider
4052
uses: actions/checkout@v4
4153
with:
@@ -51,8 +63,9 @@ jobs:
5163
openssl-install/lib64
5264
openssl-install/include
5365
openssl-install/bin
66+
${{ matrix.replace_default && 'libdefault-stub-install' || '' }}
5467
55-
key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }}
68+
key: wolfprov${{ matrix.replace_default && '-replace-default' || '' }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }}
5669
fail-on-cache-miss: true
5770

5871
- name: Install bind9 test dependencies
@@ -62,7 +75,7 @@ jobs:
6275
sudo apt install -y build-essential automake libtool gnutls-bin \
6376
pkg-config make libidn2-dev libuv1-dev libnghttp2-dev libcap-dev \
6477
libjemalloc-dev zlib1g-dev libxml2-dev libjson-c-dev libcmocka-dev \
65-
python3-pytest python3-dnspython python3-hypothesis
78+
python3-pytest python3-dnspython python3-hypothesis net-tools iproute2
6679
sudo PERL_MM_USE_DEFAULT=1 cpan -i Net::DNS
6780
6881
- name: Checkout bind9
@@ -85,6 +98,7 @@ jobs:
8598
8699
- name: Build and test bind9 with wolfProvider
87100
working-directory: bind9
101+
shell: bash
88102
run: |
89103
# Set up the environment for wolfProvider
90104
source $GITHUB_WORKSPACE/scripts/env-setup

.github/workflows/build-wolfprovider.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,11 @@ on:
99
openssl_ref:
1010
required: true
1111
type: string
12+
replace_default:
13+
required: false
14+
type: boolean
15+
default: false
16+
description: "Build with --replace-default flag"
1217
outputs:
1318
cache_key:
1419
description: "Cache key for the build artifacts"
@@ -20,7 +25,7 @@ jobs:
2025
runs-on: ubuntu-22.04
2126
timeout-minutes: 20
2227
outputs:
23-
cache_key: wolfprov-${{ inputs.wolfssl_ref }}-${{ inputs.openssl_ref }}-${{ github.sha }}
28+
cache_key: wolfprov${{ inputs.replace_default && '-replace-default' || '' }}-${{ inputs.wolfssl_ref }}-${{ inputs.openssl_ref }}-${{ github.sha }}
2429
steps:
2530
- name: Checkout wolfProvider
2631
uses: actions/checkout@v4
@@ -52,7 +57,8 @@ jobs:
5257
with:
5358
path: |
5459
openssl-install
55-
key: ossl-depends-${{ steps.openssl-ref.outputs.ref }}
60+
${{ inputs.replace_default && 'libdefault-stub-install' || '' }}
61+
key: ossl${{ inputs.replace_default && '-replace-default' || '' }}-depends-${{ steps.openssl-ref.outputs.ref }}
5662
lookup-only: false
5763

5864
# Look for a cached version of WolfSSL
@@ -67,7 +73,12 @@ jobs:
6773

6874
- name: Build wolfProvider
6975
run: |
70-
OPENSSL_TAG=${{ inputs.openssl_ref }} WOLFSSL_TAG=${{ inputs.wolfssl_ref }} ./scripts/build-wolfprovider.sh
76+
# Clean if there's a build mode mismatch
77+
if ! OPENSSL_TAG=${{ inputs.openssl_ref }} WOLFSSL_TAG=${{ inputs.wolfssl_ref }} ./scripts/build-wolfprovider.sh ${{ inputs.replace_default && '--replace-default' || '' }}; then
78+
echo "Build failed, attempting distclean and rebuild..."
79+
./scripts/build-wolfprovider.sh --distclean
80+
OPENSSL_TAG=${{ inputs.openssl_ref }} WOLFSSL_TAG=${{ inputs.wolfssl_ref }} ./scripts/build-wolfprovider.sh ${{ inputs.replace_default && '--replace-default' || '' }}
81+
fi
7182
7283
# Save the wolfProvider outputs for use by the parent jobs.
7384
# Note that we don't try to restore since it will likely always
@@ -81,7 +92,8 @@ jobs:
8192
openssl-install/lib64
8293
openssl-install/include
8394
openssl-install/bin
84-
key: wolfprov-${{ inputs.wolfssl_ref }}-${{ inputs.openssl_ref }}-${{ github.sha }}
95+
${{ inputs.replace_default && 'libdefault-stub-install' || '' }}
96+
key: wolfprov${{ inputs.replace_default && '-replace-default' || '' }}-${{ inputs.wolfssl_ref }}-${{ inputs.openssl_ref }}-${{ github.sha }}
8597

8698
# If openssl cache miss, save it to the cache
8799
- name: Save OpenSSL into cache
@@ -90,7 +102,8 @@ jobs:
90102
with:
91103
path: |
92104
openssl-install
93-
key: ossl-depends-${{ steps.openssl-ref.outputs.ref }}
105+
${{ inputs.replace_default && 'libdefault-stub-install' || '' }}
106+
key: ossl${{ inputs.replace_default && '-replace-default' || '' }}-depends-${{ steps.openssl-ref.outputs.ref }}
94107

95108
- name: Save WolfSSL into cache
96109
if: steps.wolfssl-cache.outputs.cache-hit != 'true'

.github/workflows/cjose.yml

Lines changed: 39 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,41 @@ jobs:
1818
with:
1919
wolfssl_ref: ${{ matrix.wolfssl_ref }}
2020
openssl_ref: ${{ matrix.openssl_ref }}
21+
replace_default: ${{ matrix.replace_default || false }}
2122
strategy:
2223
matrix:
2324
wolfssl_ref: [ 'master', 'v5.8.0-stable' ]
2425
openssl_ref: [ 'openssl-3.5.0' ]
26+
replace_default: [ false, true ]
27+
exclude:
28+
- wolfssl_ref: 'master'
29+
replace_default: true
2530

2631
test_cjose:
2732
runs-on: ubuntu-22.04
33+
container: ${{ matrix.replace_default && 'debian:bookworm' || null }}
34+
env:
35+
DEBIAN_FRONTEND: ${{ matrix.replace_default && 'noninteractive' || '' }}
2836
needs: build_wolfprovider
2937
# This should be a safe limit for the tests to run.
3038
timeout-minutes: 20
3139
strategy:
3240
matrix:
33-
cjose_ref: [ 'master', 'v0.6.2.1' ]
41+
cjose_ref: [ 'v0.6.2.1' ]
3442
wolfssl_ref: [ 'master', 'v5.8.0-stable' ]
3543
openssl_ref: [ 'openssl-3.5.0' ]
3644
force_fail: [ 'WOLFPROV_FORCE_FAIL=1', '' ]
45+
replace_default: [ false, true ]
46+
exclude:
47+
- wolfssl_ref: 'master'
48+
replace_default: true
3749
steps:
50+
- name: Install dependencies (Docker only)
51+
if: ${{ matrix.replace_default }}
52+
run: |
53+
apt-get update
54+
apt-get install -y sudo curl jq
55+
3856
- name: Checkout wolfProvider
3957
uses: actions/checkout@v4
4058
with:
@@ -50,13 +68,19 @@ jobs:
5068
openssl-install/lib64
5169
openssl-install/include
5270
openssl-install/bin
71+
${{ matrix.replace_default && 'libdefault-stub-install' || '' }}
5372
54-
key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }}
73+
key: wolfprov${{ matrix.replace_default && '-replace-default' || '' }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }}
74+
restore-keys: |
75+
wolfprov${{ matrix.replace_default && '-replace-default' || '' }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-
5576
fail-on-cache-miss: true
5677

5778
- name: Install cjose dependencies
5879
run: |
59-
sudo apt-get install -y libjansson-dev check
80+
export DEBIAN_FRONTEND=noninteractive
81+
sudo apt-get update
82+
sudo apt-get install -y build-essential autoconf automake libtool \
83+
pkg-config gcc make libjansson-dev check
6084
6185
- name: Download cjose
6286
uses: actions/checkout@v4
@@ -68,18 +92,27 @@ jobs:
6892

6993
- name: Build cjose
7094
working-directory: cjose
95+
shell: bash
7196
run: |
97+
# Set up the environment for wolfProvider
98+
source $GITHUB_WORKSPACE/scripts/env-setup
99+
100+
# Set additional environment variables for OpenSSL
101+
export OPENSSL_INSTALL=$GITHUB_WORKSPACE/openssl-install
102+
export LDFLAGS="-L${OPENSSL_INSTALL}/lib64 -L${OPENSSL_INSTALL}/lib"
103+
export CPPFLAGS="-I${OPENSSL_INSTALL}/include"
104+
export PKG_CONFIG_PATH="${OPENSSL_INSTALL}/lib64/pkgconfig:${OPENSSL_INSTALL}/lib/pkgconfig:${PKG_CONFIG_PATH}"
105+
72106
# Configure with OpenSSL
73-
./configure CFLAGS="-Wno-error=deprecated-declarations" --with-openssl=$GITHUB_WORKSPACE/openssl-install
107+
./configure CFLAGS="-Wno-error=deprecated-declarations" --with-openssl=$OPENSSL_INSTALL
74108
75109
# Build cjose
76110
make
77111
78112
- name: Run cjose tests
79113
working-directory: cjose
114+
shell: bash
80115
run: |
81-
# Set up the environment for wolfProvider
82-
source $GITHUB_WORKSPACE/scripts/env-setup
83116
export ${{ matrix.force_fail }}
84117
85118
# Run tests

.github/workflows/cmdline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
# If not yet built this version, build it now
5252
- name: Build wolfProvider
5353
# Only run the test for a cache miss. On hit, we've already run the test.
54-
if: steps.wolfprov-cache-restore.cache-hit != 'true'
54+
if: steps.wolfprov-cache.outputs.cache-hit != 'true'
5555
run: |
5656
${{ matrix.debug }} OPENSSL_TAG=${{ matrix.openssl_ref }} WOLFSSL_TAG=${{ matrix.wolfssl_ref }} ./scripts/build-wolfprovider.sh
5757

.github/workflows/curl.yml

Lines changed: 23 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ jobs:
2525

2626
test_curl:
2727
runs-on: ubuntu-22.04
28+
container:
29+
image: debian:bookworm
30+
env:
31+
DEBIAN_FRONTEND: noninteractive
2832
needs: build_wolfprovider
2933
# This should be a safe limit for the tests to run.
3034
timeout-minutes: 20
@@ -38,6 +42,11 @@ jobs:
3842
- curl_ref: 'master'
3943
force_fail: 'WOLFPROV_FORCE_FAIL=1'
4044
steps:
45+
- name: Install sudo
46+
run: |
47+
apt-get update
48+
apt-get install -y sudo
49+
4150
- name: Checkout wolfProvider
4251
uses: actions/checkout@v4
4352
with:
@@ -59,16 +68,28 @@ jobs:
5968

6069
- name: Install dependencies
6170
run: |
71+
export DEBIAN_FRONTEND=noninteractive
6272
sudo apt-get update
63-
sudo apt-get install nghttp2 libpsl5 libpsl-dev python3-impacket
73+
sudo apt-get install -y build-essential autoconf automake libtool \
74+
pkg-config nghttp2 libpsl5 libpsl-dev python3-impacket
75+
76+
- name: Set up environment for curl build
77+
run: |
78+
# Set up the environment for wolfProvider
79+
source $GITHUB_WORKSPACE/scripts/env-setup
80+
echo "OPENSSL_INSTALL=$OPENSSL_INSTALL" >> $GITHUB_ENV
81+
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $GITHUB_ENV
82+
echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> $GITHUB_ENV
83+
echo "CPPFLAGS=$CPPFLAGS" >> $GITHUB_ENV
84+
echo "LDFLAGS=$LDFLAGS" >> $GITHUB_ENV
6485
6586
- name: Build curl
6687
uses: wolfSSL/actions-build-autotools-project@v1
6788
with:
6889
repository: curl/curl
6990
path: curl
7091
ref: ${{ matrix.curl_ref }}
71-
configure: --with-openssl
92+
configure: --with-openssl=$OPENSSL_INSTALL
7293
check: false
7394

7495
- name: Generate certificates for curl master force-fail tests

.github/workflows/grpc.yml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ jobs:
2525

2626
test_grpc:
2727
runs-on: ubuntu-22.04
28+
container:
29+
image: debian:bookworm
30+
env:
31+
DEBIAN_FRONTEND: noninteractive
2832
needs: build_wolfprovider
2933
# This should be a safe limit for the tests to run.
3034
timeout-minutes: 30
@@ -42,6 +46,11 @@ jobs:
4246
wolfssl_ref: [ 'master', 'v5.8.0-stable' ]
4347
openssl_ref: [ 'openssl-3.5.0' ]
4448
steps:
49+
- name: Install sudo
50+
run: |
51+
apt-get update
52+
apt-get install -y sudo
53+
4554
- name: Checkout wolfProvider
4655
uses: actions/checkout@v4
4756
with:
@@ -68,8 +77,10 @@ jobs:
6877
6978
- name: Install prerequisites
7079
run: |
80+
export DEBIAN_FRONTEND=noninteractive
7181
sudo apt-get update
72-
sudo apt-get install -y build-essential autoconf libtool pkg-config clang libc++-dev
82+
sudo apt-get install -y build-essential autoconf libtool pkg-config \
83+
clang libc++-dev iproute2 net-tools
7384
7485
- name: Setup cmake version
7586
uses: jwlawson/actions-setup-cmake@v2

0 commit comments

Comments
 (0)