Conversation
|
THANK YOU for working on this! Answering some (not all) questions (and using numbers to make replies perhaps a bit easier):
|
|
To reply to @fingolfin's post:
|
|
Hi, sorry, only just looking at this. I will say our current cygwin plan is very much 'we do whatever is best for releases'. I think the set of people who want to build their own GAP on cygwin is the empty set :) If you are good enough at computers to use a unix-style command line, you would be using linux rather than cygwin nowadays! This looks sensible to me. If it's easy to support older GAPs that's fine, but personally I wouldn't try too hard, anything before 4.13, if anyone wanted to update packages, I'd suggest they just get a newer GAP. |
|
This is a really nice effort but now has a conflict. It would be good to get it over the finish line. |
|
Conflict resolved. Some remarks, still:
|
|
I tagged |
|
Regarding "information on GAP releases", what do we need? A list of releases (versions), each pointing to the URL of a tarball plus perhaps a SHA256 checksum? I'd say we should create such a JSON file, but then we need an issue on gap-system/gap to remind us about it. But for now we can use the code here as-is, I think: if we switch to that JSON file later, that should be transparent to users anyway, right? |
Co-authored-by: Max Horn <max@quendi.de>
|
We would need a file containing a list of the releases, with for each release:
The last two could of course be determined from the version number instead of mentioned explicitly. |
|
It turns out that an action can access a repository's This should make the conversion from |
|
Excellent, thank you so much! There is one thing missing though: the README should have a section about "what's new in v3" that indicates the breaking changes and how to deal with them. |
|
I ended up waiting to release this since the JSON file progressed really quickly thanks to Joe. I have an update ready to this PR which uses the JSON file, all that's missing is the "correct" URL to get the file from. |
fingolfin
left a comment
There was a problem hiding this comment.
Thanks! A bunch if more remarks/requests -- but it'd be totally fine by me to merge this as-is and then perhaps taking care of these later.
README.md
Outdated
|
|
||
| #### Changes to inputs: | ||
| - The `GAPBRANCH` input has been replaced by `gap-version`, which accepts version numbers, branch names, or either `default` or `latest`. | ||
| - The input `GAP_PKGS_TO_CLONE` has been removed. This should now be done by the user in a separate step in the workflow. |
There was a problem hiding this comment.
Perhaps we can have an example for doing that somewhere in this document? I started writing a suggestion in my computer late last night but now just have my phone...
| - `GAP_PKGS_TO_CLONE`: | ||
| - A space-separated list of the GAP packages to clone. | ||
| - `gap-version`: | ||
| - The gap version or branch to build. You may specify "latest" for the latest release, or "default" for the default branch. |
There was a problem hiding this comment.
Based on your examples it seems one can also specify v4.11.1 (so tags?) or 4 and v4.10 (not tags). Could this be explained please?
Also "default branch" is not clear --presumably this means "GAP development version built from the default branch of the GAP repository"
I guess this hints at a translation key for people upgrading: "master" should become "default" and "stable-4.X" becomes "4.X" (or it stays, if branch names are supported? But better to suggest "4.X")
There was a problem hiding this comment.
I've tried explaining this in a bit more detail now. Let me know if there's anything still unclear.
EDIT: just realised I explained it in the Changes section, not in the inputs section. I added a line referring to the Changes section, but I'm not sure this is very user-friendly :/
Co-authored-by: Max Horn <max@quendi.de>
| # ... additional steps using GAP will usually follow here | ||
| ``` | ||
|
|
||
| A more extensive example: |
There was a problem hiding this comment.
(I started writing the below text last night, and adding it now so it is not completely lost, even though it may be out of date)
I think it would be good if this or another example showed how to replace GAP_PKGS_TO_CLONE. There are of course multiple ways.
A simple example might do
- run: |
cd $GAPROOT/pkg
rm -rf cvec
git clone https://github.com/gap-packages/cvecIt is actually weird that we have to delete an existing copy of the package. Perhaps better to install into a separate root directory, e.g. ~/.gap/pkg/, or even /tmp/gaproot/pkg (which several other GitHub actions already use for a symlink to the package being tested... perhaps we should formalize that here.. Indeed we could even ensure this is a GAP root here without fiddling with package dirs... E.g. by providing a ~/.gap/gap.ini file which calls ExtendRootDirectories).
Alternatively one could suggest using PackageManager (which also compiles),
though for some stuff one really needs the clone, so perhaps both
- run: |
gap -c 'LoadPackage("PackageManager"); InstallPackage("cvec"); QUIT;'and also
- run: |
gap -c 'LoadPackage("PackageManager"); InstallPackage("https://github.com/gap-packages/cvec"); QUIT;'could be useful examples ?
There was a problem hiding this comment.
I've added this as part of the second example now: one step using git clone in $HOME/.gap/pkg, a second using PackageManager.
| run: | | ||
| GAPROOT="$HOME/gap" | ||
| mkdir -p $GAPROOT | ||
| echo "GAPROOT=$GAPROOT" >> "$GITHUB_ENV" |
There was a problem hiding this comment.
Currently also build-pkg-docs sets GAPROOT in $GITHUB_ENV like that. But of course it "belongs" into setup-gap. So as a note to self: the next breaking version of build-pkg-docs probably should do away with setting GAPROOT (and GAP) in the environment.
|
I'd like to reiterate that all my ramblings are not meant to delay this PR which is huge and already does a lot. I'd be fine with merging, then turning my suggestions into issues (or just following them up with further PRs). This might also make it easier to collaborate on certain fixes... but in the end, do it the way that works best for you, @stertooy -- I simply want to make sure you don't get frustrated by me constantly having additional ideas or requests ;-) |
Co-authored-by: Max Horn <max@quendi.de>
|
No frustrations here, I appreciate the helpful feedback! As for merging this PR: I think we should decide on the $GAP variable first, since that may impact (the development of) other actions. Refinements to the README and switching to the JSON file should not impact users or other actions, so those could be done after a release. |
README.md
Outdated
| - `gap-pkgs-to-build`: | ||
| - A space-separated list of the GAP packages to build. | ||
| - default: `'io json profiling'` |
There was a problem hiding this comment.
Why do we now also build json?
I really would like to just get rid of gap-pkgs-to-build as soon as possible. I just made gap-actions/process-coverage#22 to this end
There was a problem hiding this comment.
It's needed for the release-pkg action.
I'm fine with opening a similar PR to release-pkg and removing this input here before releasing v3?
There was a problem hiding this comment.
Sounds good to me. I'll work on getting gap-actions/process-coverage#22 ready and once that is good we can replicate it for release-pkg.
In the meantime, none of this needs to block this PR, as long as we still remove this before v3 is released.
This PR aims to tackle a few of the issues in this repo:
The input
gap-versioncan now take the following inputs:latest, which will build the latest release of GAP using the release tarball;defaultormasterormain, which will build the default branch of GAP usinggit clone;branchname, which will build the corresponding branch usinggit clone;tagname, which will build the corresponding tag usinggit clone;X.Y.ZorvX.Y.Z, which will build the corresponding release of GAP (including pre-releases), using the release tarball;XorvXorX.YorvX.Y, which will build the most recent release of GAP whose version is of the formX.Y.Z(excluding pre-releases), using the release tarball.The action now adds the variable
GAPROOTtoGITHUB_ENV, so it can be picked up by other steps/actions in a workflow following this action.At the same time, it is also ensured that GAP is available from
PATHby callinggap.The
repositoryinput allows downloading gap from other repositories.Support for 32-bit is completely dropped.
setup-gap@v3#47GAP_PKGS_TO_CLONEhas been removed completely. The inputGAP_PKGS_TO_BUILDwas renamed togap-pkgs-to-buildand is now intended only to build the packages that come with GAP (either from the release tarball or from runningmake bootstrap-pkg-full).HPCGAPinput has been removedioandprofilinghave not been removed from the defaultgap-pkgs-to-buildinput, andjsonhas in fact been added. This is a temporary measure, the plan is to let the actions using these packages take care of this themselves in the future.Other noteworthy changes:
GAP_BOOTSTRAPinput has been removed. It would have done nothing when GAP was built from a release tarball anyway, and setting this tominimalwas rarely done as most workflows/actions/tests required at least some package not found in the minimal setup.cygwinbranch (see Add support for building on Windows / Cygwin #18).tokenhas been added, which should be supplied with${{ secrets.GITHUB_TOKEN }}. This is used for authenticating with the GitHub API, which is very strongly rate-limited for unauthenticated users.Remarks / Questions:
Should
setup-cygwinbe a part of this action? Currently, to use this action on Windows, is needs to be preceded by something likeThat works just fine, but we could also do this as part of this action instead.
It is possible to build a particular PR (see Support building a particular GAP pull request #36) using the
repositoryandgap-versioninputs. But I could also allowgap-versionto take an input of the form#XYZWto do this automatically. E.g. given the inputsrepository: gap-system/gapandgap-version: #5956, the action would use the GitHub API to decide that it should build GAP using branchmh/proto-rereadingfrom repositoryfingolfin/gap. Should I add such mechanism to this PR?This action uses the GitHub API to get releases... so it only works with releases available on GitHub. In practice, this is v4.10.0 and later.
It appears that GAP versions < 4.13 do not work properly on the
macos-latestrunner. In particular:ABI=64causingI don't think it's worth looking into this since it only happens with old versions of GAP, but it might be prudent to warn users that we do not support the combination of gap <4.13 and MacOS runners?
Installing the bundled GMP on Cygwin sometimes fails, e.g. with
Again, I'm not sure whether it's worth looking into this any further, and we could just decide that Cygwin +
--with-gmp=builtinis not supported?It would probably be a good idea for other actions to use the
GAPROOTvariable and/or rungapin the command line instead of$HOME/gap/gap. In particular, these other actions could then be used with a docker container that also addsgaptoPATHand sets theGAPROOTvariable.As a "proof-of-concept": this workflow run uses the
run-pkg-testsworkflow, but with this PR instead of the usualsetup-gapand with gap-actions/setup-cygwin#14 instead of the usualsetup-cygwin.