Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
WyattBlue authored Nov 12, 2023
2 parents cfac5fd + a4bde60 commit 2351d4f
Show file tree
Hide file tree
Showing 193 changed files with 3,874 additions and 3,443 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/build-bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ I have done the following:
- [ ] Searched on [Google](https://www.google.com/search?q=pyav+how+do+I+foo)
- [ ] Searched on [Stack Overflow](https://stackoverflow.com/search?q=pyav)
- [ ] Looked through [old GitHub issues](https://github.com/PyAV-Org/PyAV/issues?&q=is%3Aissue)
- [ ] Asked on [PyAV Gitter](https://gitter.im/PyAV-Org)
- [ ] Asked on [PyAV Gitter](https://app.gitter.im/#/room/#PyAV-Org_User-Help:gitter.im)
- [ ] ... and waited 72 hours for a response.


Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/runtime-bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ I have done the following:
- [ ] Searched on [Google](https://www.google.com/search?q=pyav+how+do+I+foo)
- [ ] Searched on [Stack Overflow](https://stackoverflow.com/search?q=pyav)
- [ ] Looked through [old GitHub issues](https://github.com/PyAV-Org/PyAV/issues?&q=is%3Aissue)
- [ ] Asked on [PyAV Gitter](https://gitter.im/PyAV-Org)
- [ ] Asked on [PyAV Gitter](https://app.gitter.im/#/room/#PyAV-Org_User-Help:gitter.im)
- [ ] ... and waited 72 hours for a response.


Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/user-help.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ I have done the following:
- [ ] Searched on [Google](https://www.google.com/search?q=pyav+how+do+I+foo)
- [ ] Searched on [Stack Overflow](https://stackoverflow.com/search?q=pyav)
- [ ] Looked through [old GitHub issues](https://github.com/PyAV-Org/PyAV/issues?&q=is%3Aissue)
- [ ] Asked on [PyAV Gitter](https://gitter.im/PyAV-Org)
- [ ] Asked on [PyAV Gitter](https://app.gitter.im/#/room/#PyAV-Org_User-Help:gitter.im)
- [ ] ... and waited 72 hours for a response.


Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/issues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: issues
on:
schedule:
- cron: '30 1 * * *'

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v8
with:
stale-issue-label: stale
stale-issue-message: 'This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.'
days-before-stale: 120
days-before-close: 14
days-before-pr-stale: -1
days-before-pr-close: -1
operations-per-run: 60
157 changes: 73 additions & 84 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,76 +1,57 @@
name: tests

on: [push, pull_request]

on:
push:
paths-ignore:
- '**.md'
- '**.rst'
- '**.txt'
pull_request:
paths-ignore:
- '**.md'
- '**.rst'
- '**.txt'
jobs:


style:

name: "${{ matrix.config.suite }}"
runs-on: ubuntu-latest

strategy:
matrix:
config:
- {suite: isort}
- {suite: flake8}

env:
PYAV_PYTHON: python3
PYAV_LIBRARY: ffmpeg-4.2 # doesn't matter

steps:

- uses: actions/checkout@v2
name: Checkout
- name: Checkout
uses: actions/checkout@v4

- name: Python
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: 3.7

- name: Environment
run: env | sort
python-version: 3.8

- name: Packages
run: |
. scripts/activate.sh
# A bit of a hack that we can get away with this.
python -m pip install ${{ matrix.config.suite }}
- name: "${{ matrix.config.suite }}"
run: |
. scripts/activate.sh
./scripts/test ${{ matrix.config.suite }}
run: pip install -r tests/requirements.txt

- 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-latest, python: 3.7, ffmpeg: "4.2", extras: true}
- {os: ubuntu-latest, python: 3.7, ffmpeg: "4.1"}
- {os: ubuntu-latest, python: 3.7, ffmpeg: "4.0"}
- {os: ubuntu-latest, python: pypy3, ffmpeg: "4.2"}
#- {os: macos-latest, python: 3.7, ffmpeg: "4.2"}
- {os: ubuntu-latest, python: 3.8, ffmpeg: "6.0", extras: true}
- {os: ubuntu-latest, python: 3.8, ffmpeg: "5.1"}
- {os: ubuntu-latest, python: 3.8, ffmpeg: "5.0"}
- {os: ubuntu-latest, python: pypy3.9, ffmpeg: "5.0"}
- {os: macos-latest, python: 3.8, ffmpeg: "5.0"}

env:
PYAV_PYTHON: python${{ matrix.config.python }}
PYAV_LIBRARY: ffmpeg-${{ matrix.config.ffmpeg }}

steps:

- uses: actions/checkout@v2
- uses: actions/checkout@v4
name: Checkout

- name: Python ${{ matrix.config.python }}
uses: actions/setup-python@v1
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.config.python }}

Expand Down Expand Up @@ -120,37 +101,29 @@ jobs:
if: matrix.config.extras
run: |
. scripts/activate.sh ffmpeg-${{ matrix.config.ffmpeg }}
scripts/test doctest
make -C docs test
- name: Examples
if: matrix.config.extras
run: |
. scripts/activate.sh ffmpeg-${{ matrix.config.ffmpeg }}
scripts/test examples
- name: Source Distribution
if: matrix.config.extras
run: |
. scripts/activate.sh ffmpeg-${{ matrix.config.ffmpeg }}
scripts/test sdist
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.7, ffmpeg: "4.2"}
- {os: windows-latest, python: 3.7, ffmpeg: "4.1"}
- {os: windows-latest, python: 3.7, ffmpeg: "4.0"}
- {os: windows-latest, python: 3.8, ffmpeg: "6.0"}
- {os: windows-latest, python: 3.8, ffmpeg: "5.1"}
- {os: windows-latest, python: 3.8, ffmpeg: "5.0"}

steps:

- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Conda
shell: bash
Expand All @@ -160,7 +133,6 @@ jobs:
conda config --add channels conda-forge
conda create -q -n pyav \
cython \
ffmpeg=${{ matrix.config.ffmpeg }} \
numpy \
pillow \
python=${{ matrix.config.python }} \
Expand All @@ -171,7 +143,8 @@ jobs:
run: |
. $CONDA/etc/profile.d/conda.sh
conda activate pyav
python setup.py build_ext --inplace --ffmpeg-dir=$CONDA_PREFIX/Library
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
Expand All @@ -183,18 +156,17 @@ jobs:
package-source:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.8
- name: Build source package
run: |
pip install cython
python scripts/fetch-vendor /tmp/vendor
PKG_CONFIG_PATH=/tmp/vendor/lib/pkgconfig make build
python setup.py sdist
python scripts/fetch-vendor.py --config-file scripts/ffmpeg-6.0.json /tmp/vendor
PKG_CONFIG_PATH=/tmp/vendor/lib/pkgconfig python setup.py sdist
- name: Upload source package
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v3
with:
name: dist
path: dist/
Expand All @@ -204,36 +176,53 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
include:
- os: macos-latest
arch: arm64
- os: macos-latest
arch: x86_64
- os: ubuntu-latest
arch: aarch64
- os: ubuntu-latest
arch: i686
- os: ubuntu-latest
arch: x86_64
- os: windows-latest
arch: AMD64
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: 3.7
python-version: 3.8
- name: Set up QEMU
if: matrix.os == 'ubuntu-latest'
uses: docker/setup-qemu-action@v3
- name: Install packages
if: matrix.os == 'macos-latest'
run: |
brew update
brew install pkg-config
- name: Build wheels
env:
CIBW_BEFORE_BUILD: pip install cython && python scripts/fetch-vendor /tmp/vendor
CIBW_BEFORE_BUILD_WINDOWS: pip install cython && python scripts\fetch-vendor C:\cibw\vendor
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_BEFORE_ALL_LINUX: yum install -y alsa-lib libxcb
CIBW_BEFORE_BUILD: python scripts/fetch-vendor.py --config-file scripts/ffmpeg-6.0.json /tmp/vendor
CIBW_BEFORE_BUILD_WINDOWS: python scripts\fetch-vendor.py --config-file scripts\ffmpeg-6.0.json C:\cibw\vendor
CIBW_ENVIRONMENT_LINUX: LD_LIBRARY_PATH=/tmp/vendor/lib:$LD_LIBRARY_PATH PKG_CONFIG_PATH=/tmp/vendor/lib/pkgconfig
CIBW_ENVIRONMENT_MACOS: PKG_CONFIG_PATH=/tmp/vendor/lib/pkgconfig LDFLAGS=-headerpad_max_install_names
CIBW_ENVIRONMENT_WINDOWS: CL="/IC:\cibw\vendor\include" LINK="/LIBPATH:C:\cibw\vendor\lib"
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: python scripts/inject-dll {wheel} {dest_dir} C:\cibw\vendor\bin
CIBW_SKIP: cp27-* pp27-* pp36-win*
CIBW_ENVIRONMENT_WINDOWS: INCLUDE=C:\\cibw\\vendor\\include LIB=C:\\cibw\\vendor\\lib PYAV_SKIP_TESTS=unicode_filename
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: delvewheel repair --add-path C:\cibw\vendor\bin -w {dest_dir} {wheel}
CIBW_SKIP: cp36-* pp36-* pp38-win* *-musllinux*
CIBW_TEST_COMMAND: mv {project}/av {project}/av.disabled && python -m unittest discover -t {project} -s tests && mv {project}/av.disabled {project}/av
# disable test suite on OS X, the SSL config seems broken
CIBW_TEST_COMMAND_MACOS: true
CIBW_TEST_REQUIRES: numpy
# skip tests when there are no binary wheels of numpy
CIBW_TEST_SKIP: pp* *_i686
run: |
pip install cibuildwheel==1.4.2
pip install cibuildwheel delvewheel
cibuildwheel --output-dir dist
shell: bash
- name: Upload wheels
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v3
with:
name: dist
path: dist/
Expand All @@ -242,14 +231,14 @@ jobs:
runs-on: ubuntu-latest
needs: [package-source, package-wheel]
steps:
- uses: actions/checkout@v2
- uses: actions/download-artifact@v1
- uses: actions/checkout@v4
- uses: actions/download-artifact@v3
with:
name: dist
path: dist/
- name: Publish to PyPI
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags/')
uses: pypa/gh-action-pypi-publish@master
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
# Testing.
*.spyderproject
.idea
/.vagrant
/sandbox
/tests/assets
/tests/samples
Loading

0 comments on commit 2351d4f

Please sign in to comment.