Skip to content

Commit d6b29e9

Browse files
authored
Add bind9 Github Workflow (#252)
* Add bind9 workflow rebase * Add fail after build * chore: blank commit to restart CI * chore: blank commit to restart CI
1 parent d7539f2 commit d6b29e9

File tree

1 file changed

+101
-0
lines changed

1 file changed

+101
-0
lines changed

.github/workflows/bind9.yml

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
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+
uses: ./.github/workflows/build-wolfprovider.yml
18+
with:
19+
wolfssl_ref: ${{ matrix.wolfssl_ref }}
20+
openssl_ref: ${{ matrix.openssl_ref }}
21+
strategy:
22+
matrix:
23+
wolfssl_ref: [ 'master', 'v5.8.0-stable' ]
24+
openssl_ref: [ 'openssl-3.5.0' ]
25+
26+
test_bind:
27+
runs-on: ubuntu-22.04
28+
needs: build_wolfprovider
29+
# This should be a safe limit for the tests to run.
30+
timeout-minutes: 20
31+
strategy:
32+
fail-fast: false
33+
matrix:
34+
bind_ref: [ 'v9.18.28' ]
35+
wolfssl_ref: [ 'master', 'v5.8.0-stable' ]
36+
openssl_ref: [ 'openssl-3.5.0' ]
37+
force_fail: ['WOLFPROV_FORCE_FAIL=1', '']
38+
steps:
39+
- name: Checkout wolfProvider
40+
uses: actions/checkout@v4
41+
with:
42+
fetch-depth: 1
43+
44+
- name: Retrieving wolfSSL/wolfProvider from cache
45+
uses: actions/cache/restore@v4
46+
id: wolfprov-cache
47+
with:
48+
path: |
49+
wolfssl-install
50+
wolfprov-install
51+
openssl-install/lib64
52+
openssl-install/include
53+
openssl-install/bin
54+
55+
key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }}
56+
fail-on-cache-miss: true
57+
58+
- name: Install bind9 test dependencies
59+
run: |
60+
export DEBIAN_FRONTEND=noninteractive
61+
sudo apt-get update
62+
sudo apt install -y build-essential automake libtool gnutls-bin \
63+
pkg-config make libidn2-dev libuv1-dev libnghttp2-dev libcap-dev \
64+
libjemalloc-dev zlib1g-dev libxml2-dev libjson-c-dev libcmocka-dev \
65+
python3-pytest python3-dnspython python3-hypothesis
66+
sudo PERL_MM_USE_DEFAULT=1 cpan -i Net::DNS
67+
68+
- name: Checkout bind9
69+
uses: actions/checkout@v4
70+
with:
71+
repository: isc-projects/bind9
72+
path: bind9
73+
ref: ${{ matrix.bind_ref }}
74+
fetch-depth: 1
75+
76+
- name: Checkout OSP
77+
uses: actions/checkout@v4
78+
with:
79+
repository: wolfssl/osp
80+
path: osp
81+
fetch-depth: 1
82+
- run: |
83+
cd bind9
84+
patch -p1 < $GITHUB_WORKSPACE/osp/wolfProvider/bind9/bind9-${{ matrix.bind_ref }}-wolfprov.patch
85+
86+
- name: Build and test bind9 with wolfProvider
87+
working-directory: bind9
88+
run: |
89+
# Set up the environment for wolfProvider
90+
source $GITHUB_WORKSPACE/scripts/env-setup
91+
92+
autoreconf -ivf
93+
./configure
94+
make clean
95+
make -j$(nproc)
96+
sudo ./bin/tests/system/ifconfig.sh up
97+
98+
export ${{ matrix.force_fail }}
99+
make -j$(nproc) check 2>&1 | tee bind9-test.log
100+
TEST_RESULT=${PIPESTATUS[0]}
101+
$GITHUB_WORKSPACE/.github/scripts/check-workflow-result.sh $TEST_RESULT ${{ matrix.force_fail }} bind9

0 commit comments

Comments
 (0)