dejitter: print a meaningful value for ref offset #177
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test suite | |
on: [push, pull_request] | |
jobs: | |
ci: | |
name: ${{ matrix.name }} | |
runs-on: ${{ matrix.os }} | |
env: | |
MAKEFLAGS: -j4 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: ubuntu-amd64-gcc-13 | |
os: ubuntu-22.04 | |
arch: amd64 | |
compiler: gcc | |
version: 13 | |
- name: ubuntu-amd64-gcc-13-static | |
os: ubuntu-22.04 | |
arch: amd64 | |
compiler: gcc | |
version: 13 | |
static: true | |
- name: ubuntu-amd64-clang-17 | |
os: ubuntu-22.04 | |
arch: amd64 | |
compiler: clang | |
version: 17 | |
# - name: ubuntu-i386-gcc-12 | |
# os: ubuntu-22.04 | |
# arch: i386 | |
# host: i686-linux-gnu | |
# compiler: gcc | |
# version: 12 | |
- name: ubuntu-armhf-gcc-12 | |
os: ubuntu-22.04 | |
arch: armhf | |
host: arm-linux-gnueabihf | |
compiler: gcc | |
version: 12 | |
- name: ubuntu-arm64-gcc-12 | |
os: ubuntu-22.04 | |
arch: arm64 | |
host: aarch64-linux-gnu | |
compiler: gcc | |
version: 12 | |
- name: macos-13-xcode | |
os: macos-13 | |
compiler: xcode | |
steps: | |
- name: Set up env | |
run: | | |
echo "echo \"\$1=\$2\" >> \$GITHUB_ENV" | sudo tee /usr/local/bin/set-env >/dev/null | |
sudo chmod +x /usr/local/bin/set-env | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install compiler (gcc) | |
if: runner.os == 'Linux' && matrix.compiler == 'gcc' | |
run: | | |
sudo dpkg --add-architecture ${{ matrix.arch }} | |
sudo sed 's/^deb /deb [arch=amd64,i386] /' -i /etc/apt/sources.list | |
sudo apt-add-repository -n -y "deb [arch=arm64,armhf] http://ports.ubuntu.com $(lsb_release -sc) main universe" | |
sudo apt-add-repository -n -y "deb [arch=arm64,armhf] http://ports.ubuntu.com $(lsb_release -sc)-updates main universe" | |
sudo apt-add-repository -n -y "deb [arch=arm64,armhf] http://ports.ubuntu.com $(lsb_release -sc)-security main universe" | |
sudo apt-get update | |
CC=gcc | |
CXX=g++ | |
PKG=g++ | |
if [ -n "${{ matrix.version }}" ]; then | |
CC=$CC-${{ matrix.version }} | |
CXX=$CXX-${{ matrix.version }} | |
PKG=$PKG-${{ matrix.version }} | |
fi | |
if [ -n "${{ matrix.host }}" ]; then | |
CC=${{ matrix.host }}-$CC | |
CXX=${{ matrix.host }}-$CXX | |
PKG=$PKG-${{ matrix.host }} | |
fi | |
sudo apt-get install $PKG | |
set-env HOST_CC "$CC" | |
set-env HOST_CXX "$CXX" | |
if [ "${{ matrix.arch }}" = "i386" ]; then | |
set-env CFLAGS "-msse2 -mfpmath=sse" | |
fi | |
if [ -n "${{ matrix.host }}" ]; then | |
set-env HOST "--host=${{ matrix.host }}" | |
fi | |
if [ "${{ matrix.sanitizer }}" = "true" ]; then | |
SAN="-fsanitize=undefined -fsanitize=address,pointer-compare,pointer-subtract" | |
set-env CFLAGS "$SAN" | |
set-env CXXFLAGS "$SAN" | |
set-env LDFLAGS "$SAN" | |
set-env UBSAN_OPTIONS "print_stacktrace=1" | |
fi | |
- name: Install compiler (clang) | |
if: runner.os == 'Linux' && matrix.compiler == 'clang' | |
run: | | |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | |
sudo add-apt-repository -y "deb http://apt.llvm.org/$(lsb_release -sc)/ llvm-toolchain-$(lsb_release -sc)-${{ matrix.version }} main" | |
sudo apt-get update | |
sudo apt-get install clang-${{ matrix.version }} | |
set-env HOST_CC "clang-${{ matrix.version }}" | |
set-env HOST_CXX "clang++-${{ matrix.version }}" | |
- name: Install dependencies (Linux) | |
if: runner.os == 'Linux' | |
env: | |
LIBS: > | |
ev asound2 x264 x265 speexdsp png freetype6 zvbi gcrypt tasn1 dvbv5 | |
udev avcodec avformat swresample swscale gl1-mesa glu1-mesa | |
srt-gnutls gnutls28 ssl | |
LIBS_FULL: ebur128 dvbcsa | |
run: | | |
if [ "${{ matrix.arch }}" != "i386" ]; then | |
LIBS="$LIBS $LIBS_FULL" | |
fi | |
sudo apt-get install \ | |
valgrind nasm qemu-user-binfmt elfutils \ | |
$(printf '%s:${{ matrix.arch }} ' libc6-dbg luajit) \ | |
$(printf 'lib%s-dev:${{ matrix.arch }} ' $LIBS) | |
if [ -n "${{ matrix.host }}" ]; then | |
set-env DISABLE_VALGRIND "1" | |
fi | |
- name: Install dependencies (macOS) | |
if: runner.os == 'macOS' | |
run: | | |
# temporary fix for https://github.com/actions/setup-python/issues/577 | |
rm -f /usr/local/bin/2to3* | |
rm -f /usr/local/bin/idle3* | |
rm -f /usr/local/bin/pydoc3* | |
rm -f /usr/local/bin/python3* | |
brew install autoconf automake libtool pkg-config nasm ffmpeg \ | |
freetype libebur128 libev libgcrypt libtasn1 speex x264 x265 luajit | |
BREW_PREFIX="$(brew --prefix)" | |
set-env HOST_CC "clang" | |
set-env HOST_CXX "clang++" | |
set-env CFLAGS "-Wno-error=unused-command-line-argument -Wno-error=deprecated-declarations -fsanitize=undefined -fsanitize=address -fsanitize-address-use-after-scope -fno-omit-frame-pointer -fno-optimize-sibling-calls -I$BREW_PREFIX/include" | |
set-env LDFLAGS "-fsanitize=undefined -fsanitize=address -L$BREW_PREFIX/lib" | |
set-env DISABLE_VALGRIND "1" | |
set-env INSERT_LIBRARIES "$(clang -print-search-dirs | sed -n 's/^libraries: =//p')/lib/darwin/libclang_rt.asan_osx_dynamic.dylib" | |
set-env UBSAN_OPTIONS "print_stacktrace=1" | |
- name: Install bitstream | |
run: | | |
git clone --depth 1 https://code.videolan.org/videolan/bitstream.git | |
make -C bitstream install PREFIX="$PWD/usr-bitstream" | |
set-env PKG_CONFIG_PATH "$PKG_CONFIG_PATH:$PWD/usr-bitstream/share/pkgconfig" | |
if [ "${{ matrix.static }}" = "true" ]; then | |
STATIC="--disable-shared" | |
fi | |
set-env CONFIGURE_FLAGS "--enable-luajit $STATIC --disable-silent-rules $HOST CC=\"$HOST_CC\" CXX=\"$HOST_CXX\" CFLAGS=\"-Werror -O2 -g -gdwarf-4 -fdiagnostics-color=always $CFLAGS\" CXXFLAGS=\"-Werror -O2 -g -fdiagnostics-color=always $CXXFLAGS\" LDFLAGS=\"$LDFLAGS\"" | |
- name: Build and install libamt | |
if: runner.os == 'Linux' && (matrix.arch == 'amd64' || matrix.arch == 'i386') | |
run: | | |
if [ "${{ matrix.arch }}" = "i386" ]; then | |
LIBAMT_PLATFORM="PLATFORM32=1" | |
fi | |
git clone --depth 1 https://github.com/cisco/SSMAMTtools.git | |
make -C SSMAMTtools/build/linux \ | |
CC="$HOST_CC -fPIC" \ | |
TARGET=libamt.a \ | |
WFLAGS=-Wno-int-conversion \ | |
$LIBAMT_PLATFORM | |
sudo install -D SSMAMTtools/include/amt.h /usr/local/include/amt.h | |
sudo install -D SSMAMTtools/lib/linux/libamt.a /usr/local/lib/libamt.a | |
- name: Build and install libdvbcsa | |
if: runner.os == 'macOS' || matrix.arch == 'i386' | |
run: | | |
git clone --depth 1 https://github.com/glenvt18/libdvbcsa.git | |
cd libdvbcsa | |
./bootstrap | |
./configure $HOST CC="$HOST_CC" | |
sudo make install | |
- name: Configure | |
run: | | |
autoreconf -i | |
eval ./configure $CONFIGURE_FLAGS | |
- name: Archive config log | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: ${{ matrix.name }}_config.log | |
path: config.log | |
- name: Build and test | |
run: > | |
make distcheck | |
DISTCHECK_CONFIGURE_FLAGS="$CONFIGURE_FLAGS" | |
AM_COLOR_TESTS="always" | |
VERBOSE=1 | |
coding-style: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install dependencies | |
env: | |
LIBS: ev avutil dvbcsa srt-gnutls gnutls28 | |
run: | | |
sudo rm /etc/apt/sources.list.d/* | |
sudo apt-get update | |
sudo apt-get install $(printf 'lib%s-dev ' $LIBS) | |
- name: Configure | |
run: | | |
autoreconf -i | |
./configure | |
- name: Check whitespaces | |
run: make check-whitespace | |
- name: Check headers | |
env: | |
AM_COLOR_TESTS: always | |
run: make check-headers | |
- name: Check tests | |
env: | |
AM_COLOR_TESTS: always | |
run: make check-tests |