Commit 8e4e7678 authored by Jerome Wu's avatar Jerome Wu

Use matrix to split jobs

parent 164ca130
name: Build FFmpeg.wasm (Single Thread)
on:
push:
branches: [ n4.3.1-wasm ]
pull_request:
branches: [ n4.3.1-wasm ]
env:
EM_VERSION: 2.0.8
EM_CACHE_FOLDER: 'emsdk-cache'
jobs:
linux-build_with_docker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- name: Build FFMpeg
shell: bash
run: |
FFMPEG_ST=yes bash build-with-docker.sh
- uses: actions/upload-artifact@master
with:
name: ffmpeg-core
path: wasm/packages/core-st/dist
name: Build FFmpeg.wasm
on:
push:
branches: [ n4.3.1-wasm ]
branches:
- n4.3.1-wasm
pull_request:
branches: [ n4.3.1-wasm ]
branches:
- n4.3.1-wasm
env:
EM_VERSION: 2.0.8
EM_CACHE_FOLDER: 'emsdk-cache'
# env:
# EM_VERSION: 2.0.8
# EM_CACHE_FOLDER: 'emsdk-cache'
jobs:
linux-build_with_docker:
build-libs:
strategy:
max-parallel: 1
matrix:
script:
- build-zlib
- build-x264
- build-x265
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
......@@ -18,12 +27,12 @@ jobs:
submodules: recursive
- name: Build FFMpeg
shell: bash
run: |
bash build-with-docker.sh
- uses: actions/upload-artifact@master
with:
name: ffmpeg-core
path: wasm/packages/core/dist
run: bash build-with-docker.sh install-deps ${{ matrix.script }}
# - uses: actions/upload-artifact@master
# with:
# name: ffmpeg-core
# path: wasm/packages/core/dist
# Disable macos build due to there is no ldconfig command
# during freetype2 build.
# macos-build:
......
......@@ -11,4 +11,4 @@ docker run \
-v $PWD/wasm/cache:/emsdk_portable/.data/cache/wasm \
-e FFMPEG_ST=${FFMPEG_ST:-no} \
emscripten/emsdk:$EM_VERSION \
sh -c 'bash ./build.sh'
bash ./build.sh "$@"
......@@ -4,45 +4,47 @@ set -eo pipefail
SCRIPT_ROOT=$(dirname $0)/wasm/build-scripts
# verify Emscripten version
emcc -v
# install dependencies
$SCRIPT_ROOT/install-deps.sh
# build zlib
$SCRIPT_ROOT/build-zlib.sh
# build x264
$SCRIPT_ROOT/build-x264.sh
# build x265
$SCRIPT_ROOT/build-x265.sh
# build libvpx
$SCRIPT_ROOT/build-libvpx.sh
# build WavPack
$SCRIPT_ROOT/build-wavpack.sh
# build lame
$SCRIPT_ROOT/build-lame.sh
# build fdk-aac
$SCRIPT_ROOT/build-fdk-aac.sh
# build ogg
$SCRIPT_ROOT/build-ogg.sh
# build vorbis
$SCRIPT_ROOT/build-vorbis.sh
# build theora
$SCRIPT_ROOT/build-theora.sh
# build opus
$SCRIPT_ROOT/build-opus.sh
# build libwebp
$SCRIPT_ROOT/build-libwebp.sh
# build freetype2
$SCRIPT_ROOT/build-freetype2.sh
# build fribidi
$SCRIPT_ROOT/build-fribidi.sh
# build harfbuzz
$SCRIPT_ROOT/build-harfbuzz.sh
# build libass
$SCRIPT_ROOT/build-libass.sh
# build aom (disabled as it is extremely slow)
# $SCRIPT_ROOT/build-aom.sh
# configure FFmpeg with Emscripten
$SCRIPT_ROOT/configure-ffmpeg.sh
# build ffmpeg.wasm core
$SCRIPT_ROOT/build-ffmpeg.sh
run() {
for name in $@; do
$SCRIPT_ROOT/$name.sh
done
}
run-all() {
SCRIPTS=(
# install dependencies
install-deps
build-zlib
build-x264
build-x265
build-libvpx
build-wavpack
build-lame
build-fdk-acc
build-ogg
build-vorbis
build-theora
build-opus
build-libwebp
build-freetype2
build-fribidi
build-harfbuzz
build-libass
#build-aom # disabled as it is extremely slow
configure-ffmpeg
build-ffmpeg
)
run ${SCRIPTS[@]}
}
main() {
# verify Emscripten version
emcc -v
if [[ "$@" == "" ]]; then
run-all
else
run "$@"
fi
}
main "$@"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment