Add mergify config (#445)
* Add mergify config This config includes the following rules: - Automatically merge once a PR passes all tests and is approved. - Automatically backport each PR from our main branch into our stable branch * Merge all tests into one run * Cleanup and speed up test suite * Migrate to a docker image with dav1d * Create CI profile with debug assertions enabled * Use faster params for all encoders Co-authored-by: Redzic <yusufredzic@gmail.com>
This commit is contained in:
parent
519bd0504e
commit
56461c6b17
282
.github/workflows/tests.yml
vendored
282
.github/workflows/tests.yml
vendored
|
@ -12,106 +12,214 @@ on:
|
||||||
- "*.md"
|
- "*.md"
|
||||||
|
|
||||||
env:
|
env:
|
||||||
deps: tree llvm clang mkvtoolnix
|
|
||||||
DEBIAN_FRONTEND: noninteractive
|
DEBIAN_FRONTEND: noninteractive
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
validate:
|
all-tests:
|
||||||
name: ${{ matrix.name }} ${{ matrix.enc }}
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: luigi311/encoders-docker:20210901
|
container: shssoichiro/av1an-ci:latest
|
||||||
strategy:
|
|
||||||
fail-fast: false
|
|
||||||
matrix:
|
|
||||||
enc: [aom, rav1e, svt-av1, vpx, x265, x264]
|
|
||||||
name: [baseline, baseline-select, target-quality, probe-slow]
|
|
||||||
include:
|
|
||||||
- name: baseline
|
|
||||||
flags: ""
|
|
||||||
- name: baseline-select
|
|
||||||
flags: "--chunk-method select"
|
|
||||||
- name: target-quality
|
|
||||||
flags: --target-quality 95
|
|
||||||
- name: probe-slow
|
|
||||||
flags: --target-quality 95 --probe-slow
|
|
||||||
- name: chunk_hybrid
|
|
||||||
enc: aom
|
|
||||||
flags: --chunk-method hybrid
|
|
||||||
- name: chunk_select
|
|
||||||
enc: aom
|
|
||||||
flags: --chunk-method select
|
|
||||||
- name: chunk_ffms2
|
|
||||||
enc: aom
|
|
||||||
flags: --chunk-method ffms2
|
|
||||||
- name: chunk_lsmash
|
|
||||||
enc: aom
|
|
||||||
flags: --chunk-method lsmash
|
|
||||||
- name: scenes
|
|
||||||
enc: aom
|
|
||||||
flags: -s scenes.json
|
|
||||||
- name: workers
|
|
||||||
enc: aom
|
|
||||||
flags: -w 2
|
|
||||||
- name: vmaf
|
|
||||||
enc: aom
|
|
||||||
flags: --vmaf
|
|
||||||
- name: extra_splits
|
|
||||||
enc: aom
|
|
||||||
flags: -x 10
|
|
||||||
- name: video_settings
|
|
||||||
enc: aom
|
|
||||||
flags: -v " --cpu-used=3 --end-usage=q --cq-level=30 --threads=8 "
|
|
||||||
- name: temp
|
|
||||||
enc: aom
|
|
||||||
flags: --temp temporary
|
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Validate encoders
|
- name: Validate encoders
|
||||||
run: |
|
run: |
|
||||||
aomenc --help
|
which aomenc
|
||||||
SvtAv1EncApp --help
|
which SvtAv1EncApp
|
||||||
rav1e --help
|
which rav1e
|
||||||
x265 --help || true
|
which vpxenc
|
||||||
|
which x265
|
||||||
- name: Install rust
|
which x264
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: nightly
|
|
||||||
override: true
|
|
||||||
profile: default
|
|
||||||
default: true
|
|
||||||
components: rustfmt, clippy
|
|
||||||
|
|
||||||
- name: Install requirements
|
|
||||||
run: |
|
|
||||||
apt-get update && apt-get install -y ${{ env.deps }}
|
|
||||||
|
|
||||||
- name: Run cargo check
|
|
||||||
uses: actions-rs/cargo@v1
|
|
||||||
with:
|
|
||||||
command: check
|
|
||||||
args: --no-default-features
|
|
||||||
|
|
||||||
- name: Build Av1an
|
- name: Build Av1an
|
||||||
run: |
|
run: |
|
||||||
cargo build --release --features ffmpeg_static
|
cargo build --profile ci
|
||||||
|
|
||||||
- name: Download videos
|
# 352x240 112 frames test video
|
||||||
|
- name: Download test video
|
||||||
run: |
|
run: |
|
||||||
for url in raw.githubusercontent.com/OpenVisualCloud/SVT-AV1-Resources/master randomderp.com; do
|
curl -LO https://media.xiph.org/video/derf/y4m/tt_sif.y4m
|
||||||
curl -LO https://$url/video.tar.gz && break
|
|
||||||
done
|
|
||||||
tar xf video.tar.gz
|
|
||||||
|
|
||||||
- name: Testing ${{ matrix.name }}
|
- name: Testing unit tests
|
||||||
|
working-directory: ./av1an-core
|
||||||
run: |
|
run: |
|
||||||
target/release/av1an -i bus_cif.y4m -e ${{ matrix.enc }} -l log_av1an -c mkvmerge --keep -o "bus_cif.mkv" ${{ matrix.flags }}
|
cargo test --profile ci
|
||||||
du -h bus_cif.mkv
|
|
||||||
tree -a
|
|
||||||
|
|
||||||
- name: Cat log
|
# The baseline tests should not include the faster default params, because we want to also test that
|
||||||
if: always()
|
# it works without params passed
|
||||||
run: cat log_av1an.log
|
- name: Testing baseline aom
|
||||||
|
run: |
|
||||||
|
target/ci/av1an -i tt_sif.y4m -e aom --pix-format yuv420p --sc-method fast -y -o "tt_sif.mkv"
|
||||||
|
du -h tt_sif.mkv
|
||||||
|
|
||||||
|
- name: Testing baseline rav1e
|
||||||
|
run: |
|
||||||
|
target/ci/av1an -i tt_sif.y4m -e rav1e --pix-format yuv420p --sc-method fast -y -o "tt_sif.mkv"
|
||||||
|
du -h tt_sif.mkv
|
||||||
|
|
||||||
|
- name: Testing baseline svt-av1
|
||||||
|
run: |
|
||||||
|
target/ci/av1an -i tt_sif.y4m -e svt-av1 --pix-format yuv420p --sc-method fast -y -o "tt_sif.mkv"
|
||||||
|
du -h tt_sif.mkv
|
||||||
|
|
||||||
|
- name: Testing baseline vpx
|
||||||
|
run: |
|
||||||
|
target/ci/av1an -i tt_sif.y4m -e vpx --pix-format yuv420p --sc-method fast -y -o "tt_sif.mkv"
|
||||||
|
du -h tt_sif.mkv
|
||||||
|
|
||||||
|
- name: Testing baseline x265
|
||||||
|
run: |
|
||||||
|
target/ci/av1an -i tt_sif.y4m -e x265 --pix-format yuv420p -c mkvmerge --sc-method fast -y -o "tt_sif.mkv"
|
||||||
|
du -h tt_sif.mkv
|
||||||
|
|
||||||
|
- name: Testing baseline x264
|
||||||
|
run: |
|
||||||
|
target/ci/av1an -i tt_sif.y4m -e x264 --pix-format yuv420p --sc-method fast -y -o "tt_sif.mkv"
|
||||||
|
du -h tt_sif.mkv
|
||||||
|
|
||||||
|
- name: Testing baseline-select aom
|
||||||
|
run: |
|
||||||
|
target/ci/av1an -i tt_sif.y4m -e aom --pix-format yuv420p --sc-method fast -y -o "tt_sif.mkv" -v " --cpu-used=10 --rt --threads=4" -p1 --chunk-method select
|
||||||
|
du -h tt_sif.mkv
|
||||||
|
|
||||||
|
- name: Testing baseline-select rav1e
|
||||||
|
run: |
|
||||||
|
target/ci/av1an -i tt_sif.y4m -e rav1e --pix-format yuv420p --sc-method fast -y -o "tt_sif.mkv" -v " --speed 10 --low-latency" --chunk-method select
|
||||||
|
du -h tt_sif.mkv
|
||||||
|
|
||||||
|
- name: Testing baseline-select svt-av1
|
||||||
|
run: |
|
||||||
|
target/ci/av1an -i tt_sif.y4m -e svt-av1 --pix-format yuv420p --sc-method fast -y -o "tt_sif.mkv" -v " --preset 8" --chunk-method select
|
||||||
|
du -h tt_sif.mkv
|
||||||
|
|
||||||
|
- name: Testing baseline-select vpx
|
||||||
|
run: |
|
||||||
|
target/ci/av1an -i tt_sif.y4m -e vpx --pix-format yuv420p --sc-method fast -y -o "tt_sif.mkv" -v " --cpu-used=9 --rt --threads=4" -p1 --chunk-method select
|
||||||
|
du -h tt_sif.mkv
|
||||||
|
|
||||||
|
- name: Testing baseline-select x265
|
||||||
|
run: |
|
||||||
|
target/ci/av1an -i tt_sif.y4m -e x265 --pix-format yuv420p -c mkvmerge --sc-method fast -y -o "tt_sif.mkv" -v " --preset ultrafast" --chunk-method select
|
||||||
|
du -h tt_sif.mkv
|
||||||
|
|
||||||
|
- name: Testing baseline-select x264
|
||||||
|
run: |
|
||||||
|
target/ci/av1an -i tt_sif.y4m -e x264 --pix-format yuv420p --sc-method fast -y -o "tt_sif.mkv" -v " --preset ultrafast" --chunk-method select
|
||||||
|
du -h tt_sif.mkv
|
||||||
|
|
||||||
|
# TODO: remove the --crf/--quantizer/--cq-level params once the bug of not specifying them resulting in a panic is fixed
|
||||||
|
- name: Testing target-quality aom
|
||||||
|
run: |
|
||||||
|
target/ci/av1an -i tt_sif.y4m -e aom --pix-format yuv420p --sc-method fast -y -o "tt_sif.mkv" -v " --cpu-used=10 --rt --threads=4 --cq-level=0" -p1 --target-quality 95
|
||||||
|
du -h tt_sif.mkv
|
||||||
|
|
||||||
|
- name: Testing target-quality rav1e
|
||||||
|
run: |
|
||||||
|
target/ci/av1an -i tt_sif.y4m -e rav1e --pix-format yuv420p --sc-method fast -y -o "tt_sif.mkv" -v " --speed 10 --low-latency --quantizer 0" --target-quality 95
|
||||||
|
du -h tt_sif.mkv
|
||||||
|
|
||||||
|
- name: Testing target-quality svt-av1
|
||||||
|
run: |
|
||||||
|
target/ci/av1an -i tt_sif.y4m -e svt-av1 --pix-format yuv420p --sc-method fast -y -o "tt_sif.mkv" -v " --preset 8 --crf 0" --target-quality 95
|
||||||
|
du -h tt_sif.mkv
|
||||||
|
|
||||||
|
- name: Testing target-quality vpx
|
||||||
|
run: |
|
||||||
|
target/ci/av1an -i tt_sif.y4m -e vpx --pix-format yuv420p --sc-method fast -y -o "tt_sif.mkv" -v " --cpu-used=9 --rt --threads=4 --cq-level=0" -p1 --target-quality 95
|
||||||
|
du -h tt_sif.mkv
|
||||||
|
|
||||||
|
- name: Testing target-quality x265
|
||||||
|
run: |
|
||||||
|
target/ci/av1an -i tt_sif.y4m -e x265 --pix-format yuv420p -c mkvmerge --sc-method fast -y -o "tt_sif.mkv" -v " --preset ultrafast --crf 0" --target-quality 95
|
||||||
|
du -h tt_sif.mkv
|
||||||
|
|
||||||
|
- name: Testing target-quality x264
|
||||||
|
run: |
|
||||||
|
target/ci/av1an -i tt_sif.y4m -e x264 --pix-format yuv420p --sc-method fast -y -o "tt_sif.mkv" -v " --preset ultrafast --crf 0" --target-quality 95
|
||||||
|
du -h tt_sif.mkv
|
||||||
|
|
||||||
|
- name: Testing probe-slow aom
|
||||||
|
run: |
|
||||||
|
target/ci/av1an -i tt_sif.y4m -e aom --pix-format yuv420p --sc-method fast -y -o "tt_sif.mkv" -v " --cpu-used=10 --rt --threads=4 --cq-level=0" -p1 --target-quality 95 --probe-slow
|
||||||
|
du -h tt_sif.mkv
|
||||||
|
|
||||||
|
- name: Testing probe-slow rav1e
|
||||||
|
run: |
|
||||||
|
target/ci/av1an -i tt_sif.y4m -e rav1e --pix-format yuv420p --sc-method fast -y -o "tt_sif.mkv" -v " --speed 10 --low-latency --quantizer 0" --target-quality 95 --probe-slow
|
||||||
|
du -h tt_sif.mkv
|
||||||
|
|
||||||
|
- name: Testing probe-slow svt-av1
|
||||||
|
run: |
|
||||||
|
target/ci/av1an -i tt_sif.y4m -e svt-av1 --pix-format yuv420p --sc-method fast -y -o "tt_sif.mkv" -v " --preset 8 --crf 0" --target-quality 95 --probe-slow
|
||||||
|
du -h tt_sif.mkv
|
||||||
|
|
||||||
|
- name: Testing probe-slow vpx
|
||||||
|
run: |
|
||||||
|
target/ci/av1an -i tt_sif.y4m -e vpx --pix-format yuv420p --sc-method fast -y -o "tt_sif.mkv" -v " --cpu-used=9 --rt --threads=4 --cq-level=0" -p1 --target-quality 95 --probe-slow
|
||||||
|
du -h tt_sif.mkv
|
||||||
|
|
||||||
|
- name: Testing probe-slow x265
|
||||||
|
run: |
|
||||||
|
target/ci/av1an -i tt_sif.y4m -e x265 --pix-format yuv420p -c mkvmerge --sc-method fast -y -o "tt_sif.mkv" -v " --preset ultrafast --crf 0" --target-quality 95 --probe-slow
|
||||||
|
du -h tt_sif.mkv
|
||||||
|
|
||||||
|
- name: Testing probe-slow x264
|
||||||
|
run: |
|
||||||
|
target/ci/av1an -i tt_sif.y4m -e x264 --pix-format yuv420p --sc-method fast -y -o "tt_sif.mkv" -v " --preset ultrafast --crf 0" --target-quality 95 --probe-slow
|
||||||
|
du -h tt_sif.mkv
|
||||||
|
|
||||||
|
- name: Testing chunk_hybrid aom
|
||||||
|
run: |
|
||||||
|
target/ci/av1an -i tt_sif.y4m -e aom --pix-format yuv420p --sc-method fast -y -o "tt_sif.mkv" -v " --cpu-used=10 --rt --threads=4" -p1 --chunk-method hybrid
|
||||||
|
du -h tt_sif.mkv
|
||||||
|
|
||||||
|
- name: Testing chunk_select aom
|
||||||
|
run: |
|
||||||
|
target/ci/av1an -i tt_sif.y4m -e aom --pix-format yuv420p --sc-method fast -y -o "tt_sif.mkv" -v " --cpu-used=10 --rt --threads=4" -p1 --chunk-method select
|
||||||
|
du -h tt_sif.mkv
|
||||||
|
|
||||||
|
- name: Testing chunk_ffms2 aom
|
||||||
|
run: |
|
||||||
|
target/ci/av1an -i tt_sif.y4m -e aom --pix-format yuv420p --sc-method fast -y -o "tt_sif.mkv" -v " --cpu-used=10 --rt --threads=4" -p1 --chunk-method ffms2
|
||||||
|
du -h tt_sif.mkv
|
||||||
|
|
||||||
|
- name: Testing chunk_lsmash aom
|
||||||
|
run: |
|
||||||
|
target/ci/av1an -i tt_sif.y4m -e aom --pix-format yuv420p --sc-method fast -y -o "tt_sif.mkv" -v " --cpu-used=10 --rt --threads=4" -p1 --chunk-method lsmash
|
||||||
|
du -h tt_sif.mkv
|
||||||
|
|
||||||
|
- name: Testing scenes aom
|
||||||
|
run: |
|
||||||
|
target/ci/av1an -i tt_sif.y4m -e aom --pix-format yuv420p --sc-method fast -y -o "tt_sif.mkv" -v " --cpu-used=10 --rt --threads=4" -p1 -s scenes.json
|
||||||
|
du -h tt_sif.mkv
|
||||||
|
|
||||||
|
- name: Testing workers aom
|
||||||
|
run: |
|
||||||
|
target/ci/av1an -i tt_sif.y4m -e aom --pix-format yuv420p --sc-method fast -y -o "tt_sif.mkv" -v " --cpu-used=10 --rt --threads=4" -p1 -w 2
|
||||||
|
du -h tt_sif.mkv
|
||||||
|
|
||||||
|
- name: Testing vmaf aom
|
||||||
|
run: |
|
||||||
|
target/ci/av1an -i tt_sif.y4m -e aom --pix-format yuv420p --sc-method fast -y -o "tt_sif.mkv" -v " --cpu-used=10 --rt --threads=4" -p1 --vmaf
|
||||||
|
du -h tt_sif.mkv
|
||||||
|
|
||||||
|
- name: Testing extra_splits aom
|
||||||
|
run: |
|
||||||
|
target/ci/av1an -i tt_sif.y4m -e aom --pix-format yuv420p --sc-method fast -y -o "tt_sif.mkv" -v " --cpu-used=10 --rt --threads=4" -p1 -x 10
|
||||||
|
du -h tt_sif.mkv
|
||||||
|
|
||||||
|
- name: Testing temp aom
|
||||||
|
run: |
|
||||||
|
target/ci/av1an -i tt_sif.y4m -e aom --pix-format yuv420p --sc-method fast -y -o "tt_sif.mkv" -v " --cpu-used=10 --rt --threads=4" -p1 --temp temporary
|
||||||
|
du -h tt_sif.mkv
|
||||||
|
|
||||||
|
- name: Testing concat mkvmerge aom
|
||||||
|
run: |
|
||||||
|
target/ci/av1an -i tt_sif.y4m -e aom --pix-format yuv420p --sc-method fast -y -o "tt_sif.mkv" -v " --cpu-used=10 --rt --threads=4" -p1 -c mkvmerge
|
||||||
|
du -h tt_sif.mkv
|
||||||
|
|
||||||
|
- name: Testing slow scenechange aom
|
||||||
|
run: |
|
||||||
|
target/ci/av1an -i tt_sif.y4m -e aom --pix-format yuv420p -y -o "tt_sif.mkv" -v " --cpu-used=10 --rt --threads=4" -p1 -c mkvmerge
|
||||||
|
du -h tt_sif.mkv
|
||||||
|
|
||||||
docker:
|
docker:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
@ -148,7 +256,7 @@ jobs:
|
||||||
path: /tmp/docker-cache.tar
|
path: /tmp/docker-cache.tar
|
||||||
|
|
||||||
docker-publish:
|
docker-publish:
|
||||||
needs: [validate, docker]
|
needs: [all-tests, docker]
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
|
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
|
||||||
steps:
|
steps:
|
||||||
|
@ -157,8 +265,8 @@ jobs:
|
||||||
|
|
||||||
- uses: actions/download-artifact@v2
|
- uses: actions/download-artifact@v2
|
||||||
with:
|
with:
|
||||||
name: docker-cache
|
name: docker-cache
|
||||||
path: /tmp/
|
path: /tmp/
|
||||||
|
|
||||||
- name: Extract docker cache
|
- name: Extract docker cache
|
||||||
run: tar -xf /tmp/docker-cache.tar -C /
|
run: tar -xf /tmp/docker-cache.tar -C /
|
||||||
|
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -17,6 +17,7 @@ __pycache__/
|
||||||
# Hidden folders
|
# Hidden folders
|
||||||
! .github
|
! .github
|
||||||
.*
|
.*
|
||||||
|
!.mergify.yml
|
||||||
|
|
||||||
# Distribution / packaging
|
# Distribution / packaging
|
||||||
.Python
|
.Python
|
||||||
|
|
28
.mergify.yml
Normal file
28
.mergify.yml
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
pull_request_rules:
|
||||||
|
- name: automatic merge for main when CI passes and approved
|
||||||
|
conditions:
|
||||||
|
- "#approved-reviews-by>=1"
|
||||||
|
# Unfortunately, we cannot just say "all CI must pass".
|
||||||
|
# This is not a bot limitation, but a limitation in Github itself.
|
||||||
|
- check-success=tests / all-tests
|
||||||
|
- check-success=tests / docker
|
||||||
|
- check-success=SonarCloud Code Analysis
|
||||||
|
- base=master
|
||||||
|
actions:
|
||||||
|
merge:
|
||||||
|
method: squash
|
||||||
|
rebase_fallback: none
|
||||||
|
strict: smart+fasttrack
|
||||||
|
strict_method: rebase
|
||||||
|
- name: copy patches to stable branch
|
||||||
|
conditions:
|
||||||
|
- base=master
|
||||||
|
- label!=unstable
|
||||||
|
actions:
|
||||||
|
backport:
|
||||||
|
branches:
|
||||||
|
- stable
|
||||||
|
assignees:
|
||||||
|
- "@master-of-zen"
|
||||||
|
- "@redzic"
|
||||||
|
- "@shssoichiro"
|
|
@ -40,3 +40,10 @@ opt-level = 3
|
||||||
[profile.release]
|
[profile.release]
|
||||||
lto = "thin"
|
lto = "thin"
|
||||||
codegen-units = 1
|
codegen-units = 1
|
||||||
|
|
||||||
|
[profile.ci]
|
||||||
|
inherits = "release"
|
||||||
|
lto = "off"
|
||||||
|
codegen-units = 1024
|
||||||
|
debug-assertions = true
|
||||||
|
overflow-checks = true
|
||||||
|
|
Loading…
Reference in a new issue