Skip to content

Build windows aarch64 #1081

Build windows aarch64

Build windows aarch64 #1081

Workflow file for this run

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: x86_64
shell: 'msys2 {0}'
msys_prefix: mingw-w64-x86_64
msys_system: MINGW64
- os: windows-11-arm
arch: arm64
shell: 'msys2 {0}'
msys_prefix: mingw-w64-clang-aarch64
msys_system: CLANGARM64
defaults:
run:
shell: ${{ matrix.shell }}
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.14"
- 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
if [ "${{ matrix.os }}" = "macos-15-intel" ]; then
brew install yasm
fi
- uses: msys2/setup-msys2@v2
if: runner.os == 'Windows'
with:
install: >-
base-devel
openssl-devel
${{ matrix.msys_prefix }}-pkgconf
${{ matrix.msys_system == 'CLANGARM64' && format('{0}-clang', matrix.msys_prefix) || format('{0}-gcc {0}-nasm', matrix.msys_prefix) }}
msystem: ${{ matrix.msys_system }}
path-type: inherit
- name: Build FFmpeg
env:
CIBW_ARCHS: ${{ matrix.msys_system == 'CLANGARM64' && 'ARM64' || (matrix.msys_prefix && 'AMD64' || 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: 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@v6
with:
name: output-${{ matrix.os }}
path: output/
cross-build:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
build: [ "manylinux_", "musllinux_" ]
# arch: [ "loongarch64", "ppc64le", "riscv64", "s390x" ]
arch: [ "ppc64le" ]
steps:
- uses: actions/checkout@v6
- uses: actions/setup-python@v6
with:
python-version: "3.14"
- uses: docker/setup-qemu-action@v3
- name: Build FFmpeg
env:
CIBW_ARCHS: ${{ matrix.arch }}
CIBW_BEFORE_ALL_LINUX: ./scripts/install-static-clang.sh
CIBW_BEFORE_BUILD_LINUX: python scripts/build-ffmpeg.py /tmp/vendor
CIBW_BUILD: cp311-${{ matrix.build }}${{ matrix.arch }}
CIBW_ENVIRONMENT_LINUX: >
CC="/opt/clang/bin/clang"
CXX="/opt/clang/bin/clang++"
LDFLAGS="-fuse-ld=lld"
CIBW_ENVIRONMENT_PASS_LINUX: RUNNER_ARCH
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@v6
with:
name: output-${{ matrix.build }}${{ matrix.arch }}
path: output/