Skip to content

Commit 4bb02d3

Browse files
committed
fix(ci): remove workaround for hashFiles on macOS runners
- Removes custom file hash calculation step that was used to work around a GitHub Actions bug - Simplifies cache key generation by using hashFiles function directly - The workaround is no longer needed as the GitHub Actions issue has been resolved References: actions/runner-images#13341
1 parent a68e8bb commit 4bb02d3

1 file changed

Lines changed: 2 additions & 12 deletions

File tree

.github/workflows/ffmpeg-release.yml

Lines changed: 2 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -71,19 +71,11 @@ jobs:
7171
if: matrix.os == 'darwin'
7272
run: brew update && brew install yasm autoconf ragel meson nasm automake libtool python3
7373

74-
- name: Calculate file hashes
75-
id: file-hashes
76-
run: |
77-
echo "libraries-hash=$(sha256sum internal/builder/libraries.go | cut -d' ' -f1 | head -c 8)" >> $GITHUB_OUTPUT
78-
echo "buildsystems-hash=$(sha256sum internal/builder/buildsystems.go | cut -d' ' -f1 | head -c 8)" >> $GITHUB_OUTPUT
79-
8074
- name: Cache FFmpeg source downloads
8175
uses: actions/cache@v4
8276
with:
8377
path: .build/downloads
84-
# Workaround for GitHub Actions bug: https://github.com/actions/runner-images/issues/13341
85-
# hashFiles() broken on macOS runners as of 2024-11-23, using calculated hash instead
86-
key: ${{ runner.os }}-${{ runner.arch }}-ffmpeg-downloads-${{ matrix.os == 'darwin' && steps.file-hashes.outputs.libraries-hash || hashFiles('internal/builder/libraries.go') }}
78+
key: ${{ runner.os }}-${{ runner.arch }}-ffmpeg-downloads-${{ hashFiles('internal/builder/libraries.go') }}
8779
restore-keys: |
8880
${{ runner.os }}-${{ runner.arch }}-ffmpeg-downloads-
8981
@@ -93,9 +85,7 @@ jobs:
9385
path: |
9486
.build/staging
9587
.build/build
96-
# Workaround for GitHub Actions bug: https://github.com/actions/runner-images/issues/13341
97-
# hashFiles() broken on macOS runners as of 2024-11-23, using calculated hash instead
98-
key: ${{ runner.os }}-${{ runner.arch }}-ffmpeg-deps-${{ matrix.os == 'darwin' && format('{0}-{1}', steps.file-hashes.outputs.libraries-hash, steps.file-hashes.outputs.buildsystems-hash) || hashFiles('internal/builder/libraries.go', 'internal/builder/buildsystems.go') }}
88+
key: ${{ runner.os }}-${{ runner.arch }}-ffmpeg-deps-${{ hashFiles('internal/builder/libraries.go', 'internal/builder/buildsystems.go') }}
9989
restore-keys: |
10090
${{ runner.os }}-${{ runner.arch }}-ffmpeg-deps-
10191

0 commit comments

Comments
 (0)