-
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
Merged
bashbaug
merged 12 commits into
KhronosGroup:main
from
bashbaug:switch-to-github-actions
Mar 26, 2024
Merged
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
4ce8750
WIP First stab at Github Actions
kpet f778192
sudo
kpet d310090
remove travis config
kpet 676bb12
Merge branch 'main' into actions
bashbaug 5c8ff71
change travis builds to only build on tags
bashbaug 9cad3bf
sync GitHub actions with travis script
bashbaug 85fd9a7
configure dependabot github actions version updates
bashbaug 10540ef
update gem versions
bashbaug 2ee25fb
add libwebp-dev dependency for asciidoctor-mathematical
bashbaug 2b8c2c2
minor updates
bashbaug a18ad84
Merge branch 'main' into switch-to-github-actions
bashbaug 201e037
update for the new spec toolchain
bashbaug File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "monthly" | ||
groups: | ||
github-actions: | ||
patterns: | ||
- "*" |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Presubmit | ||
|
||
permissions: | ||
contents: read | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
name: Build all specs | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
submodules: recursive | ||
|
||
- name: Install required packages | ||
run: | | ||
sudo apt-get install -y libpango1.0-dev libwebp-dev ghostscript fonts-lyx jing libavalon-framework-java libbatik-java python3-pyparsing | ||
sudo gem install asciidoctor -v 2.0.16 | ||
sudo gem install coderay -v 1.1.1 | ||
sudo gem install rouge -v 3.19.0 | ||
sudo gem install ttfunk -v 1.7.0 | ||
sudo gem install hexapdf -v 0.27.0 | ||
sudo gem install asciidoctor-pdf -v 2.3.4 | ||
sudo gem install asciidoctor-mathematical -v 0.3.5 | ||
sudo pip install pyparsing | ||
|
||
- name: List git tag | ||
run: | | ||
git describe --tags --dirty | ||
|
||
- name: Generate core specs (HTML and PDF) | ||
run: | | ||
python3 makeSpec -clean -spec core OUTDIR=out.core -j 5 api c env ext cxx4opencl | ||
|
||
- name: Generate core + extension specs (HTML) | ||
run: | | ||
python3 makeSpec -clean -spec khr OUTDIR=out.khr -j 12 html | ||
|
||
- name: Generate reference pages | ||
run: | | ||
python3 makeSpec -spec khr OUTDIR=out.refpages -j 12 manhtmlpages | ||
|
||
- name: Validate XML | ||
run: | | ||
make -C xml validate |
This file contains 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
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.
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:
@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.
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.