Skip to content

Commit 14d22e7

Browse files
committed
Use Debian Bookworm in Github actions
1 parent 049d702 commit 14d22e7

Some content is hidden

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

45 files changed

+821
-127
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: 15 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:
@@ -52,7 +64,7 @@ jobs:
5264
openssl-install/include
5365
openssl-install/bin
5466
55-
key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }}
67+
key: wolfprov${{ matrix.replace_default && '-replace-default' }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }}
5668
fail-on-cache-miss: true
5769

5870
- name: Install bind9 test dependencies
@@ -62,7 +74,7 @@ jobs:
6274
sudo apt install -y build-essential automake libtool gnutls-bin \
6375
pkg-config make libidn2-dev libuv1-dev libnghttp2-dev libcap-dev \
6476
libjemalloc-dev zlib1g-dev libxml2-dev libjson-c-dev libcmocka-dev \
65-
python3-pytest python3-dnspython python3-hypothesis
77+
python3-pytest python3-dnspython python3-hypothesis net-tools iproute2
6678
sudo PERL_MM_USE_DEFAULT=1 cpan -i Net::DNS
6779
6880
- name: Checkout bind9
@@ -85,6 +97,7 @@ jobs:
8597
8698
- name: Build and test bind9 with wolfProvider
8799
working-directory: bind9
100+
shell: bash
88101
run: |
89102
# Set up the environment for wolfProvider
90103
source $GITHUB_WORKSPACE/scripts/env-setup

.github/workflows/build-wolfprovider.yml

Lines changed: 30 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"
@@ -18,10 +23,20 @@ jobs:
1823
build_wolfprovider_common:
1924
name: Build wolfProvider
2025
runs-on: ubuntu-22.04
26+
container:
27+
image: debian:bookworm
28+
env:
29+
DEBIAN_FRONTEND: noninteractive
2130
timeout-minutes: 20
2231
outputs:
23-
cache_key: wolfprov-${{ inputs.wolfssl_ref }}-${{ inputs.openssl_ref }}-${{ github.sha }}
32+
cache_key: wolfprov${{ inputs.replace_default && '-replace-default' }}-${{ inputs.wolfssl_ref }}-${{ inputs.openssl_ref }}-${{ github.sha }}
2433
steps:
34+
35+
- name: Install dependencies (needed for Debian)
36+
run: |
37+
apt-get update && \
38+
apt-get install -y curl jq git build-essential autoconf libtool pkg-config patch
39+
2540
- name: Checkout wolfProvider
2641
uses: actions/checkout@v4
2742
with:
@@ -52,7 +67,7 @@ jobs:
5267
with:
5368
path: |
5469
openssl-install
55-
key: ossl-depends-${{ steps.openssl-ref.outputs.ref }}
70+
key: ossl${{ inputs.replace_default && '-replace-default' }}-depends-${{ steps.openssl-ref.outputs.ref }}
5671
lookup-only: false
5772

5873
# Look for a cached version of WolfSSL
@@ -67,7 +82,17 @@ jobs:
6782

6883
- name: Build wolfProvider
6984
run: |
70-
OPENSSL_TAG=${{ inputs.openssl_ref }} WOLFSSL_TAG=${{ inputs.wolfssl_ref }} ./scripts/build-wolfprovider.sh
85+
# Clean if there's a build mode mismatch
86+
if ! OPENSSL_TAG=${{ inputs.openssl_ref }} WOLFSSL_TAG=${{ inputs.wolfssl_ref }} ./scripts/build-wolfprovider.sh ${{ inputs.replace_default && '--replace-default' || '' }}; then
87+
echo "Build failed, attempting distclean and rebuild..."
88+
./scripts/build-wolfprovider.sh --distclean
89+
OPENSSL_TAG=${{ inputs.openssl_ref }} WOLFSSL_TAG=${{ inputs.wolfssl_ref }} ./scripts/build-wolfprovider.sh ${{ inputs.replace_default && '--replace-default' || '' }}
90+
fi
91+
92+
- name: Check paths before saving to cache
93+
run: |
94+
ls -al $GITHUB_WORKSPACE
95+
ls -al $GITHUB_WORKSPACE/openssl-install
7196
7297
# Save the wolfProvider outputs for use by the parent jobs.
7398
# Note that we don't try to restore since it will likely always
@@ -81,7 +106,7 @@ jobs:
81106
openssl-install/lib64
82107
openssl-install/include
83108
openssl-install/bin
84-
key: wolfprov-${{ inputs.wolfssl_ref }}-${{ inputs.openssl_ref }}-${{ github.sha }}
109+
key: wolfprov${{ inputs.replace_default && '-replace-default' }}-${{ inputs.wolfssl_ref }}-${{ inputs.openssl_ref }}-${{ github.sha }}
85110

