forked from ffmpegwasm/ffmpeg.wasm-core
-
Notifications
You must be signed in to change notification settings - Fork 0
133 lines (130 loc) · 3.82 KB
/
core-st.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
name: Build FFmpeg.wasm (Single Thread)
on:
push:
branches:
- n4.3.1-wasm
pull_request:
branches:
- n4.3.1-wasm
env:
FFMPEG_ST: yes
DIST_PATH: wasm/packages/core-st/dist
CACHE_KEY_PREFIX: ffmpeg.wasm-core-st
# EM_VERSION: 3.1.30
# EM_CACHE_FOLDER: 'emsdk-cache'
jobs:
build-libs:
strategy:
max-parallel: 1
matrix:
script:
- build-zlib
- build-x264
- build-x265
- build-libvpx
- build-wavpack
- build-lame
- build-fdk-aac
- build-ogg
- build-vorbis
- build-theora
- build-opus
- build-libwebp
- build-freetype2
- build-fribidi
- build-harfbuzz
- build-libass
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Get commit hash
id: get-commit-hash
run: |
echo "::set-output name=hash::$(git rev-parse --short HEAD)"
- name: Cache libs
uses: actions/cache@v2
with:
path: |
build
wasm/cache
key: ${{ env.CACHE_KEY_PREFIX }}-${{ steps.get-commit-hash.outputs.hash }}-${{ matrix.script }}
restore-keys: |
${{ env.CACHE_KEY_PREFIX }}-${{ steps.get-commit-hash.outputs.hash }}-
- name: List cached libs
run: ls -R build || true
- name: Build FFMpeg Libs
run: bash build-with-docker.sh install-deps ${{ matrix.script }}
build-ffmpeg:
runs-on: ubuntu-latest
needs: build-libs
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Get commit hash
id: get-commit-hash
run: |
echo "::set-output name=hash::$(git rev-parse --short HEAD)"
- name: Cache multiple paths
uses: actions/cache@v2
env:
GIT_HASH: $(git rev-parse --short HEAD)
with:
path: |
build
wasm/cache
key: ${{ env.CACHE_KEY_PREFIX }}-${{ steps.get-commit-hash.outputs.hash }}-ffmpeg
restore-keys: |
${{ env.CACHE_KEY_PREFIX }}-${{ steps.get-commit-hash.outputs.hash }}-
- name: List cached libs
run: ls -R build || true
- name: Build FFMpeg
run: |
bash build-with-docker.sh \
install-deps \
configure-ffmpeg \
build-ffmpeg
- uses: actions/upload-artifact@master
with:
name: ffmpeg-core
path: ${{ env.DIST_PATH }}
# Disable macos build due to there is no ldconfig command
# during freetype2 build.
# macos-build:
# runs-on: macos-latest
# steps:
# - uses: actions/checkout@v2
# with:
# fetch-depth: 0
# submodules: recursive
# - name: Setup cache
# id: cache-system-libraries
# uses: actions/cache@v2
# with:
# path: ${{env.EM_CACHE_FOLDER}}
# key: ${{env.EM_VERSION}}-${{ runner.os }}
# - uses: mymindstorm/setup-emsdk@v6
# with:
# version: ${{env.EM_VERSION}}
# actions-cache-folder: ${{env.EM_CACHE_FOLDER}}
# - name: Build FFMpeg
# shell: bash
# run: |
# export PATH=$PATH:$PWD/emsdk-cache/emsdk-master/upstream/bin
# bash build.sh
# - uses: actions/upload-artifact@master
# with:
# name: ffmpeg-core-macos
# path: wasm/dist
# Not working with error messsage:
# C:\ProgramData\Chocolatey\lib\mingw\tools\install\mingw64\x86_64-w64-mingw32\bin\ar.exe: libavfilter/vsink_null: No such file or directory
# windows-build:
# runs-on: windows-latest
# steps:
# - uses: actions/checkout@v2
# - name: Build FFMpeg
# shell: bash
# run: |
# bash build.sh