File tree Expand file tree Collapse file tree 1 file changed +26
-16
lines changed
Expand file tree Collapse file tree 1 file changed +26
-16
lines changed Original file line number Diff line number Diff line change @@ -31,38 +31,48 @@ jobs:
3131 - name : 设置 Android SDK
3232 uses : android-actions/setup-android@v2
3333
34- - name : 缓存 Android NDK
35- id : cache-ndk
36- uses : actions/cache@v3
37- with :
38- path : ${ANDROID_SDK_ROOT}/ndk/android-ndk-r22b
39- key : android-ndk-r22b
40-
41- - name : 检查缓存状态
42- run : |
43- if [[ "${{ steps.cache-ndk.outputs.cache-hit }}" == "true" ]]; then
44- echo "缓存已命中,无需下载 NDK"
45- else
46- echo "缓存未命中,将下载 NDK"
47- fi
48-
4934 - name : 下载 Android NDK
50- if : steps.cache-ndk.outputs.cache-hit != 'true'
5135 run : |
5236 mkdir -p ${ANDROID_SDK_ROOT}/ndk
5337 wget https://dl.google.com/android/repository/android-ndk-r22b-linux-x86_64.zip
5438 unzip android-ndk-r22b-linux-x86_64.zip -d ${ANDROID_SDK_ROOT}/ndk
5539
5640 - name : 构建 FFmpeg-Kit LTS
5741 run : |
42+
5843 git clone https://github.com/InfinityLoop1308/ffmpeg-kit.git
5944 cd ffmpeg-kit
45+
46+ # 构建 LTS 版本,并启用 gmp 和 gnutls 外部库
6047 BUILD_OPTIONS="--lts --enable-gmp --enable-gnutls --enable-android-media-codec --enable-android-zlib"
48+
49+ # 添加额外的构建选项
6150 if [[ -n "${{ github.event.inputs.extra_options }}" ]]; then
6251 BUILD_OPTIONS="${BUILD_OPTIONS} ${{ github.event.inputs.extra_options }}"
6352 fi
53+
54+ # 执行构建脚本
6455 ./android.sh ${BUILD_OPTIONS}
6556
57+ - name : 打印构建日志
58+ if : ${{ always() }} # 无论成功或失败都执行
59+ run : |
60+ if [[ -f build.log ]]; then
61+ cat build.log
62+ else
63+ echo "build.log 文件不存在"
64+ fi
65+
66+ - name : 打印 FFmpeg 配置日志(失败时)
67+ if : ${{ failure() }} # 仅在构建失败时执行
68+ run : |
69+ if [[ -f ./src/ffmpeg/ffbuild/config.log ]]; then
70+ tail -50 ./src/ffmpeg/ffbuild/config.log
71+ else
72+ echo "FFmpeg 配置日志文件 (config.log) 不存在"
73+ fi
74+
75+
6676 - name : 上传 LTS AAR 文件
6777 uses : actions/upload-artifact@v4
6878 with :
You can’t perform that action at this time.
0 commit comments