62
62
- name : Generate cache key
63
63
id : cache-key
64
64
run : |
65
- echo "cache_key=$(echo ${{ env.WXWIDGETS_VERSION }}-$(sha256sum src/Makefile | awk '{print $1}'))" >> $GITHUB_OUTPUT
65
+ echo "cache_key=$(echo ${{ env.WXWIDGETS_VERSION }}-$(sha256sum src/Makefile .github/workflows/build-linux.yml | awk '{print $1}'))" >> $GITHUB_OUTPUT
66
66
67
67
- name : Cache wxBuildConsole
68
68
uses : actions/cache@v3
@@ -78,11 +78,18 @@ jobs:
78
78
path : /tmp/wxBuildGUI
79
79
key : wxBuildGUI-${{ steps.cache-key.outputs.cache_key }}
80
80
81
+ - name : Cache wxWidgets
82
+ uses : actions/cache@v3
83
+ id : cache-wxwidgets
84
+ with :
85
+ path : /tmp/wxWidgets-${{ env.WXWIDGETS_VERSION }}
86
+ key : wxWidgets-${{ steps.cache-key.outputs.cache_key }}
87
+
81
88
- name : Install dependencies
82
- run : sudo apt-get update && sudo apt-get install -y wget tar libpcsclite-dev libfuse-dev yasm libgtk-3-dev libwxgtk3.0-gtk3-dev libayatana-appindicator3-dev cmake debhelper
89
+ run : sudo apt-get update && sudo apt-get install -y wget tar libpcsclite-dev libfuse-dev yasm libgtk-3-dev libayatana-appindicator3-dev cmake debhelper
83
90
84
91
- name : Download and extract wxWidgets to /tmp if build folders are missing
85
- if : steps.cache-wxbuildconsole.outputs.cache-hit != 'true' || steps.cache-wxbuildgui.outputs.cache-hit != 'true'
92
+ if : steps.cache-wxbuildconsole.outputs.cache-hit != 'true' || steps.cache-wxbuildgui.outputs.cache-hit != 'true' || steps.cache-wxwidgets.outputs.cache-hit != 'true'
86
93
run : |
87
94
wget https://github.com/wxWidgets/wxWidgets/releases/download/v${{ env.WXWIDGETS_VERSION }}/wxWidgets-${{ env.WXWIDGETS_VERSION }}.tar.bz2 -O /tmp/wxWidgets-${{ env.WXWIDGETS_VERSION }}.tar.bz2
88
95
mkdir -p /tmp/wxWidgets-${{ env.WXWIDGETS_VERSION }}
@@ -183,15 +190,17 @@ jobs:
183
190
uses : actions/github-script@v6
184
191
if : always()
185
192
with :
193
+ github-token : ${{ secrets.WORKFLOW_TOKEN }}
186
194
script : |
187
195
const caches = await github.rest.actions.getActionsCacheList({
188
196
owner: context.repo.owner,
189
197
repo: context.repo.repo,
190
198
})
191
199
for (const cache of caches.data.actions_caches) {
192
- if (cache.key.startsWith('wxBuildConsole-') || cache.key.startsWith('wxBuildGUI-')) {
200
+ if (cache.key.startsWith('wxBuildConsole-') || cache.key.startsWith('wxBuildGUI-') || cache.key.startsWith('wxWidgets-') ) {
193
201
if (cache.key !== `wxBuildConsole-${{ steps.cache-key.outputs.cache_key }}` &&
194
- cache.key !== `wxBuildGUI-${{ steps.cache-key.outputs.cache_key }}`) {
202
+ cache.key !== `wxBuildGUI-${{ steps.cache-key.outputs.cache_key }}` &&
203
+ cache.key !== `wxWidgets-${{ steps.cache-key.outputs.cache_key }}`) {
195
204
console.log(`Deleting cache with key: ${cache.key}`)
196
205
await github.rest.actions.deleteActionsCacheById({
197
206
owner: context.repo.owner,
0 commit comments