direct_play_nice 0.1.0-beta.3

CLI program that converts video files to direct-play-compatible formats.
Documentation
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
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
name: CI (Full)

on:
  workflow_dispatch:

env:
  CARGO_TERM_COLOR: always

concurrency:
  group: ci-full-${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  test:
    name: Test (Linux) (${{ matrix.toolchain }})
    runs-on: ubuntu-latest
    env:
      VCPKG_ROOT: ${{ github.workspace }}/target/vcpkg
    permissions:
      contents: read
      actions: write
    strategy:
      max-parallel: 1
      matrix:
        toolchain:
          - stable
          - beta
          - nightly
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - name: Install Rust
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: ${{ matrix.toolchain }}
          components: rustfmt

      - name: Set up sccache
        id: sccache-setup
        uses: mozilla-actions/sccache-action@v0.0.5

      - name: Install dependencies
        run: |
          sudo apt-get update -y
          sudo apt-get --assume-yes install nasm autoconf autoconf-archive automake libtool

      - name: Set job-level RUSTC_WRAPPER
        if: steps.sccache-setup.outcome == 'success'
        run: echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
      - if: steps.sccache-setup.outcome == 'failure'
        run: echo "RUSTC_WRAPPER=" >> $GITHUB_ENV

      - name: Cache cargo-vcpkg binary
        id: cargo-vcpkg-cache
        uses: actions/cache@v4
        with:
          path: ~/.cargo/bin/cargo-vcpkg
          key: cargo-vcpkg-linux-v1

      - name: Install cargo-vcpkg
        if: steps.cargo-vcpkg-cache.outputs.cache-hit != 'true'
        env:
          RUSTC_WRAPPER: ${{ env.RUSTC_WRAPPER }}
        run: cargo install cargo-vcpkg --locked

      - name: Cache cargo build artifacts
        uses: Swatinem/rust-cache@v2
        with:
          prefix-key: linux-vcpkg-v3-ffmpeg8

      - name: Cache OCR models
        uses: actions/cache@v4
        with:
          path: target/ocr-models
          key: ocr-models-linux-v1

      - name: Cache vcpkg workspace (cross-branch)
        id: vcpkg-root-cache
        uses: actions/cache@v4
        with:
          path: |
            target/vcpkg/.vcpkg-root
            target/vcpkg/.git
            target/vcpkg/downloads
            target/vcpkg/installed
            target/vcpkg/packages
            target/vcpkg/ports
            target/vcpkg/scripts
            target/vcpkg/triplets
            target/vcpkg/vcpkg
          key: vcpkg-root-linux-v2-${{ hashFiles('Cargo.toml') }}
          restore-keys: |
            vcpkg-root-linux-v2-

      - name: Validate vcpkg cache origin
        run: |
          cache_invalid=0
          expected_rev="$(grep -E '^rev = "' Cargo.toml | head -n1 | awk -F'"' '{print $2}')"
          if [ -e "target/vcpkg" ] && [ ! -e "target/vcpkg/.git" ]; then
            echo "vcpkg root missing .git; clearing cache entry"
            rm -rf target/vcpkg
            cache_invalid=1
          fi
          for dir in target/vcpkg target/vcpkg/.vcpkg-root target/vcpkg/vcpkg; do
            if [ -e "$dir/.git" ]; then
              origin=$(git -C "$dir" remote get-url origin 2>/dev/null || true)
              if [ -z "$origin" ]; then
                echo "Failed to read vcpkg origin in $dir; clearing cache entry"
                rm -rf "$dir"
                cache_invalid=1
                continue
              fi
              if [ "$origin" != "https://github.com/microsoft/vcpkg.git" ] && [ "$origin" != "https://github.com/microsoft/vcpkg" ]; then
                echo "Unexpected vcpkg origin in : $origin"
                rm -rf "$dir"
                cache_invalid=1
                continue
              fi
              if [ -n "$expected_rev" ]; then
                if ! git -C "$dir" cat-file -e "${expected_rev}^{tree}" 2>/dev/null; then
                  echo "Missing vcpkg rev $expected_rev in $dir; clearing cache entry"
                  rm -rf "$dir"
                  cache_invalid=1
                fi
              fi
            fi
          done
          if [ "$cache_invalid" -eq 1 ]; then
            echo "VCPKG_CACHE_INVALID=1" >> "$GITHUB_ENV"
          fi

      - name: Use cached vcpkg workspace
        if: steps.vcpkg-root-cache.outputs.cache-hit == 'true' && env.VCPKG_CACHE_INVALID != '1'
        run: echo "vcpkg workspace cache hit; skipping dependency rebuild."

      - name: Build vcpkg dependencies
        if: steps.vcpkg-root-cache.outputs.cache-hit != 'true' || env.VCPKG_CACHE_INVALID == '1'
        env:
          VCPKG_BUILD_TYPE: release
          VCPKG_FEATURE_FLAGS: manifests,binarycaching
          VCPKG_BINARY_SOURCES: clear;x-gha,readwrite
          VCPKG_CMAKE_CONFIGURE_OPTIONS: -Wno-dev -DCMAKE_POLICY_DEFAULT_CMP0174=NEW
          VCPKG_MAX_CONCURRENCY: 2
          CMAKE_BUILD_PARALLEL_LEVEL: 2
          RUSTC_WRAPPER: ${{ env.RUSTC_WRAPPER }}
        run: cargo vcpkg --verbose build

      - name: Force regenerate rusty_ffmpeg bindings
        run: cargo clean -p rusty_ffmpeg

      - name: Upload vcpkg logs on failure
        if: ${{ failure() }}
        uses: actions/upload-artifact@v4
        with:
          name: vcpkg-logs
          path: |
            target/vcpkg/buildtrees/**/*.log
            target/vcpkg/buildtrees/**/*.txt
          retention-days: 7

      - name: Run unit/bin tests
        env:
          RUSTC_WRAPPER: ${{ env.RUSTC_WRAPPER }}
          VCPKG_ROOT: ${{ env.VCPKG_ROOT }}
          DPN_OCR_GOLDEN: "1"
          DPN_OCR_MODEL_DIR: ${{ github.workspace }}/target/ocr-models
        run: |
          start=$(date +%s)
          cargo test -q --lib --bins --timings
          cargo test -q --features ffmpeg-cli-tests --no-run --timings
          end=$(date +%s)
          echo "### Linux test runtime" >> "$GITHUB_STEP_SUMMARY"
          echo "- Toolchain: ${{ matrix.toolchain }}" >> "$GITHUB_STEP_SUMMARY"
          echo "- vcpkg cache hit: ${{ steps.vcpkg-root-cache.outputs.cache-hit }}" >> "$GITHUB_STEP_SUMMARY"
          echo "- Test command: cargo test --lib --bins" >> "$GITHUB_STEP_SUMMARY"
          echo "- Integration compile check: cargo test --features ffmpeg-cli-tests --no-run" >> "$GITHUB_STEP_SUMMARY"
          echo "- Duration: $((end-start))s" >> "$GITHUB_STEP_SUMMARY"

      - name: Upload cargo timings
        if: matrix.toolchain == 'stable'
        uses: actions/upload-artifact@v4
        with:
          name: cargo-timings-linux-stable
          path: target/cargo-timings
          retention-days: 7

      - name: sccache stats
        if: ${{ env.RUSTC_WRAPPER == 'sccache' }}
        run: sccache --show-stats || true

  windows-test:
    name: Test (Windows MSVC)
    runs-on: windows-latest
    permissions:
      contents: read
      actions: write
    env:
      CARGO_TERM_COLOR: always
      VCPKG_ROOT: ${{ github.workspace }}/target/vcpkg
      VCPKGRS_TRIPLET: x64-windows-static
      RUSTFLAGS: >-
        -C target-feature=+crt-static
        -C link-arg=Mfplat.lib
        -C link-arg=Strmiids.lib
        -C link-arg=Mfuuid.lib
        -C link-arg=Bcrypt.lib
        -C link-arg=Ncrypt.lib
        -C link-arg=Crypt32.lib
        -C link-arg=Secur32.lib
        -C link-arg=Ole32.lib
        -C link-arg=User32.lib
    steps:
      - uses: actions/checkout@v4
      - name: Install Rust
        uses: dtolnay/rust-toolchain@stable
        with:
          components: rustfmt

      - name: Set up sccache
        id: sccache-setup
        uses: mozilla-actions/sccache-action@v0.0.5

      - name: Set job-level RUSTC_WRAPPER
        if: steps.sccache-setup.outcome == 'success'
        shell: pwsh
        run: Add-Content -Path $env:GITHUB_ENV -Value "RUSTC_WRAPPER=sccache"
      - name: Clear RUSTC_WRAPPER on sccache failure
        if: steps.sccache-setup.outcome == 'failure'
        shell: pwsh
        run: Add-Content -Path $env:GITHUB_ENV -Value "RUSTC_WRAPPER="

      - name: Install dependencies
        shell: pwsh
        run: |
          choco install --no-progress ninja

      - name: Cache cargo-vcpkg binary
        id: cargo-vcpkg-cache-win
        uses: actions/cache@v4
        with:
          path: ~/.cargo/bin/cargo-vcpkg.exe
          key: cargo-vcpkg-windows-v1

      - name: Install cargo-vcpkg
        if: steps.cargo-vcpkg-cache-win.outputs.cache-hit != 'true'
        shell: pwsh
        env:
          RUSTC_WRAPPER: ${{ env.RUSTC_WRAPPER }}
        run: cargo install cargo-vcpkg --locked

      - name: Cache cargo build artifacts
        uses: Swatinem/rust-cache@v2
        with:
          prefix-key: windows-vcpkg-v3-ffmpeg8

      - name: Cache OCR models
        uses: actions/cache@v4
        with:
          path: target/ocr-models
          key: ocr-models-windows-v1

      - name: Restore vcpkg workspace (cross-branch)
        id: vcpkg-root-cache-win
        uses: actions/cache/restore@v4
        with:
          path: |
            target/vcpkg/.vcpkg-root
            target/vcpkg/.git
            target/vcpkg/downloads
            target/vcpkg/installed
            target/vcpkg/packages
            target/vcpkg/ports
            target/vcpkg/scripts
            target/vcpkg/triplets
            target/vcpkg/vcpkg
            target/vcpkg/vcpkg.exe
          key: vcpkg-root-windows-v3-${{ hashFiles('Cargo.toml') }}
          restore-keys: |
            vcpkg-root-windows-v3-

      - name: Validate vcpkg cache origin
        shell: pwsh
        run: |
          $ErrorActionPreference = 'Continue'
          $cacheInvalid = $false
          $expectedRev = $null
          $revLine = Select-String -Path Cargo.toml -Pattern '^rev = "' | Select-Object -First 1
          if ($revLine) {
            $expectedRev = $revLine.Line -replace '^rev = "' -replace '"$',''
          }
          if ((Test-Path "target/vcpkg") -and -not (Test-Path "target/vcpkg/.git")) {
            Write-Host "vcpkg root missing .git; clearing cache entry"
            Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "target/vcpkg"
            $cacheInvalid = $true
          }
          $dirs = @("target/vcpkg", "target/vcpkg/.vcpkg-root")
          foreach ($dir in $dirs) {
            try {
              if (Test-Path "$dir/.git") {
                $origin = git -C $dir remote get-url origin 2>$null
                if ($LASTEXITCODE -ne 0 -or [string]::IsNullOrWhiteSpace($origin)) {
                  Write-Host "Failed to read vcpkg origin in $dir; clearing cache entry"
                  Remove-Item -Recurse -Force -ErrorAction SilentlyContinue $dir
                  $cacheInvalid = $true
                  continue
                }
                if ($origin -ne "https://github.com/microsoft/vcpkg.git" -and $origin -ne "https://github.com/microsoft/vcpkg") {
                  Write-Host "Unexpected vcpkg origin in : $origin"
                  Remove-Item -Recurse -Force -ErrorAction SilentlyContinue $dir
                  $cacheInvalid = $true
                  continue
                }
                if ($expectedRev) {
                  git -C $dir cat-file -e "$expectedRev^{tree}" 2>$null
                  if ($LASTEXITCODE -ne 0) {
                    Write-Host "Missing vcpkg rev $expectedRev in $dir; clearing cache entry"
                    Remove-Item -Recurse -Force -ErrorAction SilentlyContinue $dir
                    $cacheInvalid = $true
                  }
                }
              }
            } catch {
              Write-Host "Failed to validate vcpkg origin in : $($_.Exception.Message)"
              Remove-Item -Recurse -Force -ErrorAction SilentlyContinue $dir
              $cacheInvalid = $true
            }
          }
          if ($cacheInvalid) {
            Add-Content $env:GITHUB_ENV "VCPKG_CACHE_INVALID=1"
          }
          exit 0

      - name: Use cached vcpkg workspace
        if: steps.vcpkg-root-cache-win.outputs.cache-hit == 'true' && env.VCPKG_CACHE_INVALID != '1'
        shell: pwsh
        run: Write-Host "vcpkg workspace cache hit; skipping dependency rebuild."

      - name: Build vcpkg dependencies
        if: steps.vcpkg-root-cache-win.outputs.cache-hit != 'true' || env.VCPKG_CACHE_INVALID == '1'
        shell: pwsh
        env:
          VCPKG_FEATURE_FLAGS: manifests
          VCPKG_CMAKE_CONFIGURE_OPTIONS: -Wno-dev -DCMAKE_POLICY_DEFAULT_CMP0174=NEW
          VCPKG_MAX_CONCURRENCY: 2
          RUSTC_WRAPPER: ${{ env.RUSTC_WRAPPER }}
        run: |
          $maxAttempts = 3
          if (-not (Test-Path "target/vcpkg")) {
            New-Item -ItemType Directory -Path "target/vcpkg" | Out-Null
          }
          for ($attempt = 1; $attempt -le $maxAttempts; $attempt++) {
            Write-Host "vcpkg build attempt $attempt/$maxAttempts"
            cargo vcpkg --verbose build
            if ($LASTEXITCODE -eq 0) {
              Write-Host "vcpkg build succeeded"
              break
            }
            Remove-Item -Recurse -Force -ErrorAction SilentlyContinue "target/vcpkg"
            New-Item -ItemType Directory -Path "target/vcpkg" | Out-Null
            if ($attempt -eq $maxAttempts) {
              Write-Host "vcpkg build failed after $maxAttempts attempts"
              exit $LASTEXITCODE
            }
            $sleepSeconds = 30 * $attempt
            Write-Host "vcpkg build failed (exit $LASTEXITCODE). Retrying in $sleepSeconds seconds..."
            Start-Sleep -Seconds $sleepSeconds
          }

      - name: Save vcpkg workspace cache
        if: (steps.vcpkg-root-cache-win.outputs.cache-hit != 'true' || env.VCPKG_CACHE_INVALID == '1') && success()
        uses: actions/cache/save@v4
        with:
          path: |
            target/vcpkg/.vcpkg-root
            target/vcpkg/.git
            target/vcpkg/downloads
            target/vcpkg/installed
            target/vcpkg/packages
            target/vcpkg/ports
            target/vcpkg/scripts
            target/vcpkg/triplets
            target/vcpkg/vcpkg
            target/vcpkg/vcpkg.exe
          key: vcpkg-root-windows-v3-${{ hashFiles('Cargo.toml') }}

      - name: Force regenerate rusty_ffmpeg bindings
        run: cargo clean -p rusty_ffmpeg

      - name: Upload vcpkg logs on failure
        if: ${{ failure() }}
        uses: actions/upload-artifact@v4
        with:
          name: vcpkg-logs-windows
          path: |
            target/vcpkg/buildtrees/**/*.log
            target/vcpkg/buildtrees/**/*.txt
          retention-days: 7

      - name: Run tests
        shell: pwsh
        env:
          RUSTC_WRAPPER: ${{ env.RUSTC_WRAPPER }}
          VCPKG_ROOT: ${{ env.VCPKG_ROOT }}
          RUSTFLAGS: ${{ env.RUSTFLAGS }}
          DPN_OCR_GOLDEN: "1"
          DPN_OCR_MODEL_DIR: ${{ github.workspace }}\\target\\ocr-models
        run: |
          $start = Get-Date
          cargo test -q --lib --bins
          cargo test -q --features ffmpeg-cli-tests --no-run
          $elapsed = (Get-Date) - $start
          Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value "### Windows runtime"
          Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value "- Toolchain: stable"
          Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value "- vcpkg cache hit: ${{ steps.vcpkg-root-cache-win.outputs.cache-hit }}"
          Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value "- Test command: cargo test --lib --bins"
          Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value "- Integration compile check: cargo test --features ffmpeg-cli-tests --no-run"
          Add-Content -Path $env:GITHUB_STEP_SUMMARY -Value ("- Duration: {0}s" -f [int]$elapsed.TotalSeconds)

      - name: sccache stats
        if: ${{ env.RUSTC_WRAPPER == 'sccache' }}
        shell: pwsh
        run: sccache --show-stats; if ($LASTEXITCODE -ne 0) { exit 0 }

  ffmpeg-cli-tests:
    name: Test (FFmpeg CLI)
    needs: test
    runs-on: ubuntu-latest
    env:
      VCPKG_ROOT: ${{ github.workspace }}/target/vcpkg
    permissions:
      contents: read
      actions: write
    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0
      - name: Install Rust
        uses: dtolnay/rust-toolchain@master
        with:
          toolchain: stable
          components: rustfmt

      - name: Set up sccache
        id: sccache-setup
        uses: mozilla-actions/sccache-action@v0.0.5

      - name: Install dependencies
        run: |
          sudo apt-get update -y
          sudo apt-get --assume-yes install nasm ffmpeg autoconf autoconf-archive automake libtool

      - name: Set job-level RUSTC_WRAPPER
        if: steps.sccache-setup.outcome == 'success'
        run: echo "RUSTC_WRAPPER=sccache" >> $GITHUB_ENV
      - if: steps.sccache-setup.outcome == 'failure'
        run: echo "RUSTC_WRAPPER=" >> $GITHUB_ENV

      - name: Cache cargo-vcpkg binary
        id: cargo-vcpkg-cache
        uses: actions/cache@v4
        with:
          path: ~/.cargo/bin/cargo-vcpkg
          key: cargo-vcpkg-linux-v1

      - name: Install cargo-vcpkg
        if: steps.cargo-vcpkg-cache.outputs.cache-hit != 'true'
        env:
          RUSTC_WRAPPER: ${{ env.RUSTC_WRAPPER }}
        run: cargo install cargo-vcpkg --locked

      - name: Cache cargo build artifacts
        uses: Swatinem/rust-cache@v2
        with:
          prefix-key: linux-vcpkg-v3-ffmpeg8

      - name: Cache OCR models
        uses: actions/cache@v4
        with:
          path: target/ocr-models
          key: ocr-models-linux-v1

      - name: Cache vcpkg workspace (cross-branch)
        id: vcpkg-root-cache
        uses: actions/cache@v4
        with:
          path: |
            target/vcpkg/.vcpkg-root
            target/vcpkg/.git
            target/vcpkg/downloads
            target/vcpkg/installed
            target/vcpkg/packages
            target/vcpkg/ports
            target/vcpkg/scripts
            target/vcpkg/triplets
            target/vcpkg/vcpkg
          key: vcpkg-root-linux-v2-${{ hashFiles('Cargo.toml') }}
          restore-keys: |
            vcpkg-root-linux-v2-

      - name: Validate vcpkg cache origin
        run: |
          cache_invalid=0
          expected_rev="$(grep -E '^rev = "' Cargo.toml | head -n1 | awk -F'"' '{print $2}')"
          if [ -e "target/vcpkg" ] && [ ! -e "target/vcpkg/.git" ]; then
            echo "vcpkg root missing .git; clearing cache entry"
            rm -rf target/vcpkg
            cache_invalid=1
          fi
          for dir in target/vcpkg target/vcpkg/.vcpkg-root target/vcpkg/vcpkg; do
            if [ -e "$dir/.git" ]; then
              origin=$(git -C "$dir" remote get-url origin 2>/dev/null || true)
              if [ -z "$origin" ]; then
                echo "Failed to read vcpkg origin in $dir; clearing cache entry"
                rm -rf "$dir"
                cache_invalid=1
                continue
              fi
              if [ "$origin" != "https://github.com/microsoft/vcpkg.git" ] && [ "$origin" != "https://github.com/microsoft/vcpkg" ]; then
                echo "Unexpected vcpkg origin in : $origin"
                rm -rf "$dir"
                cache_invalid=1
                continue
              fi
              if [ -n "$expected_rev" ]; then
                if ! git -C "$dir" cat-file -e "${expected_rev}^{tree}" 2>/dev/null; then
                  echo "Missing vcpkg rev $expected_rev in $dir; clearing cache entry"
                  rm -rf "$dir"
                  cache_invalid=1
                fi
              fi
            fi
          done
          if [ "$cache_invalid" -eq 1 ]; then
            echo "VCPKG_CACHE_INVALID=1" >> "$GITHUB_ENV"
          fi

      - name: Use cached vcpkg workspace
        if: steps.vcpkg-root-cache.outputs.cache-hit == 'true' && env.VCPKG_CACHE_INVALID != '1'
        run: echo "vcpkg workspace cache hit; skipping dependency rebuild."

      - name: Build vcpkg dependencies
        if: steps.vcpkg-root-cache.outputs.cache-hit != 'true' || env.VCPKG_CACHE_INVALID == '1'
        env:
          VCPKG_BUILD_TYPE: release
          VCPKG_FEATURE_FLAGS: manifests,binarycaching
          VCPKG_BINARY_SOURCES: clear;x-gha,readwrite
          VCPKG_CMAKE_CONFIGURE_OPTIONS: -Wno-dev -DCMAKE_POLICY_DEFAULT_CMP0174=NEW
          VCPKG_MAX_CONCURRENCY: 2
          CMAKE_BUILD_PARALLEL_LEVEL: 2
          RUSTC_WRAPPER: ${{ env.RUSTC_WRAPPER }}
        run: cargo vcpkg --verbose build

      - name: Force regenerate rusty_ffmpeg bindings
        run: cargo clean -p rusty_ffmpeg

      - name: Run FFmpeg CLI tests
        env:
          RUSTC_WRAPPER: ${{ env.RUSTC_WRAPPER }}
          VCPKG_ROOT: ${{ env.VCPKG_ROOT }}
          DPN_OCR_GOLDEN: "1"
          DPN_OCR_MODEL_DIR: ${{ github.workspace }}/target/ocr-models
        run: cargo test -q --features ffmpeg-cli-tests

      - name: sccache stats
        if: ${{ env.RUSTC_WRAPPER == 'sccache' }}
        run: sccache --show-stats || true