diff --git a/.github/workflows/ffmpeg-shared.yml b/.github/workflows/ffmpeg-shared.yml index 8f0a1a4..83b84fc 100644 --- a/.github/workflows/ffmpeg-shared.yml +++ b/.github/workflows/ffmpeg-shared.yml @@ -20,7 +20,7 @@ env: msysConfig: release winConfig: Release cFlags: -MD - useCartwheel: false + source: "official" jobs: liboggvorbis: @@ -345,51 +345,60 @@ jobs: 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 git config --global user.email "daniel.stankewitz@gmail.com" git config --global user.name "Daniel Stankewitz" + - name: Checkout patches uses: actions/checkout@v3.0.0 + - name: Checkout FFmpeg - if: ${{!env.useCartwheel}} + if: ${{env.source == 'official'}} uses: actions/checkout@v3.0.0 with: repository: FFmpeg/FFmpeg.git ref: release/5.0 path: ffmpeg + - name: Checkout NvEnc uses: actions/checkout@v3.0.0 with: repository: FFmpeg/nv-codec-headers ref: sdk/9.1 path: nvenc + - name: Checkout AMF uses: actions/checkout@v3.0.0 with: repository: GPUOpen-LibrariesAndSDKs/AMF ref: master path: amf + - name: Set up artifacts uses: actions/download-artifact@v3 with: path: build_artifacts + - name: Build FFmpeg - if: ${{true}} + if: ${{env.source == 'official'}} shell: cmd run: | call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat" md build dist D:\a\_temp\setup-msys2\msys2.cmd -c 'cd ffmpeg ; git apply --ignore-whitespace --verbose ../0003-dynamic-loading-of-shared-fdk-aac-library-5.0.patch ; cd ../build ; for file in `ls ../build_artifacts/**/*.tgz`; do tar -xzf $file; done ; rm -f bin/*.dll ; cd ../nvenc ; make PREFIX=../build install ; cp -a ../amf/amf/public/include ../build/include/AMF ; cd ../ffmpeg ; 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" --build-suffix=-voukoderpro --disable-doc --disable-static --enable-shared --enable-runtime-cpudetect --disable-devices --disable-demuxers --disable-decoders --disable-network --enable-w32threads --enable-gpl ${{ env.switches }} ; make ; make install ; cd ../build ; dir ; tar czf ../dist/ffmpeg-win64-shared-${{ env.msysConfig }}.tar.gz *' + - name: Build FFmpeg from Cartwheel - if: ${{false}} + if: ${{env.source == 'cartwheel'}} shell: cmd run: | call "${{ env.vsPath }}VC\Auxiliary\Build\vcvars64.bat" md build dist D:\a\_temp\setup-msys2\msys2.cmd -c 'git config --global user.email "daniel.stankewitz@gmail.com" ; git config --global user.name "Daniel Stankewitz" ; git clone https://github.com/intel-media-ci/cartwheel-ffmpeg --recursive cartwheel ; cd cartwheel ; cd patches ; git apply --ignore-whitespace ../../hotfix.patch ; cd .. ; git submodule update --init --recursive ; cd ffmpeg ; git am ../patches/*.patch ; git apply --ignore-whitespace --verbose ../../0001-dynamic-loading-of-shared-fdk-aac-library-cw-5.0.patch ; cd ../../build ; for file in `ls ../build_artifacts/**/*.tgz`; do tar -xzf $file; done ; rm -f bin/*.dll ; cd ../nvenc ; make PREFIX=../build install ; cp -a ../amf/amf/public/include ../build/include/AMF ; cd ../cartwheel/ffmpeg ; 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" --extra-libs=Ole32.lib --build-suffix=-voukoderpro --extra-libs=Advapi32.lib --disable-doc --disable-static --enable-shared --enable-runtime-cpudetect --disable-devices --disable-demuxers --disable-decoders --disable-network --enable-w32threads --enable-gpl ${{ env.switches }} ; make ; make install ; cd ../../build ; dir ; tar czf ../dist/ffmpeg-win64-shared-${{ env.msysConfig }}.tar.gz *' + - name: Publish FFmpeg artifacts uses: actions/upload-artifact@v3 with: