Skip to content

Commit fcb5c36

Browse files
committed
Add grpc testing
1 parent d9f7629 commit fcb5c36

1 file changed

Lines changed: 103 additions & 0 deletions

File tree

.github/workflows/grpc.yml

Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
name: grpc 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_wolfssl:
17+
name: Build wolfSSL
18+
# Just to keep it the same as the testing target
19+
runs-on: ubuntu-latest
20+
# This should be a safe limit for the tests to run.
21+
timeout-minutes: 10
22+
steps:
23+
- name: Build wolfSSL
24+
uses: wolfSSL/actions-build-autotools-project@v1
25+
with:
26+
path: wolfssl
27+
configure: --enable-all 'CPPFLAGS=-DWOLFSSL_RSA_KEY_CHECK -DHAVE_EX_DATA_CLEANUP_HOOKS'
28+
install: true
29+
30+
- name: Upload built lib
31+
uses: actions/upload-artifact@v4
32+
with:
33+
name: wolf-install-grpc
34+
path: build-dir
35+
retention-days: 5
36+
37+
grpc_check:
38+
strategy:
39+
fail-fast: false
40+
matrix:
41+
include:
42+
- ref: v1.60.0
43+
tests: >-
44+
bad_ssl_alpn_test bad_ssl_cert_test client_ssl_test
45+
crl_ssl_transport_security_test server_ssl_test
46+
ssl_transport_security_test ssl_transport_security_utils_test
47+
test_core_security_ssl_credentials_test test_cpp_end2end_ssl_credentials_test
48+
h2_ssl_cert_test h2_ssl_session_reuse_test
49+
name: ${{ matrix.ref }}
50+
runs-on: ubuntu-latest
51+
# This should be a safe limit for the tests to run.
52+
timeout-minutes: 60
53+
needs: build_wolfssl
54+
steps:
55+
- name: Confirm IPv4 and IPv6 support
56+
run: |
57+
ip addr list lo | grep 'inet '
58+
ip addr list lo | grep 'inet6 '
59+
60+
- name: Install prereqs
61+
run:
62+
sudo apt-get install build-essential autoconf libtool pkg-config cmake clang libc++-dev
63+
64+
- name: Download lib
65+
uses: actions/download-artifact@v4
66+
with:
67+
name: wolf-install-grpc
68+
path: build-dir
69+
70+
- name: Checkout OSP
71+
uses: actions/checkout@v4
72+
with:
73+
# TODO point to wolf repo once merged
74+
repository: julek-wolfssl/osp
75+
path: osp
76+
ref: grpc-update
77+
78+
- name: Checkout grpc
79+
uses: actions/checkout@v4
80+
with:
81+
repository: grpc/grpc
82+
path: grpc
83+
ref: ${{ matrix.ref }}
84+
85+
- name: Build grpc
86+
working-directory: ./grpc
87+
run: |
88+
patch -p1 < ../osp/grpc/grpc-${{ matrix.ref }}.patch
89+
git submodule update --init
90+
mkdir cmake/build
91+
cd cmake/build
92+
cmake -DgRPC_BUILD_TESTS=ON -DgRPC_SSL_PROVIDER=wolfssl \
93+
-DWOLFSSL_INSTALL_DIR=$GITHUB_WORKSPACE/build-dir ../..
94+
make -j $(nproc) ${{ matrix.tests }}
95+
96+
- name: Run grpc tests
97+
working-directory: ./grpc
98+
run: |
99+
export LD_LIBRARY_PATH=$GITHUB_WORKSPACE/build-dir/lib:$LD_LIBRARY_PATH
100+
./tools/run_tests/start_port_server.py
101+
for t in ${{ matrix.tests }} ; do
102+
./cmake/build/$t
103+
done

0 commit comments

Comments
 (0)