Skip to content

Commit

Permalink
CI: Fix cache refresh in scheduled nightly builds
Browse files Browse the repository at this point in the history
Avoids a possible race condition between cache cleanup and use of
caches in the build jobs.

Also includes FFmpeg caches in the cleanup as the build action has
been fully updated with expected scheduled cleanups.
  • Loading branch information
PatTheMav committed Feb 8, 2024
1 parent 4202b50 commit e215cf2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/scheduled.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
fi
done <<< \
"$(gh api repos/${GITHUB_REPOSITORY}/actions/caches \
--jq '.actions_caches.[] | select(.ref|test("refs/heads/master")) | select(.key|test(".+-(qt6|deps)-.+")) | select(.key|test(".+ffmpeg.+")|not) | {id, key} | join(";")')"
--jq '.actions_caches.[] | select(.ref|test("refs/heads/master")) | select(.key|test(".+-(qt6|ffmpeg|deps)-.+")) | {id, key} | join(";")')"
echo '::endgroup::'
echo '::group::Processing pull request cache entries'
Expand All @@ -76,6 +76,7 @@ jobs:
ffmpeg-macos-build:
name: Build FFmpeg for macOS
runs-on: macos-13
needs: cache-cleanup
strategy:
fail-fast: true
matrix:
Expand Down Expand Up @@ -129,6 +130,7 @@ jobs:
ffmpeg-windows-build:
name: Build FFmpeg for Windows
runs-on: windows-2022
needs: cache-cleanup
strategy:
fail-fast: true
matrix:
Expand Down Expand Up @@ -157,6 +159,7 @@ jobs:
macos-build:
name: Build macOS Dependencies
runs-on: macos-13
needs: cache-cleanup
strategy:
fail-fast: true
matrix:
Expand Down Expand Up @@ -210,6 +213,7 @@ jobs:
windows-build:
name: Build Windows Dependencies
runs-on: windows-2022
needs: cache-cleanup
strategy:
fail-fast: true
matrix:
Expand Down Expand Up @@ -282,6 +286,7 @@ jobs:
macos-qt6-build:
name: Build Qt6 (macOS)
runs-on: macos-13
needs: cache-cleanup
defaults:
run:
shell: zsh --no-rcs --errexit --pipefail {0}
Expand Down Expand Up @@ -322,6 +327,7 @@ jobs:
windows-qt6-build:
name: Build Qt6 (Windows)
runs-on: windows-2022
needs: cache-cleanup
strategy:
fail-fast: true
matrix:
Expand Down

0 comments on commit e215cf2

Please sign in to comment.