Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 15 additions & 1 deletion .github/workflows/release-apk.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,12 @@ jobs:
- name: Install FFmpeg source build tools
run: |
sudo apt-get update
sudo apt-get install --yes gettext
sudo apt-get install --yes \
autoconf automake libtool pkg-config curl git \
build-essential yasm nasm gperf texinfo bison ragel \
python3 python3-pip unzip zip wget meson ninja-build \
doxygen cmake autogen autopoint gettext groff \
gtk-doc-tools libtasn1-bin

- name: Build FFmpegKit from pinned sources
run: |
Expand All @@ -67,6 +72,15 @@ jobs:
printf 'CASTTRACE_FFMPEG_AAR_PATH=%s\n' "$aar" >> "$GITHUB_ENV"
printf 'CASTTRACE_FFMPEG_AAR_SHA256=%s\n' "$digest" >> "$GITHUB_ENV"

- name: Upload FFmpeg source build diagnostics
if: always()
uses: actions/upload-artifact@v4
with:
name: ffmpeg-source-build-diagnostics
path: build/ffmpeg-diagnostics/
if-no-files-found: ignore
retention-days: 14

- name: Collect FFmpeg corresponding-source materials
run: python scripts/prepare_ffmpeg_compliance.py --aar "$CASTTRACE_FFMPEG_AAR_PATH"

Expand Down
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

此记录描述源码版本,不代表已发布可下载的 APK。设备验证范围见 README。

## 0.2.16 - 2026-10-31

- 补齐 FFmpeg 源码构建依赖并在失败时保留构建日志,修复正式 APK 发布流程。
- 发布构建使用固定源码生成的 FFmpegKit AAR,并随包提供对应源码材料。

## 0.2.15 - 2026-10-31

- 修复正式 APK 发布时 FFmpeg 源码构建脚本的行尾兼容问题。
Expand Down
11 changes: 7 additions & 4 deletions RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@ Android updates must keep the same application id and signing identity.
## Local release checks

Use Ubuntu 24.04, JDK 17, Android SDK Platform 35, Build Tools 35.0.0, NDK
26.2.11394342 (r26c), Python 3 and `gettext`. Download or install the pinned
sources only through the tracked build recipe. From the repository root:
26.2.11394342 (r26c), Python 3 and the native build packages installed by the
release workflow (`autoconf`, `automake`, `libtool`, `autopoint`, `gettext`,
`gperf`, `bison`, `ragel`, `yasm`, `nasm`, `meson`, `ninja-build` and the
remaining packages in `.github/workflows/release-apk.yml`). Download or install
the pinned sources only through the tracked build recipe. From the repository root:

```bash
export ANDROID_HOME="$ANDROID_HOME"
Expand All @@ -52,8 +55,8 @@ byte-for-byte equivalent to the source build.
4. Create and push the matching annotated tag, for example:

```bash
git tag -a v0.2.15 -m "CastTrace 0.2.15"
git push origin v0.2.15
git tag -a v0.2.16 -m "CastTrace 0.2.16"
git push origin v0.2.16
```

5. Follow the `Publish Android APK` Actions run. The workflow verifies the
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ android {
}
minSdk = 26
targetSdk = 35
versionCode = 26
versionName = "0.2.15"
versionCode = 27
versionName = "0.2.16"

// The pinned FFmpegKit AAR ships only these ABIs. Do not advertise
// partial 32-bit support through unrelated AndroidX native libraries.
Expand Down
45 changes: 45 additions & 0 deletions scripts/build_ffmpeg_source.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,51 @@ WORKSPACE="$(mktemp -d "$ROOT/build/ffmpeg-source-build.XXXXXX")"
SOURCE="$WORKSPACE/ffmpegkit"
trap 'printf "FFmpeg source build workspace: %s\n" "$WORKSPACE"' EXIT

collect_diagnostics() {
local status=$?
local diagnostics="$ROOT/build/ffmpeg-diagnostics"
trap - EXIT
if (( status != 0 )); then
mkdir -p "$diagnostics/logs"
{
printf 'exit_status=%s\n' "$status"
printf 'build_commit=%s\n' "$BUILD_COMMIT"
printf 'workspace=%s\n' "$WORKSPACE"
printf 'ANDROID_SDK_ROOT='
printenv ANDROID_SDK_ROOT || printenv ANDROID_HOME || true
printf 'ANDROID_NDK_ROOT='
printenv ANDROID_NDK_ROOT || true
printf '\n=== NDK source.properties ===\n'
if [[ -n "$(printenv ANDROID_NDK_ROOT || true)" && -f "$(printenv ANDROID_NDK_ROOT)/source.properties" ]]; then
cat "$(printenv ANDROID_NDK_ROOT)/source.properties"
fi
printf '\n=== tool versions ===\n'
for tool in java autoconf automake libtoolize pkg-config gettext; do
if command -v "$tool" >/dev/null 2>&1; then
"$tool" --version 2>&1 | head -n 2 || true
else
printf '%s: unavailable\n' "$tool"
fi
done
} > "$diagnostics/environment.txt"

if [[ -d "$SOURCE" ]]; then
while IFS= read -r -d '' log; do
local relative
relative="$(realpath --relative-to="$SOURCE" "$log")"
mkdir -p "$diagnostics/logs/$(dirname "$relative")"
cp "$log" "$diagnostics/logs/$relative"
printf '\n=== %s (last 200 lines) ===\n' "$relative" >&2
tail -n 200 "$log" >&2 || true
done < <(find "$SOURCE" -type f -name build.log -print0 -o -type f -name config.log -print0)
fi
printf 'FFmpeg source build diagnostics: %s\n' "$diagnostics" >&2
fi
printf 'FFmpeg source build workspace: %s\n' "$WORKSPACE"
exit "$status"
}
trap collect_diagnostics EXIT

git init -q "$SOURCE"
git -C "$SOURCE" remote add origin https://github.com/ffmpegkit-maintained/ffmpeg.git
git -C "$SOURCE" fetch --depth=1 origin "$BUILD_COMMIT"
Expand Down
Loading