Enable loudnorm filter in smoke builds and harden its impl #1454
This file contains hidden or 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: smoke | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: main | |
| paths-ignore: | |
| - '**.md' | |
| - '**.rst' | |
| - '**.txt' | |
| - '.github/workflows/tests.yml' | |
| pull_request: | |
| branches: main | |
| paths-ignore: | |
| - '**.md' | |
| - '**.rst' | |
| - '**.txt' | |
| - '.github/workflows/tests.yml' | |
| jobs: | |
| style: | |
| runs-on: ubuntu-slim | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.14" | |
| - name: Linters | |
| run: make lint | |
| nix: | |
| name: "py-${{ matrix.config.python }} lib-${{ matrix.config.ffmpeg }} ${{matrix.config.os}}" | |
| runs-on: ${{ matrix.config.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - {os: ubuntu-24.04, python: "3.14", ffmpeg: "8.1.1", extras: true} | |
| - {os: ubuntu-24.04, python: "3.11", ffmpeg: "8.0.2"} | |
| - {os: ubuntu-24.04, python: "3.13", ffmpeg: "8.1.1"} | |
| - {os: macos-14, python: "3.12", ffmpeg: "8.0.2"} | |
| - {os: macos-14, python: "3.14", ffmpeg: "8.1.1"} | |
| env: | |
| PYAV_PYTHON: python${{ matrix.config.python }} | |
| PYAV_LIBRARY: ffmpeg-${{ matrix.config.ffmpeg }} | |
| steps: | |
| - uses: actions/checkout@v6 | |
| name: Checkout | |
| - name: Python ${{ matrix.config.python }} | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.config.python }} | |
| allow-prereleases: true | |
| - name: OS Packages | |
| run: | | |
| case ${{ matrix.config.os }} in | |
| ubuntu-24.04) | |
| sudo apt-get update | |
| sudo apt-get install \ | |
| autoconf \ | |
| automake \ | |
| build-essential \ | |
| cmake \ | |
| libtool \ | |
| libx264-dev \ | |
| nasm \ | |
| pkg-config \ | |
| zlib1g-dev | |
| if [[ "${{ matrix.config.extras }}" ]]; then | |
| sudo apt-get install doxygen | |
| fi | |
| ;; | |
| macos-14) | |
| brew install automake libtool opus x264 | |
| ;; | |
| esac | |
| - name: Pip and FFmpeg | |
| run: | | |
| . scripts/activate.sh ffmpeg-${{ matrix.config.ffmpeg }} | |
| scripts/build-deps | |
| - name: Build | |
| run: | | |
| [ "${{ runner.os }}" = "macOS" ] && export ARCHFLAGS="-arch $(uname -m)" | |
| . scripts/activate.sh ffmpeg-${{ matrix.config.ffmpeg }} | |
| scripts/build | |
| - name: Test | |
| run: | | |
| . scripts/activate.sh ffmpeg-${{ matrix.config.ffmpeg }} | |
| python -m av --version # Assert it can import. | |
| make test | |
| - name: Docs | |
| if: matrix.config.extras | |
| run: | | |
| . scripts/activate.sh ffmpeg-${{ matrix.config.ffmpeg }} | |
| make -C docs html | |
| - name: Doctest | |
| if: matrix.config.extras | |
| run: | | |
| . scripts/activate.sh ffmpeg-${{ matrix.config.ffmpeg }} | |
| make -C docs test | |
| - name: Examples | |
| if: matrix.config.extras | |
| run: | | |
| . scripts/activate.sh ffmpeg-${{ matrix.config.ffmpeg }} | |
| scripts/test examples | |
| windows: | |
| name: "py-${{ matrix.config.python }} lib-${{ matrix.config.ffmpeg }} ${{matrix.config.os}}" | |
| runs-on: ${{ matrix.config.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| config: | |
| - {os: windows-latest, python: "3.11", ffmpeg: "latest"} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Set up Conda | |
| shell: bash | |
| run: | | |
| . $CONDA/etc/profile.d/conda.sh | |
| conda config --set always_yes true | |
| conda config --add channels conda-forge | |
| conda config --add channels scientific-python-nightly-wheels | |
| conda create -q -n pyav \ | |
| numpy \ | |
| pillow \ | |
| pytest \ | |
| python=${{ matrix.config.python }} \ | |
| setuptools \ | |
| cython | |
| - name: Build | |
| shell: bash | |
| run: | | |
| . $CONDA/etc/profile.d/conda.sh | |
| conda activate pyav | |
| python scripts\\fetch-vendor.py --config-file scripts\\ffmpeg-${{ matrix.config.ffmpeg }}.json $CONDA_PREFIX\\Library | |
| python setup.py build_ext --inplace --ffmpeg-dir=$CONDA_PREFIX\\Library | |
| - name: Test | |
| shell: bash | |
| run: | | |
| . $CONDA/etc/profile.d/conda.sh | |
| conda activate pyav | |
| python -m pytest |