upipe_filter_format: pass through the flow request #758
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: -j3 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- name: ubuntu-amd64-gcc-12 | |
os: ubuntu-22.04 | |
arch: amd64 | |
compiler: gcc | |
version: 12 | |
- name: ubuntu-amd64-gcc-12-static | |
os: ubuntu-22.04 | |
arch: amd64 | |
compiler: gcc | |
version: 12 | |
static: true | |
- name: ubuntu-amd64-clang-16 | |
os: ubuntu-22.04 | |
arch: amd64 | |
compiler: clang | |
version: 16 | |
# - 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-12-xcode | |
os: macos-12 | |
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@v3 | |
- 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" | |
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: | | |
brew install autoconf automake libtool pkg-config nasm ffmpeg \ | |
freetype libebur128 libev libgcrypt libtasn1 speex x264 x265 | |
brew install luajit --HEAD | |
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" | |
set-env LDFLAGS "-fsanitize=undefined -fsanitize=address" | |
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" | |
- 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 $CFLAGS\" CXXFLAGS=\"-Werror -O2 -g $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@v1 | |
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@v3 | |
- 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 |