Skip to content

Commit

Permalink
Cache ffmpeg binaries
Browse files Browse the repository at this point in the history
  • Loading branch information
OpenBagTwo committed Apr 26, 2024
1 parent 131c122 commit d933cb3
Showing 1 changed file with 24 additions and 9 deletions.
33 changes: 24 additions & 9 deletions .github/workflows/build_rpg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,21 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Attempt to use cached ffmpeg binaries
id: cache-ffmpeg
uses: actions/cache@v3
env:
cache-name: ffmpeg-cache
with:
path: ffmpeg-release/
key: ${{ runner.os }}-${{ env.cache-name }}
- name: Grab ffmpeg binaries (Windows)
if: ${{ runner.os == 'Windows' }}
if: ${{ runner.os == 'Windows' && steps.cache-ffmpeg.outputs.cache-hit != 'true' }}
run: |
curl -JL https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full.7z --output ffmpeg-release-full.7z
mkdir ffmpeg-release
- name: Extract ffmpeg (Windows)
if: ${{ runner.os == 'Windows' }}
if: ${{ runner.os == 'Windows' && steps.cache-ffmpeg.outputs.cache-hit != 'true' }}
uses: DuckSoft/extract-7z-action@v1.0
with:
pathSource: ffmpeg-release-full.7z
Expand All @@ -39,19 +47,26 @@ jobs:
copy ffmpeg-release\*\bin\ffmpeg.exe foxnap_rpg\bin\ffmpeg.exe
copy ffmpeg-release\*\bin\ffprobe.exe foxnap_rpg\bin\ffprobe.exe
- name: Grab FFMPEG Binaries (Mac)
if: ${{ runner.os == 'macOS' }}
if: ${{ runner.os == 'macOS' && steps.cache-ffmpeg.outputs.cache-hit != 'true' }}
run: |
wget --trust-server-names https://evermeet.cx/ffmpeg/getrelease/zip -O ffmpeg-release.zip
wget --trust-server-names https://evermeet.cx/ffmpeg/getrelease/ffprobe/zip -O ffprobe-release.zip
unzip ffmpeg-release.zip -d foxnap_rpg/bin/
unzip ffprobe-release.zip -d foxnap_rpg/bin/
mkdir ffmpeg-release
wget --trust-server-names https://evermeet.cx/ffmpeg/getrelease/zip -O ffmpeg-release/ffmpeg-release.zip
wget --trust-server-names https://evermeet.cx/ffmpeg/getrelease/ffprobe/zip -O ffmpeg-release/ffprobe-release.zip
- name: Place ffmpeg binaries in correct folder (Mac)
if: ${{ runner.os == 'macOS' }}
run: |
unzip ffmpeg-release/ffmpeg-release.zip -d foxnap_rpg/bin/
unzip ffmpeg-release/ffprobe-release.zip -d foxnap_rpg/bin/
- name: Grab FFMPEG Binaries (Linux)
if: ${{ runner.os == 'Linux' }}
if: ${{ runner.os == 'Linux' && steps.cache-ffmpeg.outputs.cache-hit != 'true' }}
run: |
wget --trust-server-names https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz -O ffmpeg-release.tar.xz
mkdir ffmpeg-release
tar -xJvf ffmpeg-release.tar.xz -C ffmpeg-release
mv ffmpeg-release/*/ff* foxnap_rpg/bin/
- name: Place ffmpeg binaries in correct folder (Linux)
if: ${{ runner.os == 'Linux' }}
run: |
cp ffmpeg-release/*/ff* foxnap_rpg/bin/
- name: Install dependencies
run: |
python -m pip install --upgrade pip
Expand Down

0 comments on commit d933cb3

Please sign in to comment.