Skip to content

faster

faster #667

Workflow file for this run

name: build-ffmpeg
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
arch: arm64
shell: bash
- os: macos-latest
arch: x86_64
shell: bash
- os: ubuntu-latest
arch: i686
shell: bash
- os: ubuntu-latest
arch: x86_64
shell: bash
- os: windows-latest
arch: AMD64
shell: 'msys2 {0}'
defaults:
run:
shell: ${{ matrix.shell }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install packages
if: matrix.os == 'macos-latest'
run: |
brew update
brew install pkg-config
brew unlink gettext libidn2 libpng libtiff libunistring little-cms2 unbound
- uses: msys2/setup-msys2@v2
if: matrix.os == 'windows-latest'
with:
install: base-devel mingw-w64-x86_64-gcc mingw-w64-x86_64-gperf mingw-w64-x86_64-nasm
path-type: inherit
- name: Build FFmpeg
env:
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_BEFORE_BUILD: python scripts/build-ffmpeg.py /tmp/vendor
CIBW_BEFORE_BUILD_WINDOWS: python scripts\build-ffmpeg.py C:\cibw\vendor
CIBW_BUILD: cp38-*
CIBW_REPAIR_WHEEL_COMMAND_LINUX: LD_LIBRARY_PATH=/tmp/vendor/lib:$LD_LIBRARY_PATH auditwheel repair -w {dest_dir} {wheel}
CIBW_REPAIR_WHEEL_COMMAND_WINDOWS: delvewheel repair --add-path C:\cibw\vendor\bin -w {dest_dir} {wheel}
CIBW_SKIP: "*musllinux*"
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@v3
with:
name: output-wheel-${{ matrix.os }}-${{ matrix.arch }}
path: output/
# build-qemu-stage-1:
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# arch: [aarch64, ppc64le]
# env:
# stage: 1
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v4
# with:
# python-version: 3.8
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
# - name: Build FFmpeg dependencies
# run: |
# docker run -v $PWD:/project:rw --workdir=/project quay.io/pypa/manylinux2014_${{ matrix.arch }} bash -exc '
# export PATH=/opt/python/cp38-cp38/bin:$PATH;
# export CIBUILDWHEEL=1;
# python scripts/build-ffmpeg.py /tmp/vendor --stage ${{ env.stage }};
# cp -ar /tmp/vendor /project;
# '
# shell: bash
# - uses: actions/upload-artifact@v3
# with:
# name: artifacts-${{ matrix.arch }}
# path: vendor
# build-qemu-stage-2:
# needs: build-qemu-stage-1
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# arch: [aarch64, ppc64le]
# env:
# stage: 2
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v4
# with:
# python-version: 3.8
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
# - uses: actions/download-artifact@v3
# with:
# name: artifacts-${{ matrix.arch }}
# path: vendor
# - name: Build FFmpeg dependencies
# run: |
# docker run -v $PWD:/project:rw --workdir=/project quay.io/pypa/manylinux2014_${{ matrix.arch }} bash -exc '
# export PATH=/opt/python/cp38-cp38/bin:$PATH;
# export CIBUILDWHEEL=1;
# cp -ar vendor /tmp;
# python scripts/build-ffmpeg.py /tmp/vendor --stage ${{ env.stage }};
# cp -ar /tmp/vendor /project;
# '
# shell: bash
# - uses: actions/upload-artifact@v3
# with:
# name: artifacts-${{ matrix.arch }}
# path: vendor
# build-qemu-stage-3:
# needs: build-qemu-stage-2
# runs-on: ubuntu-latest
# strategy:
# fail-fast: false
# matrix:
# arch: [aarch64, ppc64le]
# env:
# stage: 3
# steps:
# - uses: actions/checkout@v4
# - uses: actions/setup-python@v4
# with:
# python-version: 3.8
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v3
# - uses: actions/download-artifact@v3
# with:
# name: artifacts-${{ matrix.arch }}
# path: vendor
# - name: Build FFmpeg
# env:
# CIBW_ARCHS: ${{ matrix.arch }}
# CIBW_BEFORE_ALL_LINUX: cp -ar vendor /tmp
# CIBW_BEFORE_BUILD: python scripts/build-ffmpeg.py /tmp/vendor --stage ${{ env.stage }}
# CIBW_BUILD: cp38-*
# CIBW_REPAIR_WHEEL_COMMAND_LINUX: LD_LIBRARY_PATH=/tmp/vendor/lib:$LD_LIBRARY_PATH auditwheel repair -w {dest_dir} {wheel}
# CIBW_SKIP: "*musllinux*"
# CIBW_TEST_COMMAND: python -c "import dummy"
# run: |
# pip install cibuildwheel
# cibuildwheel --output-dir output
# rm -f output/*.whl
# shell: bash
# - name: Upload FFmpeg
# uses: actions/upload-artifact@v3
# with:
# name: output
# path: output/