86111
# If openssl cache miss, save it to the cache
87112
- name: Save OpenSSL into cache
@@ -90,7 +115,7 @@ jobs:
90115
with:
91116
path: |
92117
openssl-install
93-
key: ossl-depends-${{ steps.openssl-ref.outputs.ref }}
118+
key: ossl${{ inputs.replace_default && '-replace-default' }}-depends-${{ steps.openssl-ref.outputs.ref }}
94119

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

.github/workflows/cjose.yml

Lines changed: 37 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,42 @@ 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:
34+
image: debian:bookworm
35+
env:
36+
DEBIAN_FRONTEND: noninteractive
2837
needs: build_wolfprovider
2938
# This should be a safe limit for the tests to run.
3039
timeout-minutes: 20
3140
strategy:
3241
matrix:
33-
cjose_ref: [ 'master', 'v0.6.2.1' ]
42+
cjose_ref: [ 'v0.6.2.1' ]
3443
wolfssl_ref: [ 'master', 'v5.8.0-stable' ]
3544
openssl_ref: [ 'openssl-3.5.0' ]
3645
force_fail: [ 'WOLFPROV_FORCE_FAIL=1', '' ]
46+
replace_default: [ false, true ]
47+
exclude:
48+
- wolfssl_ref: 'master'
49+
replace_default: true
3750
steps:
51+
- name: Install dependencies (needed for Debian)
52+
if: ${{ matrix.replace_default }}
53+
run: |
54+
apt-get update && \
55+
apt-get install -y curl jq
56+
3857
- name: Checkout wolfProvider
3958
uses: actions/checkout@v4
4059
with:
@@ -51,12 +70,15 @@ jobs:
5170
openssl-install/include
5271
openssl-install/bin
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 }}
5574
fail-on-cache-miss: true
5675

5776
- name: Install cjose dependencies
5877
run: |
59-
sudo apt-get install -y libjansson-dev check
78+
export DEBIAN_FRONTEND=noninteractive
79+
apt-get update && \
80+
apt-get install -y build-essential autoconf automake libtool \
81+
pkg-config gcc make libjansson-dev check
6082
6183
- name: Download cjose
6284
uses: actions/checkout@v4
@@ -68,18 +90,27 @@ jobs:
6890

6991
- name: Build cjose
7092
working-directory: cjose
93+
shell: bash
7194
run: |
95+
# Set up the environment for wolfProvider
96+
source $GITHUB_WORKSPACE/scripts/env-setup
97+
98+
# Set additional environment variables for OpenSSL
99+
export OPENSSL_INSTALL=$GITHUB_WORKSPACE/openssl-install
100+
export LDFLAGS="-L${OPENSSL_INSTALL}/lib64 -L${OPENSSL_INSTALL}/lib"
101+
export CPPFLAGS="-I${OPENSSL_INSTALL}/include"
102+
export PKG_CONFIG_PATH="${OPENSSL_INSTALL}/lib64/pkgconfig:${OPENSSL_INSTALL}/lib/pkgconfig:${PKG_CONFIG_PATH}"
103+
72104
# Configure with OpenSSL
73-
./configure CFLAGS="-Wno-error=deprecated-declarations" --with-openssl=$GITHUB_WORKSPACE/openssl-install
105+
./configure CFLAGS="-Wno-error=deprecated-declarations" --with-openssl=$OPENSSL_INSTALL
74106
75107
# Build cjose
76108
make
77109
78110
- name: Run cjose tests
79111
working-directory: cjose
112+
shell: bash
80113
run: |
81-
# Set up the environment for wolfProvider
82-
source $GITHUB_WORKSPACE/scripts/env-setup
83114
export ${{ matrix.force_fail }}
84115
85116
# Run tests

