Update readme #999
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: build-ffmpeg | |
on: | |
push: | |
branches: main | |
paths-ignore: | |
- '**.md' | |
- '**.rst' | |
- '**.txt' | |
pull_request: | |
branches: main | |
paths-ignore: | |
- '**.md' | |
- '**.rst' | |
- '**.txt' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: macos-14 | |
arch: arm64 | |
shell: bash | |
- os: macos-15-intel | |
arch: x86_64 | |
shell: bash | |
- os: ubuntu-24.04-arm | |
arch: aarch64 | |
shell: bash | |
- os: ubuntu-24.04 | |
arch: x86_64 | |
shell: bash | |
- os: windows-latest | |
arch: AMD64 | |
shell: 'msys2 {0}' | |
msys_prefix: mingw-w64-x86_64 | |
msys_system: MINGW64 | |
defaults: | |
run: | |
shell: ${{ matrix.shell }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: "3.13" | |
- name: Set deployment target | |
if: runner.os == 'macOS' | |
run: | | |
if [ "${{ matrix.arch }}" = "x86_64" ]; then | |
echo "MACOSX_DEPLOYMENT_TARGET=11.0" >> $GITHUB_ENV | |
else | |
echo "MACOSX_DEPLOYMENT_TARGET=14.0" >> $GITHUB_ENV | |
fi | |
- name: Install packages for macOS | |
if: runner.os == 'macOS' | |
run: | | |
brew update | |
brew unlink gettext libidn2 libpng libtiff libunistring libx11 libxau libxcb libxdmcp little-cms2 unbound | |
- uses: msys2/setup-msys2@v2 | |
if: matrix.os == 'windows-latest' | |
with: | |
install: base-devel openssl-devel ${{ matrix.msys_prefix }}-gcc ${{ matrix.msys_prefix }}-gperf ${{ matrix.msys_prefix }}-nasm | |
msystem: ${{ matrix.msys_system }} | |
path-type: inherit | |
- name: Build FFmpeg | |
env: | |
CIBW_ARCHS: ${{ matrix.arch }} | |
CIBW_BEFORE_BUILD: python scripts/build-ffmpeg.py /tmp/vendor --community | |
CIBW_BEFORE_BUILD_WINDOWS: python scripts\build-ffmpeg.py C:\cibw\vendor --community | |
CIBW_BUILD: cp311-* | |
CIBW_REPAIR_WHEEL_COMMAND_LINUX: LD_LIBRARY_PATH=/tmp/vendor/lib:$LD_LIBRARY_PATH auditwheel repair --exclude libmvec.so.1 --exclude libmvec-2.so --exclude libmvec.so --exclude libmvec -w {dest_dir} {wheel} | |
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: delvewheel repair --add-path C:\cibw\vendor\bin -w {dest_dir} {wheel} | |
CIBW_TEST_COMMAND: python -c "import dummy" | |
run: | | |
pip install cibuildwheel delvewheel | |
cibuildwheel --output-dir output | |
rm -f output/*.whl | |
- name: Upload FFmpeg | |
uses: actions/upload-artifact@v4 | |
with: | |
name: output-${{ matrix.os }}-${{ matrix.arch }} | |
path: output/ |