Skip to content

Commit

Permalink
build: fix caching ffmpeg builds
Browse files Browse the repository at this point in the history
  • Loading branch information
rr- committed Mar 27, 2024
1 parent d07a87f commit 0c8c30a
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions .github/workflows/build_macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,17 @@ jobs:
- name: "Build dependency: libsdl2 (universal)"
run: sudo port -N install libsdl2 +universal

- name: "Cache dependency: ffmpeg (universal)"
id: cache-ffmpeg
uses: actions/cache@v3
- name: "Restore cache dependency: ffmpeg (universal)"
id: restore-cache-ffmpeg
uses: actions/cache/restore@v3
with:
key: ${{ runner.os }}-build-ffmpeg-${{ hashFiles('.github/workflows/build_macos.yml') }}
path: |
${{ env.FFMPEG_INSTALL_TMP_UNIVERSAL }}
${{ env.FFMPEG_INSTALL_TMP_X86_64 }}
- name: "Build dependency: ffmpeg (universal)"
if: ${{ steps.cache-ffmpeg.outputs.cache-hit != 'true' }}
if: ${{ steps.restore-cache-ffmpeg.outputs.cache-hit != 'true' }}
run: |
# Install to separate staging paths for all architectures in
# preparation for fusing universal libraries in a follow-up step.
Expand Down Expand Up @@ -123,6 +123,16 @@ jobs:
make -j$(sysctl -n hw.ncpu)
sudo make install
- name: "Save cache dependency: ffmpeg (universal)"
id: save-cache-ffmpeg
if: always()
uses: actions/cache/save@v3
with:
key: ${{ runner.os }}-build-ffmpeg-${{ hashFiles('.github/workflows/build_macos.yml') }}
path: |
${{ env.FFMPEG_INSTALL_TMP_UNIVERSAL }}
${{ env.FFMPEG_INSTALL_TMP_X86_64 }}
- name: "Build dependency: ffmpeg (fuse universal libraries)"
run: |
# Copy universal artefacts to the MacPorts install prefix.
Expand Down

0 comments on commit 0c8c30a

Please sign in to comment.