Skip to content

Commit 0452df2

Browse files
committed
rebase add-ci-worklfows
1 parent 5ced833 commit 0452df2

18 files changed

+2233
-10
lines changed

.github/workflows/async.yml

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
name: Async Tests
2+
3+
# START OF COMMON SECTION
4+
on:
5+
push:
6+
branches: [ 'master', 'main', 'release/**' ]
7+
pull_request:
8+
branches: [ '*' ]
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
# END OF COMMON SECTION
14+
15+
jobs:
16+
build_wolfprovider:
17+
name: Build wolfProvider
18+
runs-on: ubuntu-22.04
19+
timeout-minutes: 20
20+
strategy:
21+
matrix:
22+
wolfssl_ref: [ 'master', 'v5.7.4-stable' ]
23+
steps:
24+
- name: Checkout wolfProvider
25+
uses: actions/checkout@v4
26+
27+
# Check if this version of wolfssl/wolfprovider has already been built,
28+
# mark to cache these items on post if we do end up building
29+
- name: Checking wolfSSL/wolfProvider in cache
30+
uses: actions/cache@v4
31+
id: wolfprov-cache
32+
with:
33+
path: |
34+
wolfssl-source
35+
wolfssl-install
36+
wolfprov-install
37+
provider.conf
38+
39+
key: wolfprov-${{ matrix.wolfssl_ref }}-${{ github.sha }}
40+
lookup-only: true
41+
42+
# If wolfssl/wolfprovider have not yet been built, pull ossl from cache
43+
- name: Checking OpenSSL in cache
44+
if: steps.wolfprov-${{ matrix.wolfssl_ref }}-cache.hit != 'true'
45+
uses: actions/cache@v4
46+
id: openssl-cache
47+
with:
48+
path: |
49+
openssl-source
50+
openssl-install
51+
52+
key: ossl-depends
53+
54+
# If not yet built this version, build it now
55+
- name: Build wolfProvider with async support
56+
if: steps.wolfprov-${{ matrix.wolfssl_ref }}-cache.hit != 'true'
57+
run: |
58+
WOLFSSL_TAG=${{ matrix.wolfssl_ref }} WOLFSSL_CONFIGURE="--enable-asynccrypt" ./scripts/build-wolfprovider.sh
59+
60+
- name: Print errors
61+
if: ${{ failure() }}
62+
run: |
63+
if [ -f test-suite.log ] ; then
64+
cat test-suite.log
65+
fi
66+
67+
test_async:
68+
runs-on: ubuntu-22.04
69+
needs: build_wolfprovider
70+
# This should be a safe limit for the tests to run.
71+
timeout-minutes: 20
72+
strategy:
73+
matrix:
74+
wolfssl_ref: [ 'master', 'v5.7.4-stable' ]
75+
steps:
76+
- name: Retrieving OpenSSL from cache
77+
uses: actions/cache/restore@v4
78+
id: openssl-cache
79+
with:
80+
path: |
81+
openssl-source
82+
openssl-install
83+
84+
key: ossl-depends
85+
fail-on-cache-miss: true
86+
87+
- name: Retrieving wolfSSL/wolfProvider from cache
88+
uses: actions/cache/restore@v4
89+
id: wolfprov-cache
90+
with:
91+
path: |
92+
wolfssl-source
93+
wolfssl-install
94+
wolfprov-install
95+
provider.conf
96+
97+
key: wolfprov-${{ matrix.wolfssl_ref }}-${{ github.sha }}
98+
fail-on-cache-miss: true
99+
100+
- name: Checkout wolfProvider
101+
uses: actions/checkout@v4
102+
103+
- name: Test wolfProvider with async
104+
run: |
105+
export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/wolfssl-install/lib:$GITHUB_WORKSPACE/openssl-install/lib64
106+
export OPENSSL_CONF=$GITHUB_WORKSPACE/provider.conf
107+
export OPENSSL_MODULES=$GITHUB_WORKSPACE/wolfprov-install/lib
108+
./scripts/test-openssl.sh

.github/workflows/bind.yml

