|
| 1 | +name: GStreamer Compatibility |
| 2 | + |
| 3 | +on: [push, pull_request] |
| 4 | + |
| 5 | +jobs: |
| 6 | + test: |
| 7 | + runs-on: ubuntu-22.04 |
| 8 | + container: ${{ matrix.container }} |
| 9 | + name: "GStreamer ${{ matrix.gst }} (${{ matrix.container }})" |
| 10 | + env: |
| 11 | + DEBIAN_FRONTEND: noninteractive |
| 12 | + |
| 13 | + strategy: |
| 14 | + fail-fast: false |
| 15 | + matrix: |
| 16 | + include: |
| 17 | + - { gst: "1.20", container: "ubuntu:22.04" } |
| 18 | + - { gst: "1.24", container: "ubuntu:24.04" } |
| 19 | + - { gst: "1.26", container: "ubuntu:25.04" } |
| 20 | + - { gst: "1.28", container: "ubuntu:devel" } |
| 21 | + |
| 22 | + steps: |
| 23 | + - name: Install build dependencies |
| 24 | + run: | |
| 25 | + apt-get update -y |
| 26 | + apt-get install -y --no-install-recommends \ |
| 27 | + libunwind-dev \ |
| 28 | + libclang-dev \ |
| 29 | + pkg-config \ |
| 30 | + build-essential \ |
| 31 | + curl \ |
| 32 | + wget \ |
| 33 | + gnupg \ |
| 34 | + git \ |
| 35 | + ca-certificates \ |
| 36 | + libgit2-dev \ |
| 37 | + libmount-dev \ |
| 38 | + libsepol-dev \ |
| 39 | + libselinux1-dev \ |
| 40 | + libglib2.0-dev \ |
| 41 | + libgudev-1.0-dev \ |
| 42 | + libgstreamer1.0-dev \ |
| 43 | + libgstreamer-plugins-base1.0-dev \ |
| 44 | + libgstreamer-plugins-bad1.0-dev \ |
| 45 | + libgstrtspserver-1.0-dev \ |
| 46 | + unzip |
| 47 | +
|
| 48 | + - name: Install runtime dependencies |
| 49 | + run: | |
| 50 | + apt-get install -y --no-install-recommends \ |
| 51 | + gstreamer1.0-tools \ |
| 52 | + gstreamer1.0-x \ |
| 53 | + gstreamer1.0-nice \ |
| 54 | + gstreamer1.0-libav \ |
| 55 | + gstreamer1.0-plugins-ugly \ |
| 56 | + gstreamer1.0-plugins-bad |
| 57 | +
|
| 58 | + - name: Print GStreamer and libnice versions |
| 59 | + run: | |
| 60 | + dpkg -l 'libgstreamer*' '*libnice*' 2>/dev/null | grep '^ii' || true |
| 61 | + pkg-config --modversion gstreamer-1.0 || true |
| 62 | + pkg-config --modversion nice || true |
| 63 | +
|
| 64 | + - name: Checkout |
| 65 | + uses: actions/checkout@v4 |
| 66 | + with: |
| 67 | + submodules: recursive |
| 68 | + |
| 69 | + - name: Set directory to safe for git |
| 70 | + run: git config --global --add safe.directory $GITHUB_WORKSPACE |
| 71 | + |
| 72 | + - name: Install build dependencies - Set up Node.js |
| 73 | + uses: actions/setup-node@v4 |
| 74 | + with: |
| 75 | + node-version: '20' |
| 76 | + |
| 77 | + - uses: oven-sh/setup-bun@v2 |
| 78 | + with: |
| 79 | + bun-version: latest |
| 80 | + |
| 81 | + - name: Install Rust |
| 82 | + run: | |
| 83 | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- --default-toolchain stable -y |
| 84 | + echo "$HOME/.cargo/bin" >> $GITHUB_PATH |
| 85 | +
|
| 86 | + - name: Use cached dependencies |
| 87 | + uses: Swatinem/rust-cache@v2 |
| 88 | + with: |
| 89 | + key: "compat-gst-${{ matrix.gst }}" |
| 90 | + |
| 91 | + - name: Generate bindings |
| 92 | + run: cargo run --package=bindings --verbose --locked |
| 93 | + |
| 94 | + - name: Build |
| 95 | + run: cargo build --verbose --locked |
| 96 | + |
| 97 | + - name: Install nextest |
| 98 | + uses: taiki-e/install-action@nextest |
| 99 | + |
| 100 | + - name: Run tests |
| 101 | + env: |
| 102 | + GST_DEBUG: "2" |
| 103 | + GST_DEBUG_NO_COLOR: "1" |
| 104 | + RUST_BACKTRACE: "1" |
| 105 | + run: cargo nextest run --verbose --no-fail-fast --success-output final --failure-output final --locked |
0 commit comments