SpecialK: Add option to download latest nightly from GitHub Actions#977
Merged
SpecialK: Add option to download latest nightly from GitHub Actions#977
Conversation
Owner
Author
|
Need to bump langfiles. |
Owner
Author
|
Added some more logging, updated langfiles, and bumped the version. ShellCheck is green on this so I think it's ready to merge. I also gave a brief mention to the nightly release on our SpecialK wiki page. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
fetchLatestGitHubActionsBuildto 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
SPEKARCwhich is the destination path for the archive.extSpektakes 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:
SPEKDLis now set after wee set theSPEKDLURL, because thenightlyoption overridesSPEKARCsince in this case, it's a ZIP instead of a 7z file.extSpekcan now extract ZIP archives and checks the file extension to do thisfetchLatestGitHubActionsBuildwas tweaked to now optionally take a name to fetch the first workflow from. For SpecialK it was pulling from itsCodeQLworkflow. 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.