Skip to content

Commit c2fbe52

Browse files
committed
Add FFmpeg DLLs to PATH and copy to release
1 parent 3621155 commit c2fbe52

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed

.github/workflows/performance-regressions.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,11 @@ jobs:
4040
- name: Native dependencies
4141
run: node scripts/setup.js
4242

43+
- name: Add FFmpeg DLLs to PATH
44+
if: runner.os == 'Windows'
45+
shell: pwsh
46+
run: Add-Content -Path $env:GITHUB_PATH -Value "${{ github.workspace }}\\target\\ffmpeg\\bin"
47+
4348
- name: Run performance suite
4449
run: cargo run --release -p cap-test -- suite performance --recording-path performance-fixtures/reference-recording.cap --duration 8 --output performance-results.json --gate
4550

scripts/setup.js

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -119,15 +119,16 @@ async function main() {
119119
console.log("Extracted ffmpeg");
120120
} else console.log("Using cached ffmpeg");
121121

122-
// alternative to adding ffmpeg/bin to PATH
123-
await fs.mkdir(path.join(targetDir, "debug"), { recursive: true });
124-
for (const name of await fs.readdir(path.join(ffmpegDir, "bin"))) {
125-
await fs.copyFile(
126-
path.join(ffmpegDir, "bin", name),
127-
path.join(targetDir, "debug", name),
128-
);
122+
for (const profile of ["debug", "release"]) {
123+
await fs.mkdir(path.join(targetDir, profile), { recursive: true });
124+
for (const name of await fs.readdir(path.join(ffmpegDir, "bin"))) {
125+
await fs.copyFile(
126+
path.join(ffmpegDir, "bin", name),
127+
path.join(targetDir, profile, name),
128+
);
129+
}
129130
}
130-
console.log("Copied ffmpeg dylibs to target/debug");
131+
console.log("Copied ffmpeg DLLs to target/debug and target/release");
131132

132133
if (!(await fileExists(path.join(targetDir, "native-deps"))))
133134
await fs.mkdir(path.join(targetDir, "native-deps"), { recursive: true });

0 commit comments

Comments
 (0)