2021-04-19 21:29:55 +02:00
|
|
|
name: FFmpeg native build
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
rev:
|
|
|
|
description: 'FFmpeg/FFmpeg commit to build'
|
|
|
|
required: true
|
2022-12-08 19:02:28 +01:00
|
|
|
|
|
|
|
env:
|
|
|
|
DECODERS: "h264,vp8"
|
2022-12-09 11:55:14 +01:00
|
|
|
MACOSX_DEPLOYMENT_TARGET: "11.0"
|
2022-12-08 19:02:28 +01:00
|
|
|
|
2021-04-19 21:29:55 +02:00
|
|
|
jobs:
|
|
|
|
build:
|
2022-12-08 19:02:28 +01:00
|
|
|
name: ${{ matrix.platform.name }}
|
|
|
|
runs-on: ${{ matrix.platform.os }}
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
platform:
|
2022-12-09 11:55:14 +01:00
|
|
|
- { name: win-x64, os: ubuntu-20.04, flags: "--arch=x86_64 --target-os=mingw32 --cross-prefix=x86_64-w64-mingw32- --disable-w32threads --extra-ldflags=\"-static-libgcc -static-libstdc++ -static\"" }
|
2022-12-08 20:05:47 +01:00
|
|
|
- { name: linux-x64, os: ubuntu-20.04, flags: "--arch=x86_64 --extra-ldflags=\"-static-libgcc -static-libstdc++\"" }
|
2022-12-11 11:57:38 +01:00
|
|
|
- { name: osx-x64, os: macos-latest, flags: "--arch=x86_64 --install-name-dir=\"@rpath\" --enable-cross-compile --cc=\"clang -arch x86_64\" --disable-xlib" }
|
|
|
|
- { name: osx-arm64, os: macos-latest, flags: "--arch=arm64 --install-name-dir=\"@rpath\" --enable-neon --enable-cross-compile --cc=\"clang -arch arm64\" --disable-xlib" }
|
2021-04-19 21:29:55 +02:00
|
|
|
steps:
|
2022-12-08 20:05:47 +01:00
|
|
|
- name: Setup Linux common dependencies
|
2021-04-19 21:29:55 +02:00
|
|
|
if: runner.os == 'Linux'
|
|
|
|
run: |
|
|
|
|
sudo apt-get install yasm \
|
|
|
|
make \
|
|
|
|
automake \
|
|
|
|
autoconf \
|
|
|
|
git \
|
|
|
|
pkg-config \
|
|
|
|
libtool-bin \
|
2022-12-08 20:05:47 +01:00
|
|
|
nasm
|
|
|
|
- name: Setup MinGW64 dependencies
|
|
|
|
if: ${{ matrix.platform.name == 'win-x64' }}
|
|
|
|
run: |
|
|
|
|
sudo apt-get install gcc-mingw-w64-x86-64 g++-mingw-w64-x86-64
|
2022-12-09 11:55:14 +01:00
|
|
|
- name: Setup nasm for osx-x64 dependencies
|
|
|
|
if: ${{ matrix.platform.name == 'osx-x64' }}
|
|
|
|
run: |
|
|
|
|
brew install nasm
|
|
|
|
|
2021-04-19 21:29:55 +02:00
|
|
|
- uses: actions/checkout@v2
|
|
|
|
with:
|
|
|
|
repository: FFmpeg/FFmpeg
|
|
|
|
ref: ${{ github.event.inputs.rev }}
|
|
|
|
- name: Configure FFmpeg build
|
|
|
|
run: |
|
2022-12-08 19:02:28 +01:00
|
|
|
./configure --disable-everything \
|
|
|
|
--disable-static \
|
|
|
|
--disable-doc \
|
|
|
|
--disable-programs \
|
|
|
|
--disable-swscale \
|
|
|
|
--disable-avformat \
|
|
|
|
--disable-swresample \
|
|
|
|
--disable-avdevice \
|
|
|
|
--disable-avfilter \
|
|
|
|
--disable-debug \
|
|
|
|
--enable-avcodec \
|
|
|
|
--enable-shared \
|
|
|
|
--enable-decoder=${{ env.DECODERS }} \
|
|
|
|
--enable-lto \
|
2022-12-09 11:55:14 +01:00
|
|
|
--enable-stripping \
|
2022-12-08 19:02:28 +01:00
|
|
|
${{ matrix.platform.flags }} \
|
|
|
|
--prefix=release_output
|
2021-04-19 21:29:55 +02:00
|
|
|
- name: "Build FFmpeg"
|
|
|
|
run: |
|
|
|
|
make -j4 && make install
|
|
|
|
- name: Upload artifact
|
2022-12-08 19:02:28 +01:00
|
|
|
uses: actions/upload-artifact@v3
|
2021-04-19 21:29:55 +02:00
|
|
|
with:
|
2022-12-08 19:02:28 +01:00
|
|
|
name: ${{ matrix.platform.name }}-binaries
|
2021-04-19 21:29:55 +02:00
|
|
|
path: |
|
2021-04-19 21:32:39 +02:00
|
|
|
release_output/*
|