From 0245f38f95d5638b619d5735e23c32b6dc53b76d Mon Sep 17 00:00:00 2001 From: henryruhs Date: Sat, 3 Jun 2023 10:53:51 +0200 Subject: [PATCH] Introduce CI matrix --- .github/workflows/ci.yml | 8 +++++++- roop/utils.py | 4 +--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c543e10..5b0b00d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,6 +16,12 @@ jobs: - run: flake8 run.py core test: runs-on: ubuntu-latest + matrix: + include: + - name: CPU + args: -f=.github/examples/face.jpg -t=.github/examples/target.mp4 -o=.github/examples/output.mp4 --gpu-vendor=nvidia + - name: GPU + args: -f=.github/examples/face.jpg -t=.github/examples/target.mp4 -o=.github/examples/output.mp4 steps: - name: Checkout uses: actions/checkout@v2 @@ -28,6 +34,6 @@ jobs: - run: pip install -r requirements.txt - run: pip install gdown - run: gdown 13QpWFWJ37EB-nHrEOY64CEtQWY-tz7DZ - - run: ./run.py -f=.github/examples/face.jpg -t=.github/examples/target.mp4 -o=.github/examples/output.mp4 + - run: ./run.py {{ matrix.args }} - run: ffmpeg -i .github/examples/snapshot.mp4 -i .github/examples/output.mp4 -filter_complex "psnr" -f null - diff --git a/roop/utils.py b/roop/utils.py index d63807c..3ec6872 100644 --- a/roop/utils.py +++ b/roop/utils.py @@ -31,10 +31,8 @@ def detect_fps(input_path): def run_ffmpeg(args): - log_level = f'-loglevel {roop.globals.log_level}' - - os.system(f'ffmpeg {log_level} {args}') + run_command(f'ffmpeg {log_level} {args}') def set_fps(input_path, output_path, fps):