Skip to content

Commit 57af730

Browse files
authored
Merge pull request #254 from ColtonWilley/wp_krb5_workflow
KRB5 workflow
2 parents 06161b2 + fb25678 commit 57af730

File tree

1 file changed

+108
-0
lines changed

1 file changed

+108
-0
lines changed

.github/workflows/krb5.yml

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
name: KRB5 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_krb5:
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: 30
31+
strategy:
32+
matrix:
33+
krb5_ref: [ 'krb5-1.20.1-final' ]
34+
wolfssl_ref: [ 'master', 'v5.8.0-stable' ]
35+
openssl_ref: [ 'openssl-3.5.0' ]
36+
force_fail: [ 'WOLFPROV_FORCE_FAIL=1', '' ]
37+
steps:
38+
- name: Checkout wolfProvider
39+
uses: actions/checkout@v4
40+
with:
41+
fetch-depth: 1
42+
43+
- name: Retrieving wolfSSL/wolfProvider from cache
44+
uses: actions/cache/restore@v4
45+
id: wolfprov-cache
46+
with:
47+
path: |
48+
wolfssl-install
49+
wolfprov-install
50+
openssl-install/lib64
51+
openssl-install/include
52+
openssl-install/bin
53+
key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }}
54+
fail-on-cache-miss: true
55+
56+
- name: Install KRB5 dependencies
57+
run: |
58+
sudo apt-get update
59+
sudo apt-get install -y \
60+
build-essential autoconf automake libtool \
61+
bison flex libldap2-dev libkeyutils-dev \
62+
libverto-dev libcom-err2 comerr-dev \
63+
libss2 ss-dev
64+
65+
- name: Checkout KRB5
66+
uses: actions/checkout@v4
67+
with:
68+
repository: krb5/krb5
69+
path: krb5
70+
ref: ${{ matrix.krb5_ref }}
71+
fetch-depth: 1
72+
73+
- name: Checkout OSP
74+
uses: actions/checkout@v4
75+
with:
76+
repository: wolfssl/osp
77+
path: osp
78+
fetch-depth: 1
79+
- run: |
80+
cd krb5
81+
# Apply the wolfProvider patch
82+
patch -p1 < $GITHUB_WORKSPACE/osp/wolfProvider/krb5/krb5-1.20.1-final-wolfprov.patch
83+
84+
- name: Build and test KRB5 with wolfProvider
85+
working-directory: krb5
86+
run: |
87+
# Build KRB5
88+
cd src
89+
autoreconf -fiv
90+
./configure \
91+
--prefix=$GITHUB_WORKSPACE/krb5-install \
92+
--with-crypto-impl=openssl \
93+
--with-openssl=$GITHUB_WORKSPACE/openssl-install \
94+
--disable-pkinit \
95+
CFLAGS="-I$GITHUB_WORKSPACE/openssl-install/include" \
96+
LDFLAGS="-L$GITHUB_WORKSPACE/openssl-install/lib64 -Wl,-rpath=$GITHUB_WORKSPACE/openssl-install/lib64"
97+
98+
make -j$(nproc)
99+
make install
100+
101+
source $GITHUB_WORKSPACE/scripts/env-setup
102+
export ${{ matrix.force_fail }}
103+
104+
# Run tests and save output
105+
make check 2>&1 | tee krb5-test.log
106+
TEST_RESULT=${PIPESTATUS[0]}
107+
$GITHUB_WORKSPACE/.github/scripts/check-workflow-result.sh $TEST_RESULT ${{ matrix.force_fail }} krb5
108+

0 commit comments

Comments
 (0)