Files
FFmpeg/.github/workflows/build.yml
T
Michael Fabian 'Xaymar' Dirks 9a0470f317 ci: Add libx264
2022-01-10 00:42:01 +01:00

111 lines
3.9 KiB
YAML

name: Build
on:
workflow_dispatch:
inputs:
ref:
description: 'Branch, Tag or Commit to build'
required: false
default: 'master'
env:
AMDAMF_VERSION: "v1.4.23"
AOM_VERSION: "v3.1.2.115"
MINGW_VERSION: "v9.0.0"
NVIDIANVENC_VERSION: "n11.0.10.0"
X264_VERSION: "0.163.3060"
ZLIB_VERSION: "2.0.3"
jobs:
cc:
runs-on: ubuntu-20.04
strategy:
matrix:
license: [ "LGPL", "GPL" ]
license_version: [ 2, 3 ]
type: [ "shared" ]
bits: [ 64 ]
patches: [ false, true ]
name: "Windows (${{ matrix.bits }}bit, ${{ matrix.type }}, ${{ matrix.license }}v${{ matrix.license_version}}, patched=${{ matrix.patches }})"
env:
BUILD_TYPE: ${{ matrix.type }}
BUILD_BITS: ${{ matrix.bits }}
LICENSE: ${{ matrix.license }}
LICENSE_VERSION: ${{ matrix.license_version }}
SCRIPTROOT: "/tmp"
steps:
- name: "automation: Check-out"
uses: actions/checkout@v2
with:
submodules: "recursive"
fetch-depth: 1
- name: "automation: Copy things to safety"
shell: bash
run: |
# Copy important scripts to "safe" directory".
cp -R -f ./patches ${SCRIPTROOT}/patches
cp -R -f ./scripts ${SCRIPTROOT}/scripts
chmod +x ${SCRIPTROOT}/scripts/*.sh
cp -R -f ./addons ${SCRIPTROOT}/addons
chmod +x ${SCRIPTROOT}/addons/*.sh
- name: "dependency: cmake, make, pkg-config, mingw, nasm"
shell: bash
run: |
sudo apt-get update
sudo apt-get install \
build-essential git \
cmake make ninja-build \
pkg-config \
mingw-w64 mingw-w64-tools gcc-mingw-w64 g++-mingw-w64 \
nasm
- name: "ffmpeg: Check out '${{ github.event.inputs.ref }}'"
uses: actions/checkout@v2
with:
ref: "${{ github.event.inputs.ref }}"
submodules: "recursive"
fetch-depth: 0
- name: "automation: Bootstrap"
id: bootstrap
shell: bash
run: |
. ${SCRIPTROOT}/addons/bootstrap.sh
echo "FFmpeg v${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}.${VERSION_TWEAK}-${COMMIT}"
- name: "automation: Apply Patches"
if: ${{ (matrix.patches == true) }}
id: patch
env:
VERSION_MAJOR: ${{ steps.bootstrap.outputs.VERSION_MAJOR }}
VERSION_MINOR: ${{ steps.bootstrap.outputs.VERSION_MINOR }}
VERSION_PATCH: ${{ steps.bootstrap.outputs.VERSION_PATCH }}
VERSION_TWEAK: ${{ steps.bootstrap.outputs.VERSION_TWEAK }}
COMMIT: ${{ steps.bootstrap.outputs.COMMIT }}
shell: bash
run: |
. ${SCRIPTROOT}/addons/patch.sh
echo "::set-output name=name::-patched"
- name: "automation: Run scripts"
env:
VERSION_MAJOR: ${{ steps.bootstrap.outputs.VERSION_MAJOR }}
VERSION_MINOR: ${{ steps.bootstrap.outputs.VERSION_MINOR }}
VERSION_PATCH: ${{ steps.bootstrap.outputs.VERSION_PATCH }}
VERSION_TWEAK: ${{ steps.bootstrap.outputs.VERSION_TWEAK }}
COMMIT: ${{ steps.bootstrap.outputs.COMMIT }}
BUILD_ARCH: ${{ steps.bootstrap.outputs.BUILD_ARCH }}
BUILD_TARGET: ${{ steps.bootstrap.outputs.BUILD_TARGET }}
BUILD_PREFIX: ${{ steps.bootstrap.outputs.BUILD_PREFIX }}
BUILD_FLAGS: ${{ steps.bootstrap.outputs.BUILD_FLAGS }}
shell: bash
run: |
. ${SCRIPTROOT}/addons/run.sh
- name: "automation: Upload Artifacts"
uses: actions/upload-artifact@v1
with:
name: "ffmpeg-${{ matrix.license }}v${{ matrix.license_version }}-${{ matrix.bits}}-${{ matrix.type }}-${{ steps.bootstrap.outputs.VERSION_MAJOR }}.${{ steps.bootstrap.outputs.VERSION_MINOR }}.${{ steps.bootstrap.outputs.VERSION_PATCH }}.${{ steps.bootstrap.outputs.VERSION_TWEAK }}-${{ steps.bootstrap.outputs.COMMIT }}${{ steps.patch.outputs.name }}"
path: distrib