-
Notifications
You must be signed in to change notification settings - Fork 4
71 lines (56 loc) · 2.32 KB
/
media3.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
on: workflow_dispatch
name: Build Media3 Extension
jobs:
build:
name: Build Media3 Extension
runs-on: ubuntu-latest
steps:
- run: git clone https://github.com/androidx/media.git
- working-directory: media
run: git checkout tags/1.4.1
- working-directory: media/libraries/decoder_av1/src/main/jni
run: git clone https://github.com/google/cpu_features
- working-directory: media/libraries/decoder_av1/src/main/jni
run: git clone https://chromium.googlesource.com/codecs/libgav1
- working-directory: media/libraries/decoder_av1/src/main/jni/libgav1
run: git clone https://github.com/abseil/abseil-cpp.git third_party/abseil-cpp
- uses: seanmiddleditch/gha-setup-ninja@master
- uses: actions/setup-java@v1
with:
java-version: '17.x'
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.16.x'
- working-directory: media
run: ./gradlew :lib-decode-av1:build
- run: git clone https://github.com/FFmpeg/FFmpeg
- working-directory: FFmpeg
run: git checkout release/6.0
- uses: nttld/setup-ndk@v1
id: setup-ndk
with:
ndk-version: r26c
local-cache: true
- working-directory: media
run: |
FFMPEG_MODULE_PATH="${{ github.workspace }}/media/libraries/decoder_ffmpeg/src/main"
HOST_PLATFORM="linux-x86_64"
ANDROID_ABI=21
ENABLED_DECODERS="vorbis,opus,flac,mp3,aac,ac3,eac3,dca"
FFMPEG_PATH=${{ github.workspace }}/FFmpeg
cd "${FFMPEG_MODULE_PATH}/jni"
ln -s "$FFMPEG_PATH" ffmpeg
./build_ffmpeg.sh "${FFMPEG_MODULE_PATH}" "${{steps.setup-ndk.outputs.ndk-path}}" "${HOST_PLATFORM}" "${ANDROID_ABI}" "${ENABLED_DECODERS}"
cd "${{ github.workspace }}/media"
./gradlew :lib-decode-ffmpeg:build
- name: Copy Artifacts
run: |
mkdir artifacts
cp media/libraries/decoder_ffmpeg/buildout/outputs/aar/lib-decoder-ffmpeg-release.aar artifacts/
cp media/libraries/decoder_av1/buildout/outputs/aar/lib-decoder-av1-release.aar artifacts/
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: media3-extension
path: artifacts/*.aar