Repository navigation
67 lines (59 loc) · 2.17 KB
/
Copy pathcomparison.yml
File metadata and controls
67 lines (59 loc) · 2.17 KB
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
name: Codec comparison (demo report)
# Runs the comparison tool end to end on the demo images inside the built image,
# and publishes the result as a report: the table goes to the run's job summary,
# and the HTML report + CSV are uploaded as artifacts. It only reports; it does
# not gate. Size at equal quality is deterministic (codec versions are pinned in
# the image); the timing columns are informational and are not asserted on.
on:
workflow_dispatch:
inputs:
target:
description: "Target ssimulacra2 score"
default: "90"
effort:
description: "Matched encoder effort 0..10 (blank = each codec's default)"
default: ""
schedule:
- cron: "0 6 * * 1" # Mondays 06:00 UTC
permissions:
contents: read
jobs:
compare:
name: Compare codecs on the demo images
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- uses: docker/setup-buildx-action@v4
- name: Build image
uses: docker/build-push-action@v7
with:
context: .
load: true
tags: image-tools:ci
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Fetch demo images
run: bash compare/demos/fetch.sh
- name: Run codec comparison
run: |
TARGET="${{ github.event.inputs.target || '90' }}"
EFFORT="${{ github.event.inputs.effort || '' }}"
BASE="compare-codecs compare/demos/images --target $TARGET"
[ -n "$EFFORT" ] && BASE="$BASE --effort $EFFORT"
# One run prints the table and writes the CSV and the HTML report.
docker run --rm -v "$PWD:/work" -w /work --entrypoint bash image-tools:ci -c \
"$BASE --csv results.csv --html report.html" | tee comparison.txt
{
echo "## Codec comparison — demo images (target ss2 $TARGET${EFFORT:+, effort $EFFORT})"
echo ""
echo '```'
cat comparison.txt
echo '```'
} >> "$GITHUB_STEP_SUMMARY"
- name: Upload report and CSV
uses: actions/upload-artifact@v7
with:
name: codec-comparison
path: |
report.html
results.csv