-
Notifications
You must be signed in to change notification settings - Fork 627
178 lines (176 loc) · 6.14 KB
/
android-build-scripts.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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
name: android build scripts
on:
push:
branches:
- development
- main
paths:
- '.github/workflows/android-build-scripts.yml'
- 'android/**'
- '!android/README.md'
- 'scripts/**'
- 'tools/**'
- 'android.sh'
pull_request:
branches:
- development
- main
paths:
- '.github/workflows/android-build-scripts.yml'
- 'android/**'
- '!android/README.md'
- 'scripts/**'
- 'tools/**'
- 'android.sh'
jobs:
build-main-on-linux:
name: android main on linux
runs-on: ubuntu-22.04
strategy:
matrix:
ndk-version: [ 'r22b-linux-x86_64', 'r23b-linux', 'r24-linux', 'r25b-linux' ]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: set up adopt jdk 17
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '17'
- name: prerequisites
run: ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --uninstall "cmake;3.10.2.4988404" "cmake;3.18.1"
- name: set up android ndk
run: |
curl -s "https://dl.google.com/android/repository/android-ndk-${{ matrix.ndk-version }}.zip" -o ndk.zip
unzip -q -o ndk.zip -d .ndk
echo "ANDROID_NDK_ROOT=$PWD/.ndk/$(ls .ndk)" >> $GITHUB_ENV
- name: run the build script
run: ./android.sh -d --enable-android-media-codec --enable-android-zlib --disable-arm-v7a
- name: print build logs
if: ${{ always() }}
run: cat build.log
- name: print ffbuild logs
if: ${{ failure() }}
run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log'
build-lts-on-linux:
name: android lts on linux
runs-on: ubuntu-22.04
strategy:
matrix:
ndk-version: [ 'r22b-linux-x86_64', 'r23b-linux' ]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: set up adopt jdk 17
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '17'
- name: prerequisites
run: ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --uninstall "cmake;3.10.2.4988404" "cmake;3.18.1"
- name: set up android ndk
run: |
curl -s "https://dl.google.com/android/repository/android-ndk-${{ matrix.ndk-version }}.zip" -o ndk.zip
unzip -q -o ndk.zip -d .ndk
echo "ANDROID_NDK_ROOT=$PWD/.ndk/$(ls .ndk)" >> $GITHUB_ENV
- name: run the build script
run: ./android.sh -d --lts --enable-android-media-codec --enable-android-zlib
- name: print build logs
if: ${{ always() }}
run: cat build.log
- name: print ffbuild logs
if: ${{ failure() }}
run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log'
build-main-on-macos:
name: android main on macos
runs-on: macos-12
strategy:
matrix:
ndk-version: [ 'r22b-darwin-x86_64', 'r23b-darwin', 'r24-darwin', 'r25b-darwin' ]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: set up adopt jdk 17
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '17'
- name: set up android ndk
run: |
curl -s "https://dl.google.com/android/repository/android-ndk-${{ matrix.ndk-version }}.zip" -o ndk.zip
unzip -q -o ndk.zip -d .ndk
echo "ANDROID_NDK_ROOT=$PWD/.ndk/$(ls .ndk)" >> $GITHUB_ENV
- name: run the build script
run: ./android.sh -d --enable-android-media-codec --enable-android-zlib --disable-arm-v7a
- name: print build logs
if: ${{ always() }}
run: cat build.log
- name: print ffbuild logs
if: ${{ failure() }}
run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log'
build-lts-on-macos:
name: android lts on macos
runs-on: macos-12
strategy:
matrix:
ndk-version: [ 'r22b-darwin-x86_64', 'r23b-darwin' ]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: set up adopt jdk 17
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '17'
- name: set up android ndk
run: |
curl -s "https://dl.google.com/android/repository/android-ndk-${{ matrix.ndk-version }}.zip" -o ndk.zip
unzip -q -o ndk.zip -d .ndk
echo "ANDROID_NDK_ROOT=$PWD/.ndk/$(ls .ndk)" >> $GITHUB_ENV
- name: run the build script
run: ./android.sh -d --lts --enable-android-media-codec --enable-android-zlib
- name: print build logs
if: ${{ always() }}
run: cat build.log
- name: print ffbuild logs
if: ${{ failure() }}
run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log'
build-main-without-ffmpeg-kit-protocols-on-linux:
name: build without ffmpeg-kit protocols
runs-on: ubuntu-22.04
strategy:
matrix:
ndk-version: [ 'r22b-linux-x86_64' ]
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4
- name: set up adopt jdk 17
uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: '17'
- name: prerequisites
run: ${ANDROID_HOME}/cmdline-tools/latest/bin/sdkmanager --uninstall "cmake;3.10.2.4988404" "cmake;3.18.1"
- name: set up android ndk
run: |
curl -s "https://dl.google.com/android/repository/android-ndk-${{ matrix.ndk-version }}.zip" -o ndk.zip
unzip -q -o ndk.zip -d .ndk
echo "ANDROID_NDK_ROOT=$PWD/.ndk/$(ls .ndk)" >> $GITHUB_ENV
- name: run the build script
run: ./android.sh --no-ffmpeg-kit-protocols --disable-x86 --disable-x86-64 --disable-arm-v7a --disable-arm-v7a-neon
- name: print build logs
if: ${{ always() }}
run: cat build.log
- name: print ffbuild logs
if: ${{ failure() }}
run: '[[ -f ./src/ffmpeg/ffbuild/config.log ]] && tail -50 ./src/ffmpeg/ffbuild/config.log'