Skip to content

Commit 756eccd

Browse files
authored
Merge pull request #7 from Khang-NT/setup_CI
Build FULL and LITE binary with CI
2 parents ab5a883 + 939fbd3 commit 756eccd

File tree

11 files changed

+302
-84
lines changed

11 files changed

+302
-84
lines changed

.circleci/config.yml

Lines changed: 119 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,119 @@
1+
version: 2
2+
3+
defaults: &defaults
4+
working_directory: ~/source
5+
docker:
6+
- image: vnkhangnt/buildpack-deps:trusty
7+
environment:
8+
FFMPEG_VERSION: 3.3.2
9+
steps:
10+
- checkout
11+
- run:
12+
name: Compile FFmpeg
13+
command: |
14+
mkdir -p build_logs;
15+
export FINAL_DIR=$(pwd)/artifacts/$TARGET;
16+
export BUILD_DIR=$(pwd)/build_scripts/build_dir && mkdir -p $BUILD_DIR;
17+
./build_scripts/build_ffmpeg.sh $TARGET $BUILD_DIR $FINAL_DIR;
18+
- run:
19+
name: Copy error report
20+
command: |
21+
mkdir -p build_logs/ffmpeg;
22+
cp build_scripts/ffmpeg-$FFMPEG_VERSION/config.log build_logs/ffmpeg/ || true;
23+
when: on_fail
24+
- store_artifacts:
25+
path: build_logs
26+
- persist_to_workspace:
27+
root: artifacts
28+
paths:
29+
- "*/*/ffmpeg"
30+
31+
jobs:
32+
build_arm:
33+
environment:
34+
TARGET: arm
35+
<< : *defaults
36+
37+
build_arm_v7a:
38+
environment:
39+
TARGET: armv7-a
40+
<< : *defaults
41+
42+
build_arm_v7a_neon:
43+
environment:
44+
TARGET: arm-v7n
45+
<< : *defaults
46+
47+
build_arm_v8a:
48+
environment:
49+
TARGET: arm64-v8a
50+
<< : *defaults
51+
52+
build_arm_x86:
53+
environment:
54+
TARGET: i686
55+
<< : *defaults
56+
57+
build_arm_x86_64:
58+
environment:
59+
TARGET: x86_64
60+
<< : *defaults
61+
62+
build_native_linux:
63+
environment:
64+
TARGET: native
65+
<< : *defaults
66+
67+
create_release:
68+
docker:
69+
- image: vnkhangnt/buildpack-deps:trusty
70+
working_directory: ~/source
71+
steps:
72+
- attach_workspace:
73+
at: artifacts
74+
- run:
75+
name: Create Github Release
76+
command: |
77+
export UPLOAD_FOLDER="uploads" && mkdir -p $UPLOAD_FOLDER;
78+
cd artifacts;
79+
for f in ./*; do
80+
tar -cjf $UPLOAD_FOLDER/$f-full.tar.bz2 -C $f/full .;
81+
tar -cjf $UPLOAD_FOLDER/$f-lite.tar.bz2 -C $f/lite .;
82+
done;
83+
curl -L -O 'https://github.com/tcnksm/ghr/releases/download/v0.5.4/ghr_v0.5.4_linux_amd64.zip';
84+
unzip ghr_v0.5.4_linux_amd64.zip -d .;
85+
sudo chmod +x ghr;
86+
TAG=`date +%Y-%m-%d`;
87+
./ghr \
88+
-t "$GITHUB_TOKEN" \
89+
-u 'Khang-NT' \
90+
-r 'ffmpeg-binary-android' \
91+
-c "$CIRCLE_SHA1" \
92+
-delete \
93+
"$TAG" $UPLOAD_FOLDER
94+
95+
workflows:
96+
version: 2
97+
build-and-create-release:
98+
jobs:
99+
- build_arm
100+
- build_arm_v7a
101+
- build_arm_v7a_neon
102+
- build_arm_v8a
103+
- build_arm_x86
104+
- build_arm_x86_64
105+
- build_native_linux
106+
- create_release:
107+
requires:
108+
- build_arm
109+
- build_arm_v7a
110+
- build_arm_v7a_neon
111+
- build_arm_v8a
112+
- build_arm_x86
113+
- build_arm_x86_64
114+
- build_native_linux
115+
filters:
116+
branches:
117+
only: master
118+
119+

arm64-v8a/bin/ffmpeg

-6.9 MB
Binary file not shown.

armeabi-v7-neon/bin/ffmpeg

-6.39 MB
Binary file not shown.

armeabi-v7a/bin/ffmpeg

-6.29 MB
Binary file not shown.

armeabi/bin/ffmpeg

-6.83 MB
Binary file not shown.

0 commit comments

Comments
 (0)