Skip to content

Commit 6afa8e0

Browse files
authored
[code-infra] CI optimization: re-use ffmpeg (#17333)
1 parent 43dcadd commit 6afa8e0

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

.circleci/config.yml

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,16 @@ commands:
113113
condition: << parameters.playwright >>
114114
steps:
115115
- run:
116-
name: Install playwright
117-
command: pnpx [email protected] install --with-deps
116+
name: Install playwright & ffmpeg
117+
command: |
118+
pnpx [email protected] install --with-deps
119+
# Avoids installing a system version of ffmpeg
120+
ffmpeg_bin=$(find ~/.cache/ms-playwright -regex '.*/ffmpeg-[0-9]*')
121+
if [[ -z "$ffmpeg_bin" ]]; then
122+
>&2 echo "Could not find ffmpeg location"
123+
exit 1
124+
fi
125+
ln -s "$ffmpeg_bin" ~/bin/ffmpeg
118126
119127
jobs:
120128
checkout:
@@ -293,9 +301,6 @@ jobs:
293301
- install_js:
294302
playwright: true
295303
react-version: << parameters.react-version >>
296-
- run:
297-
name: Install ffmpeg
298-
command: sudo apt update && sudo apt upgrade -y && sudo apt install ffmpeg -y
299304
- run:
300305
name: Run visual regression tests
301306
command: xvfb-run pnpm test:regressions

0 commit comments

Comments
 (0)