-
Notifications
You must be signed in to change notification settings - Fork 113
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switch to GitHub Actions for CI #1085
Switch to GitHub Actions for CI #1085
Conversation
I've updated this so it works with the new spec toolchain, now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks fine overall. Left one question.
|
||
- name: Generate core + extension specs (HTML) | ||
run: | | ||
python3 makeSpec -clean -spec khr OUTDIR=out.khr -j 12 html |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why aren't you generating the PDFs as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was trying to more-or-less faithfully follow what the Travis script was doing previously. It generated both PDF and HTML versions of the "core" specs, but only HTML versions of the "khr" specs.
Here are the relevant lines from the Travis script:
- python3 makeSpec -clean -spec core OUTDIR=out.core -j 5 api c env ext cxx4opencl
- python3 makeSpec -clean -spec khr OUTDIR=out.khr -j 12 html manhtmlpages
@oddhack any specific reason for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generating the PDF is in there just to verify the PDF pipeline is working. There aren't structural elements in the extension spec that would challenge it any more than the core spec, and PDF generation is by far the slowest operation, so I only do it once.
The -j 12 is because there are a lot of manhtmlpages to generate, each quite fast. Very unlikely we would actually get 12 cores of CI though, I think the GH runners only have two.
If there's some reason people need the PDF artifacts then they can be built, of course. But for Vulkan purposes, CI is just checking that the pipeline works - our publication artifacts are built outside of CI.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this running as a pre-commit filter, as the YML filename suggests? If so, that's another reason to avoid PDF generation as much as possible since that lengthens the loop.
We've done OK in Vulkan just making spec generation part of the regular post-commit CI step and fixing things after the fact, FWIW.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this running as a pre-commit filter, as the YML filename suggests?
We currently run it on pushes and pull requests, so it's both a pre-commit filter and a post-commit validation. I suppose we could separate that if needed, although the current job executes pretty quickly. Looking at the latest run, it completed in ~3 minutes: One minute of that was installing packages, and another minute was building the online reference pages. Spec-wise, HTML generation took ~10 seconds, and HTML + PDF generation took ~35 seconds.
What I like to do in workflows like these is to also push the changes in generated files to another ref: FYI this cannot spawn another workflow on the branch with changes - GitHub is protected against recursive workflow runs even if you don't specify branch exclusion in triggers. |
There are always going to be differences in the generated PDF / HTML specs just because they encode the generation time and commit ID into the documents, if nothing else. Also PDF / HTML specs are large and will build up rapidly over time, so some mechanism to be confident that the deleted artifacts are really removed would be helpful if this is done. |
Well, how I always implemented it, the However, having constant changes does make this pattern less comfortable to use. |
This change:
We'll want to test (2) carefully before any spec releases since I suspect the Travis builds will eventually stop working. We eventually should switch deployments to GitHub actions, at which point we can stop building with Travis entirely. In the meantime, though, this should enable ordinary CI builds to finish much faster. As an example: my test builds were completing in ~3 minutes, whereas Travis builds from this morning are still waiting.