Files
voukoder-ffmpeg/.github/workflows/ffmpeg.yml
Daniel Stankewitz 83f10810bb Update ffmpeg.yml
2022-03-21 15:53:02 +01:00

165 lines
4.3 KiB
YAML

name: FFmpeg
on:
workflow_dispatch:
inputs:
config:
description: 'Configuration'
required: true
default: 'Debug'
env:
vsPath: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\
msysConfig: debug
winConfig: Debug
cFlags: -MDd
jobs:
libogg:
runs-on: windows-2019
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils autotools automake
path-type: inherit
- name: Set up cache
uses: actions/cache@v2
env:
cache-name: cache-ffmpeg-${{ env.msysConfig }}
with:
path: cache
key: cache-key
- name: Set up GIT
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout LibOGG
uses: actions/checkout@v3.0.0
with:
repository: xiph/ogg
ref: master
path: repo
- name: Build LibOGG
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build dist
D:\a\_temp\setup-msys2\msys2.cmd -c 'cd repo ; autoreconf -i ; CC=cl.exe CXX=cl.exe CXXFLAGS=${{ env.cFlags }} ./configure --prefix=$(realpath ../build) --disable-shared ; make -j ; make install ; cd build ; tar czf ../dist/libogg.tgz'
- name: Publish artifact
uses: actions/upload-artifact@v2
with:
name: libogg
path: dist/libogg.tgz
nvenc:
if: ${{ false }}
runs-on: windows-2019
steps:
- name: Set up MSYS2
amf:
if: ${{ false }}
runs-on: windows-2019
steps:
- name: Set up MSYS2
onevpl:
if: ${{ false }}
runs-on: windows-2019
steps:
- name: Set up MSYS2
libsvtav1:
if: ${{ false }}
runs-on: windows-2019
steps:
- name: Set up MSYS2
libvorbis:
if: ${{ false }}
runs-on: windows-2019
steps:
- name: Set up MSYS2
libsnappy:
if: ${{ false }}
runs-on: windows-2019
steps:
- name: Set up MSYS2
libvpx:
if: ${{ false }}
runs-on: windows-2019
steps:
- name: Set up MSYS2
libfdk-aac:
if: ${{ false }}
runs-on: windows-2019
steps:
- name: Set up MSYS2
libmp3lame:
if: ${{ false }}
runs-on: windows-2019
steps:
- name: Set up MSYS2
libzimg:
if: ${{ false }}
runs-on: windows-2019
steps:
- name: Set up MSYS2
libopus:
if: ${{ false }}
runs-on: windows-2019
steps:
- name: Set up MSYS2
libx264:
if: ${{ false }}
runs-on: windows-2019
steps:
- name: Set up MSYS2
libx265:
if: ${{ false }}
runs-on: windows-2019
steps:
- name: Set up MSYS2
ffmpeg:
if: ${{ false }}
runs-on: windows-2019
needs: [nvenc,amf,onevpl,libsvtav1,libvorbis,libsnappy,libvpx,libfdk-aac,libmp3lame,libzimg,libopus,libogg,libx264,libx265]
steps:
- name: Set up MSYS2
uses: msys2/setup-msys2@v2
with:
install: base-devel binutils mingw-w64-x86_64-cmake nasm
path-type: inherit
- name: Set up GIT
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout FFmpeg
uses: actions/checkout@v3.0.0
with:
repository: FFmpeg/FFmpeg.git
ref: release/5.0
path: repo
- name: Build FFmpeg
shell: cmd
run: |
call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat"
md build dist
D:\a\_temp\setup-msys2\msys2.cmd -c 'cd repo ; PKG_CONFIG_PATH=../build/lib/pkgconfig ./configure --toolchain=msvc --extra-cflags="${{ env.cFlags }} -I../build/include" --extra-ldflags="-LIBPATH:../build/lib" --prefix=../build --pkg-config-flags="--static" --disable-doc --disable-shared --enable-static --enable-runtime-cpudetect --disable-devices --disable-demuxers --disable-decoders --disable-network --enable-w32threads --enable-gpl ; make ; make install ; cd ../build/lib ; for file in *.a; do mv "$file" "`basename "$file" .a`.lib"; done ; rm -rf fdk-aac.lib pkgconfig *.la ../share ; cd .. ; tar czf ../dist/ffmpeg-win64-static-${{ env.msysConfig }}.tar.gz *'
- name: Publish FFmpeg artifacts
uses: actions/upload-artifact@v3
with:
name: Nightly Build (${{ env.winConfig }})
path: dist/ffmpeg-win64-static-${{ env.msysConfig }}.tar.gz