Topic: How to run github workflows in forked repository?

palino
Avatar
Topic Opener
Joined: 2022-12-19, 08:06 UTC+1.0
Posts: 18
OS: Windows 11
Version: master
Ranking
Pry about Widelands
Posted at: 2025-10-13, 21:54 UTC+2.0

Hello

I want to test my development branch in forked github repository, using all compilers and environments like master branch in official repo. I updated my branch, so that github workflows are active: https://github.com/gpalino/widelands/commit/97100782806d8edb45a3216fc986ea39fe3727a0

All is working except windows-msvc jobs:

Run actions/cache/restore@v4
Error: Failed to restore cache entry. Exiting as fail-on-cache-miss is set. Input key: vcpkg_ref-invalid-to-use-latest

e.g. here: https://github.com/gpalino/widelands/actions/runs/18466384675/job/52609569462

I see comment here https://github.com/widelands/widelands/blob/460eb73bf542bcbd57687f59bdb868cac5aab604/.github/workflows/build_windows_msvc.yaml#L27-L28

but what can I do to have msvc jobs running correctly?


Top Quote
tothxa
Avatar
Joined: 2021-03-24, 12:44 UTC+1.0
Posts: 545
OS: antix / Debian
Version: some new PR I'm testing
Ranking
One Elder of Players
Posted at: 2025-10-13, 22:55 UTC+2.0

You have to set a repo actions variable called VCPKG_REF. The initial value can be any non-empty string. Then run the vcpkg update workflow manually, and if the build succeeds, it will both cache the build deps and set the variable for you.


Attachment: image/png
vcpkg.png

Top Quote
palino
Avatar
Topic Opener
Joined: 2022-12-19, 08:06 UTC+1.0
Posts: 18
OS: Windows 11
Version: master
Ranking
Pry about Widelands
Posted at: Yesterday 17:10 UTC+2.0

I tried to follow your steps, probably something is missing yet. I set initial value for VCPKG_REF string xyz. Update finished successfully, but not next builds - neither master branch, nor wb-test3.


Attachment: image/png
wl_both.png

Top Quote
tothxa
Avatar
Joined: 2021-03-24, 12:44 UTC+1.0
Posts: 545
OS: antix / Debian
Version: some new PR I'm testing
Ranking
One Elder of Players
Posted at: Yesterday 20:51 UTC+2.0

Unfortunately the problem is not in your setup but in the vcpkg update workflow definition itself. It looks like the last update broke it for forked repos, and the change that broke it was necessary. However I believe the

github.repository == 'widelands/widelands'

check in the update step is no longer necessary (it's from the time when the vcpkg ref was stored in the main tree), and can be replaced by

vars.VCPKG_REF != ''

You can try it in a new branch, though you may have to set that branch the default for the time of the vcpkg update run.


Top Quote
tothxa
Avatar
Joined: 2021-03-24, 12:44 UTC+1.0
Posts: 545
OS: antix / Debian
Version: some new PR I'm testing
Ranking
One Elder of Players
Posted at: Yesterday 20:54 UTC+2.0

I'll check the whole thing again in my forked repo and create a PR when everything's OK.


Top Quote