Skip to content

Commit 64b0f49

Browse files
author
Bridger Voss
committed
test github actions for xmlsec
1 parent 783023d commit 64b0f49

1 file changed

Lines changed: 108 additions & 0 deletions

File tree

.github/workflows/xmlsec.yml

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
name: xmlsec 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_xmlsec:
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+
matrix:
33+
xmlsec_ref: [ 'master', 'xmlsec-1_2_37' ]
34+
wolfssl_ref: [ 'master', 'v5.8.0-stable' ]
35+
openssl_ref: [ 'openssl-3.5.0' ]
36+
force_fail: [ 'WOLFPROV_FORCE_FAIL=1', '' ]
37+
exclude:
38+
- xmlsec_ref: 'master'
39+
force_fail: 'WOLFPROV_FORCE_FAIL=1'
40+
steps:
41+
# Checkout the source so we can run the check-workflow-result script
42+
- name: Checkout wolfProvider
43+
uses: actions/checkout@v4
44+
with:
45+
fetch-depth: 1
46+
47+
- name: Retrieving wolfProvider from cache
48+
uses: actions/cache/restore@v4
49+
id: wolfprov-cache-restore
50+
with:
51+
path: |
52+
wolfssl-install
53+
wolfprov-install
54+
openssl-install/lib64
55+
openssl-install/include
56+
openssl-install/bin
57+
key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }}
58+
fail-on-cache-miss: true
59+
60+
- name: Install xmlsec dependencies
61+
run: |
62+
sudo apt-get update
63+
sudo apt-get install -y automake autoconf libtool libtool-bin \
64+
libltdl-dev libltdl7 libxml2-dev
65+
66+
- name: Checkout OSP
67+
uses: actions/checkout@v4
68+
with:
69+
repository: wolfSSL/osp
70+
path: osp
71+
fetch-depth: 1
72+
73+
- name: Download xmlsec
74+
uses: actions/checkout@v4
75+
with:
76+
repository: lsh123/xmlsec
77+
ref: ${{ matrix.xmlsec_ref }}
78+
path: xmlsec
79+
fetch-depth: 1
80+
81+
- name: Build xmlsec
82+
working-directory: xmlsec
83+
env:
84+
XMLSEC_REF: ${{ matrix.xmlsec_ref }}
85+
run: |
86+
patch -p1 < $GITHUB_WORKSPACE/osp/wolfProvider/xmlsec/xmlsec-${{ matrix.xmlsec_ref }}-wolfprov.patch
87+
./autogen.sh --disable-openssl3-engines --disable-dsa --without-nss \
88+
--without-gnutls --without-gcrypt --disable-xmldsig \
89+
--disable-crypto-dl --disable-apps-crypto-dl \
90+
--disable-concatkdf --disable-tmpl-tests
91+
make
92+
cp $GITHUB_WORKSPACE/provider.conf tests/openssl3.cnf
93+
94+
- name: Run xmlsec tests
95+
working-directory: xmlsec
96+
run: |
97+
echo "Setting environment variables..."
98+
source $GITHUB_WORKSPACE/scripts/env-setup
99+
export ${{ matrix.force_fail }}
100+
export OPENSSL_CONF=$PWD/tests/openssl3.cnf
101+
make check-keys | tee xmlsec-keys.log
102+
make check-enc | tee xmlsec-enc.log
103+
if grep -q "TOTAL FAILED: 0" xmlsec-enc.log && grep -q "TOTAL FAILED: 0" xmlsec-keys.log; then
104+
TEST_RESULT=0
105+
else
106+
TEST_RESULT=1
107+
fi
108+
$GITHUB_WORKSPACE/.github/scripts/check-workflow-result.sh $TEST_RESULT ${{ matrix.force_fail }} xmlsec

0 commit comments

Comments
 (0)