SpecialK: Add option to download latest nightly from GitHub Actions #977
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Implements most of #975.
This PR adds logic to fetch the latest GitHub Actions nightly archive. Since the archive name is not fixed, we do this by using
fetchLatestGitHubActionsBuild
to get the latest workflow commit hash for the relevant workflow name we want, then build the nightly.link URL for the page that will list the latest GitHub Actions build, wget it, and parse out the artifact archive nightly.link download URL we want based on a pattern for how our desired archive name will look.Once we have this, we set the basename of this ZIP download URL to the
SPEKARC
which is the destination path for the archive.extSpek
takes care of extracting it, and the rest of the paths are built dynamically based on the version name, so the rest of the SpecialK installation logic works without any tweaks.We did have to make a couple of changes to achieve this:
SPEKDL
is now set after wee set theSPEKDLURL
, because thenightly
option overridesSPEKARC
since in this case, it's a ZIP instead of a 7z file.extSpek
can now extract ZIP archives and checks the file extension to do thisfetchLatestGitHubActionsBuild
was tweaked to now optionally take a name to fetch the first workflow from. For SpecialK it was pulling from itsCodeQL
workflow. Now we filter the workflow API response withjq
.This branch was tested in #975 and should work, and it also works in my tests, so I will merge it soon. In future, other changes to allow custom SpecialK versions may be implemented as well.