Lines changed: 139 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
name: Bind9 Tests
2+
3+
# START OF COMMON SECTION
4+
on:
5+
push:
6+
branches: [ 'master', 'main', 'release/**' ]
7+
pull_request:
8+
branches: [ '*' ]
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
# END OF COMMON SECTION
14+
15+
jobs:
16+
build_wolfprovider:
17+
name: Build wolfProvider
18+
runs-on: ubuntu-22.04
19+
timeout-minutes: 20
20+
strategy:
21+
matrix:
22+
wolfssl_ref: [ 'master', 'v5.7.4-stable' ]
23+
steps:
24+
- name: Checkout wolfProvider
25+
uses: actions/checkout@v4
26+
27+
# Check if this version of wolfssl/wolfprovider has already been built
28+
- name: Checking wolfSSL/wolfProvider in cache
29+
uses: actions/cache@v4
30+
id: wolfprov-cache
31+
with:
32+
path: |
33+
wolfssl-source
34+
wolfssl-install
35+
wolfprov-install
36+
provider.conf
37+
38+
key: wolfprov-${{ matrix.wolfssl_ref }}-${{ github.sha }}
39+
lookup-only: true
40+
41+
# If wolfssl/wolfprovider have not yet been built, pull ossl from cache
42+
- name: Checking OpenSSL in cache
43+
if: steps.wolfprov-cache.outputs.cache-hit != 'true'
44+
uses: actions/cache@v4
45+
id: openssl-cache
46+
with:
47+
path: |
48+
openssl-source
49+
openssl-install
50+
51+
key: ossl-depends
52+
fail-on-cache-miss: false
53+
54+
# If not yet built this version, build it now
55+
- name: Build wolfProvider
56+
if: steps.wolfprov-cache.outputs.cache-hit != 'true'
57+
run: |
58+
OPENSSL_TAG=openssl-3.2.0 WOLFSSL_TAG=${{ matrix.wolfssl_ref }} ./scripts/build-wolfprovider.sh
59+
60+
- name: Print errors
61+
if: ${{ failure() }}
62+
run: |
63+
if [ -f test-suite.log ] ; then
64+
cat test-suite.log
65+
fi
66+
67+
test_bind:
68+
runs-on: ubuntu-22.04
69+
needs: build_wolfprovider
70+
# This should be a safe limit for the tests to run.
71+
timeout-minutes: 20
72+
strategy:
73+
fail-fast: false
74+
matrix:
75+
bind_ref: [ '9.18.0', '9.18.28' ]
76+
wolfssl_ref: [ 'master', 'v5.7.4-stable' ]
77+
steps:
78+
- name: Retrieving OpenSSL from cache
79+
uses: actions/cache/restore@v4
80+
id: openssl-cache
81+
with:
82+
path: |
83+
openssl-source
84+
openssl-install
85+
86+
key: ossl-depends
87+
fail-on-cache-miss: false
88+
89+
- name: Retrieving wolfSSL/wolfProvider from cache
90+
uses: actions/cache/restore@v4
91+
id: wolfprov-cache
92+
with:
93+
path: |
94+
wolfssl-source
95+
wolfssl-install
96+
wolfprov-install
97+
provider.conf
98+
99+
key: wolfprov-${{ matrix.wolfssl_ref }}-${{ github.sha }}
100+
fail-on-cache-miss: true
101+
102+
- name: Install dependencies
103+
run: |
104+
# Don't prompt for anything
105+
export DEBIAN_FRONTEND=noninteractive
106+
sudo apt-get update
107+
# bind9 dependencies
108+
sudo apt-get install -y libuv1-dev libnghttp2-dev libcap-dev libcmocka-dev
109+
110+
- name: Checkout bind9
111+
uses: actions/checkout@v4
112+
with:
113+
repository: isc-projects/bind9
114+
path: bind9
115+
ref: v${{ matrix.bind_ref }}
116+
117+
- name: Build and test bind9 with wolfProvider
118+
working-directory: bind9
119+
run: |
120+
# Setup environment for wolfProvider
121+
export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/wolfssl-install/lib:$GITHUB_WORKSPACE/openssl-install/lib64
122+
export OPENSSL_CONF=$GITHUB_WORKSPACE/provider.conf
123+
export OPENSSL_MODULES=$GITHUB_WORKSPACE/wolfprov-install/lib
124+
125+
# Generate configure script
126+
autoreconf -ivf
127+
128+
# Configure with OpenSSL
129+
./configure --with-openssl=$GITHUB_WORKSPACE/openssl-install
130+
131+
# Disable system tests and dst_test
132+
sed -i 's/SUBDIRS = system//g' bin/tests/Makefile
133+
sed -i 's/dst_test//g' lib/dns/tests/Makefile
134+
135+
# Build bind9
136+
make -j$(nproc) V=1
137+
138+
# Run tests
139+
make -j$(nproc) V=1 check

