Skip to content

Commit a470193

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

File tree

1 file changed

+66
-0
lines changed

1 file changed

+66
-0
lines changed

.github/workflows/build-ffmpeg.yml

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
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-latest
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: '11'
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 ragel groff gtk-doc-tools libtasn1-6-dev
30+
31+
- name: 设置 Android SDK
32+
uses: android-actions/setup-android@v2
33+
34+
- name: 下载 Android NDK
35+
run: |
36+
mkdir -p ${ANDROID_SDK_ROOT}/ndk
37+
wget https://dl.google.com/android/repository/android-ndk-r22b-linux-x86_64.zip
38+
unzip android-ndk-r22b-linux-x86_64.zip -d ${ANDROID_SDK_ROOT}/ndk
39+
echo "ANDROID_NDK_ROOT=${ANDROID_SDK_ROOT}/ndk/android-ndk-r22b" >> $GITHUB_ENV
40+
41+
- name: 构建 FFmpeg-Kit LTS
42+
run: |
43+
# 构建 LTS 版本,并启用 gmp 和 gnutls 外部库
44+
BUILD_OPTIONS="--lts --enable-gmp --enable-gnutls"
45+
46+
# 添加额外的构建选项
47+
if [[ -n "${{ github.event.inputs.extra_options }}" ]]; then
48+
BUILD_OPTIONS="${BUILD_OPTIONS} ${{ github.event.inputs.extra_options }}"
49+
fi
50+
51+
# 执行构建脚本
52+
./android.sh ${BUILD_OPTIONS}
53+
54+
- name: 上传 LTS AAR 文件
55+
uses: actions/upload-artifact@v3
56+
with:
57+
name: ffmpeg-kit-android-lts-aar
58+
path: bundle-android-aar-lts/*.aar
59+
if-no-files-found: warn
60+
61+
- name: 上传预编译库
62+
uses: actions/upload-artifact@v3
63+
with:
64+
name: ffmpeg-kit-prebuilt-lts
65+
path: prebuilt/
66+
if-no-files-found: warn

0 commit comments

Comments
 (0)