Skip to content

Commit 83e4ec7

Browse files
authored
Merge pull request #48 from gasbytes/libnice
Libnice workflows
2 parents e7972f7 + c080af7 commit 83e4ec7

1 file changed

Lines changed: 82 additions & 0 deletions

File tree

.github/workflows/libnice.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Libnice Build and Test
2+
3+
on:
4+
push:
5+
branches: [ 'master', 'main', 'release/**' ]
6+
pull_request:
7+
branches: [ '*' ]
8+
9+
concurrency:
10+
group: ${{ github.workflow }}-${{ github.ref }}
11+
cancel-in-progress: true
12+
13+
jobs:
14+
libnice_build_test:
15+
name: Libnice ${{ matrix.libnice_ref }} on ${{ matrix.os }}
16+
timeout-minutes: 25
17+
strategy:
18+
matrix:
19+
os: [ ubuntu-latest ]
20+
libnice_ref: [ 'master', '0.1.22', '0.1.21' ]
21+
fail-fast: false
22+
runs-on: ${{ matrix.os }}
23+
24+
steps:
25+
- uses: actions/checkout@v4
26+
27+
- name: Install build prerequisites
28+
run: |
29+
sudo apt-get update
30+
sudo apt-get install -y gnulib autopoint gperf gtk-doc-tools nettle-dev clang libtasn1-bin libtasn1-6-dev libunistring-dev libp11-kit-dev libunbound-dev meson cmake meson ninja-build pkg-config python3-ply python3-jinja2 python3-yaml libyaml-dev libgtest-dev libglib2.0-dev
31+
32+
- name: Build custom GnuTLS (wolfSSL provider)
33+
run: |
34+
GNUTLS_INSTALL=/opt/gnutls WOLFSSL_INSTALL=/opt/wolfssl ./setup.sh
35+
36+
- name: Clone libnice @ ref
37+
run: |
38+
git clone https://github.com/libnice/libnice.git
39+
cd libnice
40+
if [ "${{ matrix.libnice_ref }}" != "master" ]; then
41+
git checkout ${{ matrix.libnice_ref }}
42+
fi
43+
44+
- name: Configure & build with Meson/Ninja
45+
working-directory: libnice
46+
run: |
47+
export PKG_CONFIG_PATH="/opt/gnutls/lib/pkgconfig:${PKG_CONFIG_PATH}"
48+
export CPPFLAGS="-I/opt/gnutls/include ${CPPFLAGS}"
49+
export LDFLAGS="-L/opt/gnutls/lib -Wl,-rpath,/opt/gnutls/lib ${LDFLAGS}"
50+
export LD_LIBRARY_PATH="/opt/gnutls/lib:${LD_LIBRARY_PATH}"
51+
meson setup build-gnutls
52+
ninja -C build-gnutls
53+
54+
- name: Verify libnice links to /opt/gnutls/lib/libgnutls
55+
working-directory: libnice
56+
run: |
57+
export PKG_CONFIG_PATH="/opt/gnutls/lib/pkgconfig:${PKG_CONFIG_PATH}"
58+
export CPPFLAGS="-I/opt/gnutls/include ${CPPFLAGS}"
59+
export LDFLAGS="-L/opt/gnutls/lib -Wl,-rpath,/opt/gnutls/lib ${LDFLAGS}"
60+
export LD_LIBRARY_PATH="/opt/gnutls/lib:${LD_LIBRARY_PATH}"
61+
LIB=$(find build-gnutls/nice -name 'libnice*.so*' | head -n1)
62+
if [ -z "$LIB" ]; then
63+
echo "libnice shared library not found" >&2
64+
exit 1
65+
fi
66+
if ldd "$LIB" | grep -q '/opt/gnutls/lib/libgnutls'; then
67+
ldd "$LIB" | grep libgnutls
68+
else
69+
ldd "$LIB" | grep libgnutls || true
70+
exit 1
71+
fi
72+
73+
- name: Run unit tests
74+
working-directory: libnice
75+
run: |
76+
export G_MESSAGES_DEBUG=all
77+
export NICE_DEBUG=all
78+
export PKG_CONFIG_PATH="/opt/gnutls/lib/pkgconfig:${PKG_CONFIG_PATH}"
79+
export CPPFLAGS="-I/opt/gnutls/include ${CPPFLAGS}"
80+
export LDFLAGS="-L/opt/gnutls/lib -Wl,-rpath,/opt/gnutls/lib ${LDFLAGS}"
81+
export LD_LIBRARY_PATH="/opt/gnutls/lib:${LD_LIBRARY_PATH}"
82+
ninja -C build-gnutls test

0 commit comments

Comments
 (0)