Skip to content

Commit 2ee1f09

Browse files
author
NullPointerException
committed
update ffmpeg workflow
1 parent a1c8402 commit 2ee1f09

File tree

2 files changed

+76
-6
lines changed

2 files changed

+76
-6
lines changed

.github/workflows/build-ffmpeg.yml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Build FFmpeg-Kit LTS for Android
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
extra_options:
7+
description: '额外构建选项'
8+
required: false
9+
default: ''
10+
type: string
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-22.04
15+
16+
steps:
17+
- name: 检出代码
18+
uses: actions/checkout@v3
19+
20+
- name: 设置 Java
21+
uses: actions/setup-java@v3
22+
with:
23+
distribution: 'temurin'
24+
java-version: '17'
25+
26+
- name: 安装依赖包
27+
run: |
28+
sudo apt-get update
29+
sudo apt-get install -y autoconf automake libtool pkg-config curl git doxygen nasm cmake gcc gperf texinfo yasm bison autogen wget autopoint meson ninja-build ragel groff gtk-doc-tools libtasn1-6-dev libtasn1-bin libgnutls28-dev libunistring-dev
30+
31+
- name: 设置 Android SDK
32+
uses: android-actions/setup-android@v2
33+
34+
- name: 构建 FFmpeg-Kit LTS
35+
run: |
36+
37+
git clone https://github.com/InfinityLoop1308/ffmpeg-kit.git
38+
cd ffmpeg-kit
39+
40+
# 构建 LTS 版本,并启用 gmp 和 gnutls 外部库
41+
BUILD_OPTIONS="--lts --enable-gmp --enable-openssl --enable-android-media-codec --enable-android-zlib --disable-x86 --disable-arm-v7a --disable-arm-v7a-neon"
42+
43+
# 添加额外的构建选项
44+
if [[ -n "${{ github.event.inputs.extra_options }}" ]]; then
45+
BUILD_OPTIONS="${BUILD_OPTIONS} ${{ github.event.inputs.extra_options }}"
46+
fi
47+
48+
# 执行构建脚本
49+
./android.sh ${BUILD_OPTIONS}
50+
51+
- name: 打印构建日志
52+
if: ${{ failure() }} # 无论成功或失败都执行
53+
run: |
54+
cd ffmpeg-kit
55+
if [[ -f build.log ]]; then
56+
tail -500 build.log
57+
else
58+
echo "build.log 文件不存在"
59+
fi
60+
61+
62+
- name: 上传 LTS AAR 文件
63+
uses: actions/upload-artifact@v4
64+
with:
65+
name: ffmpeg-kit-android-lts-aar
66+
path: ffmpeg-kit/bundle-android-aar-lts/*.aar
67+
if-no-files-found: warn
68+
69+
- name: 上传预编译库
70+
uses: actions/upload-artifact@v4
71+
with:
72+
name: ffmpeg-kit-prebuilt-lts
73+
path: ffmpeg-kit/prebuilt/
74+
if-no-files-found: warn

.github/workflows/ci.yml

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,15 @@ on:
99
- 'README.md'
1010
- 'fastlane/**'
1111
- 'assets/**'
12-
- '.github/**/*.md'
13-
- '.github/FUNDING.yml'
14-
- '.github/ISSUE_TEMPLATE/**'
12+
- '.github/**'
1513
push:
1614
branches:
1715
- main
1816
paths-ignore:
1917
- 'README.md'
2018
- 'fastlane/**'
2119
- 'assets/**'
22-
- '.github/**/*.md'
23-
- '.github/FUNDING.yml'
24-
- '.github/ISSUE_TEMPLATE/**'
20+
- '.github/**'
2521

2622
jobs:
2723
build-client:

0 commit comments

Comments
 (0)