Skip to content

Commit 1b4d674

Browse files
adding libnice workflow (#275)
Co-authored-by: sebastian-carpenter <[email protected]>
1 parent 6e5b181 commit 1b4d674

File tree

1 file changed

+92
-0
lines changed

1 file changed

+92
-0
lines changed

.github/workflows/libnice.yml

Lines changed: 92 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,92 @@
1+
name: libnice 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_libnice:
27+
runs-on: ubuntu-22.04
28+
needs: build_wolfprovider
29+
timeout-minutes: 20
30+
strategy:
31+
matrix:
32+
libnice_ref: [ '0.1.21' ]
33+
wolfssl_ref: [ 'master', 'v5.8.0-stable' ]
34+
openssl_ref: [ 'openssl-3.5.0' ]
35+
force_fail: ['WOLFPROV_FORCE_FAIL=1', '']
36+
steps:
37+
- name: Checkout wolfProvider
38+
uses: actions/checkout@v4
39+
with:
40+
fetch-depth: 1
41+
42+
- name: Retrieving wolfSSL/wolfProvider from cache
43+
uses: actions/cache/restore@v4
44+
id: wolfprov-cache
45+
with:
46+
path: |
47+
wolfssl-install
48+
wolfprov-install
49+
openssl-install/lib64
50+
openssl-install/include
51+
openssl-install/bin
52+
53+
key: wolfprov-${{ matrix.wolfssl_ref }}-${{ matrix.openssl_ref }}-${{ github.sha }}
54+
fail-on-cache-miss: true
55+
56+
- name: Install dependencies
57+
run: |
58+
sudo apt update
59+
sudo apt install -y \
60+
build-essential pkg-config meson ninja-build libglib2.0-dev \
61+
libgstreamer1.0-dev libunwind-dev gstreamer1.0-plugins-base-apps
62+
63+
- name: Download libnice
64+
uses: actions/checkout@v4
65+
with:
66+
repository: libnice/libnice
67+
ref: ${{ matrix.libnice_ref }}
68+
path: libnice
69+
70+
- name: Build libnice
71+
working-directory: libnice
72+
run: |
73+
source $GITHUB_WORKSPACE/scripts/env-setup
74+
75+
# force libnice to use the openssl binary in wolfProvider
76+
sudo ln -sf $GITHUB_WORKSPACE/openssl-install/bin/openssl /usr/bin/openssl
77+
78+
meson setup builddir -Dcrypto-library=openssl
79+
80+
- name: Test libnice with wolfProvider
81+
working-directory: libnice
82+
run: |
83+
# Set up the environment for wolfProvider
84+
source $GITHUB_WORKSPACE/scripts/env-setup
85+
export ${{ matrix.force_fail }}
86+
87+
# Run tests and save output to test.log
88+
ninja -C builddir test 2>&1 | tee libnice_test.log
89+
90+
# Capture the test result using PIPESTATUS (Bash only)
91+
TEST_RESULT=${PIPESTATUS[0]}
92+
$GITHUB_WORKSPACE/.github/scripts/check-workflow-result.sh $TEST_RESULT ${{ matrix.force_fail }} libnice

0 commit comments

Comments
 (0)