Switch to ffmpeg 7.0.2 #66
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build | |
on: | |
pull_request: null | |
workflow_dispatch: | |
inputs: | |
myCommit: | |
description: Commit SHA1 | |
required: false | |
default: '' | |
type: string | |
push: | |
branches: | |
- master | |
release: | |
types: | |
- published | |
env: | |
DEPS_VERSION: r3 | |
# NDK version should match with the one in the main repo! | |
NDK_REVISION: r26d | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
configuration: | |
- Debug | |
- Release | |
- RelWithDebInfo | |
target: | |
- windows_x86 | |
- windows_x86_64 | |
- darwin_arm64 | |
- darwin_x86_64 | |
- linux_x86 | |
- linux_x86_64 | |
- android_x86 | |
- android_x86_64 | |
- android_arm32 | |
- android_arm64 | |
include: | |
- {target: windows_x86, platform: windows, architecture: x86, os: windows-2022, shell: 'msys2 {0}'} | |
- {target: windows_x86_64, platform: windows, architecture: x86_64, os: windows-2022, shell: 'msys2 {0}'} | |
- {target: darwin_arm64, platform: darwin, architecture: arm64, os: macos-14, shell: bash} | |
- {target: darwin_x86_64, platform: darwin, architecture: x86_64, os: macos-14, shell: bash} | |
- {target: linux_x86, platform: linux, architecture: x86, os: ubuntu-22.04, shell: bash} | |
- {target: linux_x86_64, platform: linux, architecture: x86_64, os: ubuntu-22.04, shell: bash} | |
- {target: android_x86, platform: android, architecture: x86, os: ubuntu-22.04, shell: bash} | |
- {target: android_x86_64, platform: android, architecture: x86_64, os: ubuntu-22.04, shell: bash} | |
- {target: android_arm32, platform: android, architecture: arm32, os: ubuntu-22.04, shell: bash} | |
- {target: android_arm64, platform: android, architecture: arm64, os: ubuntu-22.04, shell: bash} | |
runs-on: ${{matrix.os}} | |
defaults: | |
run: | |
shell: ${{matrix.shell}} | |
steps: | |
- name: 'Inject Slug/Short Variables' | |
uses: rlespinasse/github-slug-action@v4 | |
- name: '[windows] Setup msys' | |
if: matrix.platform == 'windows' | |
uses: msys2/setup-msys2@v2 | |
with: | |
msystem: UCRT64 | |
install: make yasm zip | |
path-type: inherit | |
release: false # Reuse existing msys installation that's part of a runner image. | |
- name: 'Checkout' | |
uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
ref: '${{inputs.myCommit}}' | |
- name: '[windows] Setup MSVC' | |
if: matrix.platform == 'windows' | |
uses: ilammy/msvc-dev-cmd@v1 | |
with: | |
arch: '${{matrix.architecture}}' | |
# Ironically, this is what the official build guide is recommending to do: | |
# https://trac.ffmpeg.org/wiki/CompilationGuide/MSVC | |
- name: '[windows] Drop link.exe' | |
if: matrix.platform == 'windows' | |
run: | | |
rm -rf /usr/bin/link.exe | |
which link.exe | |
- name: '[darwin] Install dependencies' | |
if: matrix.platform == 'darwin' | |
run: | | |
brew install yasm | |
- name: '[linux] Install Dependencies' | |
if: matrix.platform == 'linux' | |
run: | | |
ARCH= | |
if [[ "${{matrix.architecture}}" = "x86" ]]; then | |
sudo dpkg --add-architecture i386 | |
ARCH=:i386 | |
fi | |
sudo apt-get update | |
sudo apt-get install -y yasm | |
[[ ! -z "$ARCH" ]] && sudo apt-get install -y gcc-multilib g++-multilib | |
# libasound2-dev is for ALSA, libpulse-dev is for PulseAudio, we want to have both as backends for OpenAL. | |
sudo apt-get install -y "libasound2-dev$ARCH" "libpulse-dev$ARCH" | |
- name: '[android] Install Dependencies' | |
if: matrix.platform == 'android' | |
run: | | |
if [[ "${{matrix.architecture}}" = "x86_64" ]]; then | |
sudo apt-get install -y yasm | |
fi | |
- name: '[android] Setup NDK' | |
if: matrix.platform == 'android' | |
id: setup-ndk | |
uses: nttld/setup-ndk@v1.3.1 | |
with: | |
ndk-version: '${{env.NDK_REVISION}}' | |
add-to-path: false | |
local-cache: true | |
link-to-sdk: true | |
- name: '[android] Set ANDROID_NDK' | |
if: matrix.platform == 'android' | |
run: | | |
echo "ANDROID_NDK=${{steps.setup-ndk.outputs.ndk-path}}" >> $GITHUB_ENV | |
- name: 'Variables' | |
run: | | |
echo "ZIP_NAME=${{matrix.platform}}_${{matrix.configuration}}_${{matrix.architecture}}.zip" >> $GITHUB_ENV | |
- name: 'Build' | |
run: | | |
./scripts/build_all.sh -j4 ${{matrix.platform}} ${{matrix.architecture}} ${{matrix.configuration}} repos "${{env.ZIP_NAME}}" | |
- name: 'Print info' | |
if: always() | |
run: | | |
./scripts/print_info.sh | |
- name: 'Publish release' | |
id: release | |
continue-on-error: true | |
uses: softprops/action-gh-release@v1 | |
with: | |
prerelease: true | |
tag_name: 'deps_${{env.DEPS_VERSION}}_${{env.GITHUB_REF_NAME_SLUG}}' | |
files: '${{env.ZIP_NAME}}' | |
#show success if release published failed on pr | |
- run: echo "OK" | |
if: job.steps.release.status == failure() && github.event_name == 'pull_request' |