65 lines
2.5 KiB
YAML
65 lines
2.5 KiB
YAML
name: FFmpeg native build
|
|
on:
|
|
workflow_dispatch:
|
|
inputs:
|
|
rev:
|
|
description: 'FFmpeg/FFmpeg commit to build'
|
|
required: true
|
|
|
|
env:
|
|
DECODERS: "h264,vp8"
|
|
|
|
jobs:
|
|
build:
|
|
name: ${{ matrix.platform.name }}
|
|
runs-on: ${{ matrix.platform.os }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
platform:
|
|
- { 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 -s\"" }
|
|
steps:
|
|
- name: Setup Linux dependencies
|
|
if: runner.os == 'Linux'
|
|
run: |
|
|
sudo apt-get install yasm \
|
|
make \
|
|
automake \
|
|
autoconf \
|
|
git \
|
|
pkg-config \
|
|
libtool-bin \
|
|
nasm \
|
|
gcc-mingw-w64-x86-64 \
|
|
g++-mingw-w64-x86-64
|
|
- uses: actions/checkout@v2
|
|
with:
|
|
repository: FFmpeg/FFmpeg
|
|
ref: ${{ github.event.inputs.rev }}
|
|
- name: Configure FFmpeg build
|
|
run: |
|
|
./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 \
|
|
${{ matrix.platform.flags }} \
|
|
--prefix=release_output
|
|
- name: "Build FFmpeg"
|
|
run: |
|
|
make -j4 && make install
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: ${{ matrix.platform.name }}-binaries
|
|
path: |
|
|
release_output/*
|