Skip to content

Commit 59ac9f8

Browse files
committed
CI: cache GTK bundle on native Windows builds
1 parent d8009ab commit 59ac9f8

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.github/workflows/windows-msys2-build.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,20 @@ jobs:
4747
unzip
4848
dos2unix
4949
mingw-w64-x86_64-nsis
50+
# build the GTK bundle, but cache it for a week
51+
- name: Cache timestamp for GTK-Bundle
52+
id: cache_gtk_bundle_timestamp
53+
# we use a Monday-based weekly cache, so it usually doesn't change
54+
# right before a release, as we usually do them on Sundays.
55+
run: echo "timestamp=$(date +%Y-%W)" >> $GITHUB_OUTPUT
56+
- name: Cache GTK-Bundle
57+
id: cache_gtk_bundle
58+
uses: actions/cache@v4
59+
with:
60+
path: ${{ github.workspace }}/geany_build/bundle/geany-gtk
61+
key: ${{ runner.os }}-${{ github.job }}-bundle-geany-gtk-${{ hashFiles('scripts/gtk-bundle-from-msys2.sh') }}-${{ steps.cache_gtk_bundle_timestamp.outputs.timestamp }}
5062
- name: GTK-Bundle
63+
if: steps.cache_gtk_bundle.outputs.cache-hit != 'true'
5164
run: |
5265
mkdir -p geany_build/bundle/geany-gtk
5366
cd geany_build/bundle/geany-gtk

0 commit comments

Comments
 (0)