goto-bus-stop / setup-zig

use a @ziglang compiler in your github actions workflows
Other
153 stars 19 forks source link

Github action fails when master == latest release #18

Open DutchGhost opened 3 years ago

DutchGhost commented 3 years ago

All of my projects that use this action started spuriously failing. Here an error message:

Run goto-bus-stop/setup-zig@v1
  with:
    version: master
Error: Could not find version master for platform x86_64-linux
    at downloadZig (/home/runner/work/_actions/goto-bus-stop/setup-zig/v1/dist/index.js:48:11)
    at processTicksAndRejections (internal/process/task_queues.js:93:5)
    at async main (/home/runner/work/_actions/goto-bus-stop/setup-zig/v1/dist/index.js:73:15)
Error: Could not find version master for platform x86_64-linux

This makes sense, master is not in the index.json now that 0.7 has just been released: https://ziglang.org/download/index.json

goto-bus-stop commented 3 years ago

Thanks for the report! Hmm. Perhaps this could be solved by resolving the branch name to a commit first using the Github API, and then using the code that https://github.com/goto-bus-stop/setup-zig/pull/14 adds to grab the tarball for that commit hash.

marnix commented 3 years ago

It looks like this has been fixed? I'm using goto-bus-stop/setup-zig@v1 and encountered this issue in https://github.com/marnix/zigmmverify/actions/runs/354629287 at Mon, 09 Nov 2020 19:50:35 GMT, and then the next morning in https://github.com/marnix/zigmmverify/runs/1378002575 at Tue, 10 Nov 2020 04:58:53 GMT this worked again.

goto-bus-stop commented 3 years ago

A new nightly build means that master has reappeared in https://ziglang.org/download/index.json :)

This will happen again for a day when 0.7.1 and 0.8.0 come out, though, so it would still be nice to fix it in setup-zig too.

leecannon commented 1 year ago

Some weirdness has happened with the latest release 0.11.0, this time there was still a master in the json and it pointed at the correct 0.11.0 tarballs.

However this action would always choose to use a cached dev version of 0.11.0 (e.g. zig-linux-x86_64-0.11.0-dev.4297+e682d6eb2) instead of downloading the new tarball, the only way I could get the action to download the new tarball was to delete all caches.