.github/workflows/cmake.yml

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: WolfProvider CMake Tests
2+
3+
# START OF COMMON SECTION
4+
on:
5+
push:
6+
branches: [ 'master', 'main', 'release/**' ]
7+
pull_request:
8+
branches: [ '*' ]
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.ref }}
12+
cancel-in-progress: true
13+
# END OF COMMON SECTION
14+
15+
jobs:
16+
build_wolfprovider:
17+
name: Build wolfProvider
18+
runs-on: ubuntu-22.04
19+
timeout-minutes: 20
20+
strategy:
21+
matrix:
22+
wolfssl_ref: [ 'master', 'v5.7.4-stable' ]
23+
steps:
24+
- name: Checkout wolfProvider
25+
uses: actions/checkout@v4
26+
27+
# Check if this version of wolfssl/wolfprovider has already been built,
28+
# mark to cache these items on post if we do end up building
29+
- name: Checking wolfSSL/wolfProvider in cache
30+
uses: actions/cache@v4
31+
id: wolfprov-cache
32+
with:
33+
path: |
34+
wolfssl-source
35+
wolfssl-install
36+
wolfprov-install
37+
provider.conf
38+
39+
key: wolfprov-${{ matrix.wolfssl_ref }}-${{ github.sha }}
40+
lookup-only: true
41+
42+
# If wolfssl/wolfprovider have not yet been built, pull ossl from cache
43+
- name: Checking OpenSSL in cache
44+
if: steps.wolfprov-${{ matrix.wolfssl_ref }}-cache.hit != 'true'
45+
uses: actions/cache@v4
46+
id: openssl-cache
47+
with:
48+
path: |
49+
openssl-source
50+
openssl-install
51+
52+
key: ossl-depends
53+
54+
# If not yet built this version, build it now
55+
- name: Build wolfProvider
56+
if: steps.wolfprov-${{ matrix.wolfssl_ref }}-cache.hit != 'true'
57+
run: |
58+
WOLFSSL_TAG=${{ matrix.wolfssl_ref }} ./scripts/build-wolfprovider.sh
59+
60+
- name: Print errors
61+
if: ${{ failure() }}
62+
run: |
63+
if [ -f test-suite.log ] ; then
64+
cat test-suite.log
65+
fi
66+
67+
test_cmake:
68+
name: Test CMake
69+
runs-on: ubuntu-22.04
70+
needs: build_wolfprovider
71+
# This should be a safe limit for the tests to run.
72+
timeout-minutes: 20
73+
steps:
74+
- name: Install dependencies
75+
run: |
76+
sudo apt-get update
77+
sudo apt-get install -y cmake ninja-build
78+
79+
# Build wolfProvider with standard options
80+
- name: Build wolfProvider
81+
run: |
82+
mkdir build
83+
cd build
84+
cmake -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON \
85+
-DCMAKE_INSTALL_PREFIX="$GITHUB_WORKSPACE/wolfprov-install" \
86+
-DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/openssl-install;$GITHUB_WORKSPACE/install" \
87+
-DWITH_OPENSSL3=ON \
88+
-DBUILD_SHARED_LIBS=ON \
89+
-DBUILD_EXAMPLE=ON \
90+
-DBUILD_TESTS=ON \
91+
-DCMAKE_C_FLAGS="-Wall -Wextra -Werror" \
92+
..
93+
cmake --build .
94+
ctest -j $(nproc)
95+
cmake --install .
96+
97+
# clean up
98+
cd ..
99+
rm -rf build
100+

0 commit comments

Comments
 (0)