Repository navigation
Update OHOS API and Windows compiler discovery #11
This file contains hidden or 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: FFmpeg dependencies | |
| on: | |
| workflow_dispatch: | |
| push: | |
| paths: | |
| - .github/workflows/ffmpeg-dependencies.yml | |
| - ffmpeg/** | |
| pull_request: | |
| paths: | |
| - .github/workflows/ffmpeg-dependencies.yml | |
| - ffmpeg/** | |
| concurrency: | |
| group: ffmpeg-dependencies-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| android: | |
| name: Android arm64 / API 24 | |
| runs-on: [self-hosted, macOS] | |
| timeout-minutes: 360 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Initialize pinned vcpkg | |
| run: git submodule update --init ffmpeg/vcpkg | |
| - name: Locate Android NDK r29 | |
| run: | | |
| sdk_root="${ANDROID_SDK_ROOT:-${ANDROID_HOME:-$HOME/Library/Android/sdk}}" | |
| ndk_root="$sdk_root/ndk/29.0.14206865" | |
| if [[ ! -f "$ndk_root/build/cmake/android.toolchain.cmake" ]]; then | |
| sdkmanager="$sdk_root/cmdline-tools/latest/bin/sdkmanager" | |
| if [[ ! -x "$sdkmanager" ]]; then | |
| echo "::error::Android SDK Command-line Tools are not installed: $sdkmanager" | |
| exit 1 | |
| fi | |
| java_home="${JAVA_HOME:-}" | |
| if [[ -z "$java_home" || ! -x "$java_home/bin/java" ]]; then | |
| android_studio_jbr="/Applications/Android Studio.app/Contents/jbr/Contents/Home" | |
| if [[ ! -x "$android_studio_jbr/bin/java" ]]; then | |
| echo "::error::Java was not found in JAVA_HOME or the Android Studio JBR" | |
| exit 1 | |
| fi | |
| java_home="$android_studio_jbr" | |
| fi | |
| export JAVA_HOME="$java_home" | |
| export PATH="$JAVA_HOME/bin:$PATH" | |
| "$sdkmanager" --sdk_root="$sdk_root" "ndk;29.0.14206865" | |
| fi | |
| test -f "$ndk_root/build/cmake/android.toolchain.cmake" | |
| echo "ANDROID_HOME=$sdk_root" >> "$GITHUB_ENV" | |
| echo "ANDROID_SDK_ROOT=$sdk_root" >> "$GITHUB_ENV" | |
| echo "ANDROID_NDK_HOME=$ndk_root" >> "$GITHUB_ENV" | |
| - name: Restore vcpkg binary cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/vcpkg/archives | |
| key: vcpkg-android-${{ hashFiles('ffmpeg/vcpkg.json', 'ffmpeg/vcpkg-configuration.json', 'ffmpeg/triplets/**', 'ffmpeg/ports/**') }} | |
| - name: Build and verify dependencies | |
| run: ./ffmpeg/scripts/build-android.sh | |
| - name: Upload Android package | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: qtav-ffmpeg-arm64-android-24-static | |
| path: | | |
| ffmpeg/build/arm64-android-24-static/vcpkg_installed/arm64-android-24-static | |
| ffmpeg/build/arm64-android-24-static/vcpkg_installed/vcpkg | |
| if-no-files-found: error | |
| windows: | |
| name: Windows x64 / Visual Studio | |
| runs-on: [self-hosted, Windows] | |
| timeout-minutes: 360 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Initialize pinned vcpkg | |
| shell: pwsh | |
| run: git submodule update --init ffmpeg/vcpkg | |
| - name: Restore vcpkg binary cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/AppData/Local/vcpkg/archives | |
| key: vcpkg-windows-${{ hashFiles('ffmpeg/vcpkg.json', 'ffmpeg/vcpkg-configuration.json', 'ffmpeg/triplets/**', 'ffmpeg/ports/**') }} | |
| - name: Build and verify dependencies | |
| shell: pwsh | |
| run: ./ffmpeg/scripts/build-windows.ps1 | |
| - name: Print Windows compiler probe logs | |
| if: failure() | |
| shell: pwsh | |
| run: | | |
| $logRoot = 'ffmpeg/vcpkg/buildtrees/detect_compiler' | |
| if (Test-Path $logRoot) { | |
| Get-ChildItem $logRoot -File -Filter '*.log' | | |
| Sort-Object Name | | |
| ForEach-Object { | |
| Write-Host "::group::$($_.Name)" | |
| Get-Content -LiteralPath $_.FullName | |
| Write-Host '::endgroup::' | |
| } | |
| } | |
| - name: Upload Windows package | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: qtav-ffmpeg-x64-windows-static-md | |
| path: | | |
| ffmpeg/build/x64-windows-static-md/vcpkg_installed/x64-windows-static-md | |
| ffmpeg/build/x64-windows-static-md/vcpkg_installed/vcpkg | |
| if-no-files-found: error | |
| ohos: | |
| name: OHOS arm64 / API 23 | |
| runs-on: [self-hosted, macOS] | |
| timeout-minutes: 360 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Initialize pinned vcpkg | |
| run: git submodule update --init ffmpeg/vcpkg | |
| - name: Check OHOS host tools | |
| run: | | |
| test -n "$OHOS_SDK_ROOT" | |
| test -f "$OHOS_SDK_ROOT/native/build/cmake/ohos.toolchain.cmake" | |
| command -v patchelf | |
| - name: Restore vcpkg binary cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cache/vcpkg/archives | |
| key: vcpkg-ohos-${{ hashFiles('ffmpeg/vcpkg.json', 'ffmpeg/vcpkg-configuration.json', 'ffmpeg/triplets/**', 'ffmpeg/ports/**') }} | |
| - name: Build and verify dependencies | |
| run: ./ffmpeg/scripts/build-ohos.sh | |
| - name: Upload OHOS package | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: qtav-ffmpeg-arm64-ohos-23-static | |
| path: | | |
| ffmpeg/build/arm64-ohos-23-static/vcpkg_installed/arm64-ohos-23-static | |
| ffmpeg/build/arm64-ohos-23-static/vcpkg_installed/vcpkg | |
| if-no-files-found: error |