.github/workflows/cmdline.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,12 @@ jobs:
2121
matrix:
2222
openssl_ref: [ 'master', 'openssl-3.5.0' ]
2323
wolfssl_ref: [ 'master', 'v5.8.0-stable' ]
24+
replace_default: [ false, true ]
2425
force_fail: ['WOLFPROV_FORCE_FAIL=1', '']
2526
debug: ['WOLFPROV_DEBUG=1', '']
27+
exclude:
28+
- wolfssl_ref: 'master'
29+
replace_default: true
2630
steps:
2731
- name: Checkout wolfProvider
2832
uses: actions/checkout@v4
@@ -43,17 +47,17 @@ jobs:
4347
openssl-install/include
4448
openssl-install/bin
4549
46-
key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }}
50+
key: wolfprov${{ matrix.replace_default && '-replace-default' }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }}
4751
# Normally we would fail on cache miss, but we rebuild below
4852
# for the DEBUG build.
4953
fail-on-cache-miss: false
5054

5155
# If not yet built this version, build it now
5256
- name: Build wolfProvider
5357
# 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'
58+
if: steps.wolfprov-cache.outputs.cache-hit != 'true'
5559
run: |
56-
${{ matrix.debug }} OPENSSL_TAG=${{ matrix.openssl_ref }} WOLFSSL_TAG=${{ matrix.wolfssl_ref }} ./scripts/build-wolfprovider.sh
60+
${{ matrix.debug }} OPENSSL_TAG=${{ matrix.openssl_ref }} WOLFSSL_TAG=${{ matrix.wolfssl_ref }} ./scripts/build-wolfprovider.sh ${{ matrix.replace_default && '--replace-default' || '' }}
5761
5862
- name: Run tests
5963
run: |

.github/workflows/curl.yml

Lines changed: 28 additions & 4 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_curl:
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
@@ -33,10 +39,13 @@ jobs:
3339
curl_ref: [ 'master', 'curl-8_4_0', 'curl-7_88_1' ]
3440
wolfssl_ref: [ 'master', 'v5.8.0-stable' ]
3541
openssl_ref: [ 'openssl-3.5.0' ]
42+
replace_default: [ false, true ]
3643
force_fail: ['WOLFPROV_FORCE_FAIL=1', '']
3744
exclude:
3845
- curl_ref: 'master'
3946
force_fail: 'WOLFPROV_FORCE_FAIL=1'
47+
- wolfssl_ref: 'master'
48+
replace_default: true
4049
steps:
4150
- name: Checkout wolfProvider
4251
uses: actions/checkout@v4
@@ -54,21 +63,34 @@ jobs:
5463
openssl-install/include
5564
openssl-install/bin
5665
57-
key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }}
66+
key: wolfprov${{ matrix.replace_default && '-replace-default' }}-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }}
5867
fail-on-cache-miss: true
5968

6069
- name: Install dependencies
6170
run: |
62-
sudo apt-get update
63-
sudo apt-get install nghttp2 libpsl5 libpsl-dev python3-impacket
71+
export DEBIAN_FRONTEND=noninteractive
72+
apt-get update
73+
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+
shell: bash
78+
run: |
79+
# Set up the environment for wolfProvider
80+
source $GITHUB_WORKSPACE/scripts/env-setup
81+
echo "OPENSSL_LIB_PATH=$OPENSSL_LIB_PATH" >> $GITHUB_ENV
82+
echo "LD_LIBRARY_PATH=$LD_LIBRARY_PATH" >> $GITHUB_ENV
83+
echo "PKG_CONFIG_PATH=$PKG_CONFIG_PATH" >> $GITHUB_ENV
84+
echo "CPPFLAGS=$CPPFLAGS" >> $GITHUB_ENV
85+
echo "LDFLAGS=$LDFLAGS" >> $GITHUB_ENV
6486
6587
- name: Build curl
6688
uses: wolfSSL/actions-build-autotools-project@v1
6789
with:
6890
repository: curl/curl
6991
path: curl
7092
ref: ${{ matrix.curl_ref }}
71-
configure: --with-openssl
93+
configure: --with-openssl=$OPENSSL_LIB_PATH
7294
check: false
7395

7496
- name: Generate certificates for curl master force-fail tests
@@ -79,8 +101,10 @@ jobs:
79101
make test-ca.cacert
80102
cd ../..
81103
fi
104+
82105
- name: Test curl with wolfProvider
83106
working-directory: curl
107+
shell: bash
84108
run: |
85109
# Set up the environment for wolfProvider
86110
source $GITHUB_WORKSPACE/scripts/env-setup

0 commit comments

Comments
 (0)