Skip to content

Commit 712f42e

Browse files
authored
Merge branch 'wolfSSL:master' into fix_ecx_test_build
2 parents ce70019 + 5bc0a6f commit 712f42e

3 files changed

Lines changed: 192 additions & 1 deletion

File tree

.github/scripts/check-workflow-result.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,6 +255,7 @@ if [ "$WOLFPROV_FORCE_FAIL" = "WOLFPROV_FORCE_FAIL=1" ]; then
255255
fi
256256
else
257257
echo "Error: liboauth2-test.log not found"
258+
exit 1
258259
fi
259260
# ----- TCPDUMP -----
260261
elif [ "$TEST_SUITE" = "tcpdump" ]; then
@@ -285,7 +286,7 @@ if [ "$WOLFPROV_FORCE_FAIL" = "WOLFPROV_FORCE_FAIL=1" ]; then
285286
echo " Sent: $sender_gb GB, Received: $receiver_gb GB"
286287
exit 1
287288
fi
288-
else
289+
else
289290
echo "Error: $IPERF_TEST_LOG not found"
290291
exit 1
291292
fi

.github/workflows/libfido2.yml

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
name: libfido2 Tests
2+
on:
3+
push:
4+
branches: [ 'master', 'main', 'release/**' ]
5+
pull_request:
6+
branches: [ '*' ]
7+
concurrency:
8+
group: ${{ github.workflow }}-${{ github.ref }}
9+
cancel-in-progress: true
10+
jobs:
11+
build_wolfprovider:
12+
uses: ./.github/workflows/build-wolfprovider.yml
13+
with:
14+
wolfssl_ref: ${{ matrix.wolfssl_ref }}
15+
openssl_ref: ${{ matrix.openssl_ref }}
16+
strategy:
17+
matrix:
18+
wolfssl_ref: [ 'master', 'v5.8.0-stable' ]
19+
openssl_ref: [ 'openssl-3.5.0' ]
20+
test_libfido2:
21+
runs-on: ubuntu-22.04
22+
needs: build_wolfprovider
23+
timeout-minutes: 15
24+
strategy:
25+
matrix:
26+
wolfssl_ref: [ 'master', 'v5.8.0-stable' ]
27+
openssl_ref: [ 'openssl-3.5.0' ]
28+
libfido2_ref: [ 'main', '1.15.0' ]
29+
force_fail: [ 'WOLFPROV_FORCE_FAIL=1', '' ]
30+
exclude:
31+
- libfido2_ref: 'main'
32+
force_fail: 'WOLFPROV_FORCE_FAIL=1'
33+
steps:
34+
- name: Checkout wolfProvider
35+
uses: actions/checkout@v4
36+
with:
37+
fetch-depth: 1
38+
- name: Retrieving wolfSSL/wolfProvider from cache
39+
uses: actions/cache/restore@v4
40+
id: wolfprov-cache
41+
with:
42+
path: |
43+
scripts
44+
wolfssl-source
45+
wolfssl-install
46+
wolfprov-install
47+
openssl-install
48+
provider.conf
49+
key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }}
50+
fail-on-cache-miss: true
51+
- name: Install test dependencies
52+
run: |
53+
sudo apt-get update
54+
sudo apt-get install -y build-essential cmake pkg-config libssl-dev libudev-dev zlib1g-dev libcbor-dev libpcsclite-dev pcscd
55+
- name: Checkout libfido2
56+
uses: actions/checkout@v4
57+
with:
58+
repository: Yubico/libfido2
59+
path: libfido2_repo
60+
ref: ${{ matrix.libfido2_ref }}
61+
fetch-depth: 1
62+
- name: Build and install libfido2
63+
working-directory: libfido2_repo
64+
run: |
65+
mkdir build
66+
cd build
67+
cmake -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/libfido2-install ..
68+
make -j$(nproc)
69+
make install
70+
- name: Run libfido2 tests
71+
working-directory: libfido2_repo/build
72+
run: |
73+
# Set up the environment for wolfProvider
74+
source $GITHUB_WORKSPACE/scripts/env-setup
75+
export ${{ matrix.force_fail }}
76+
77+
# Run tests, excluding regress_dev which requires hardware/fails in CI
78+
ctest --exclude-regex "regress_dev" 2>&1 | tee libfido2-test.log
79+
80+
# Check test results directly in YAML
81+
if grep -q "100% tests passed" libfido2-test.log; then
82+
TEST_RESULT=0
83+
else
84+
TEST_RESULT=1
85+
fi
86+
87+
$GITHUB_WORKSPACE/.github/scripts/check-workflow-result.sh $TEST_RESULT ${{ matrix.force_fail }} libfido2
88+
89+
90+
Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: libwebsockets 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_libwebsockets:
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+
libwebsockets_ref: [ 'main', 'v4.3.3' ]
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+
- libwebsockets_ref: 'main'
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+
sparse-checkout: |
46+
.github
47+
- name: Retrieving wolfProvider from cache
48+
uses: actions/cache/restore@v4
49+
id: wolfprov-cache-restore
50+
with:
51+
path: |
52+
scripts
53+
wolfssl-source
54+
wolfssl-install
55+
wolfprov-install
56+
openssl-install
57+
provider.conf
58+
key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }}
59+
fail-on-cache-miss: true
60+
61+
- name: Install libwebsockets dependencies
62+
run: |
63+
sudo apt-get update
64+
sudo apt-get install -y libc6 libcap2 zlib1g cmake build-essential
65+
- name: Download libwebsockets
66+
uses: actions/checkout@v4
67+
with:
68+
repository: warmcat/libwebsockets
69+
ref: ${{ matrix.libwebsockets_ref }}
70+
path: libwebsockets
71+
72+
- name: Build libwebsockets
73+
working-directory: libwebsockets
74+
run: |
75+
mkdir build
76+
cd build
77+
cmake ..
78+
make -j$(nproc)
79+
sudo make install
80+
- name: Run libwebsockets tests
81+
working-directory: libwebsockets
82+
run: |
83+
echo "Setting environment variables..."
84+
source $GITHUB_WORKSPACE/scripts/env-setup
85+
export ${{ matrix.force_fail }}
86+
./build/bin/libwebsockets-test-server --port=11111 --ssl > server.log 2>&1 & SERVER_PID=$!
87+
sleep 5
88+
timeout 10 ./build/bin/libwebsockets-test-client 127.0.0.1 --port=11111 --ssl > client.log 2>&1 || echo "Client exited with error $?"
89+
ldd ./build/bin/libwebsockets-test-server | grep wolfProvider
90+
ldd ./build/bin/libwebsockets-test-client | grep wolfProvider
91+
kill $SERVER_PID || echo "Server already exited"
92+
cat server.log || echo "Missing server.log"
93+
cat client.log || echo "Missing client.log"
94+
cat server.log client.log > libwebsockets-test.log
95+
if grep -q "error:03080006" libwebsockets-test.log || grep -q "Failed to create default vhost" libwebsockets-test.log; then
96+
TEST_RESULT=1
97+
else
98+
TEST_RESULT=0
99+
fi
100+
$GITHUB_WORKSPACE/.github/scripts/check-workflow-result.sh $TEST_RESULT ${{ matrix.force_fail }} libwebsockets

0 commit comments

Comments
 (0)