ci: Add CI step to check if precompiled regl shaders need to be updated#7786
ci: Add CI step to check if precompiled regl shaders need to be updated#7786camdecoster wants to merge 6 commits into
Conversation
| # stackgl_modules/ is listed here too because the regl-* shader libs live there; | ||
| # changes can alter shader output and require regenerating the precompiled shaders. |
There was a problem hiding this comment.
Adding an additional line of explanation (feel free to adjust if not accurate)
| # stackgl_modules/ is listed here too because the regl-* shader libs live there; | |
| # changes can alter shader output and require regenerating the precompiled shaders. | |
| # If any of the directories listed below have changed, we need to re-run the regl-codegen step | |
| # stackgl_modules/ is listed here too because the regl-* shader libs live there; | |
| # changes can alter shader output and require regenerating the precompiled shaders. |
| check-regl-codegen: | ||
| needs: [detect-changes, install-and-cibuild] | ||
| if: >- | ||
| (github.event_name == 'push' && github.ref_name == github.event.repository.default_branch) || |
There was a problem hiding this comment.
@camdecoster Does this mean the job will only be triggered on push to master?
There was a problem hiding this comment.
We want it to run on pull requests also, right?
|
|
||
| If you are implementing a new feature that involves regl shaders, or if you are | ||
| making changes that affect the usage of regl shaders, you would need to run | ||
| making changes that affect the usage of regl shaders, you would need to regenerate the precompiled regl shader code. |
There was a problem hiding this comment.
| making changes that affect the usage of regl shaders, you would need to regenerate the precompiled regl shader code. | |
| making changes that affect the usage of regl shaders, you will need to regenerate the precompiled regl shader code. |
| If you are implementing a new feature that involves regl shaders, or if you are | ||
| making changes that affect the usage of regl shaders, you would need to run | ||
| making changes that affect the usage of regl shaders, you would need to regenerate the precompiled regl shader code. |
There was a problem hiding this comment.
"if you are making changes that affect the usage of regl shaders"
How would a contributor know whether this applies to them? Is it a "if you know, you know" type of situation? Or, is there a list of files which, if they are changed, the regl shader code will definitely need to be regenerated?
| 2. Delete `src/generated/regl-codegen/` in your working tree, then unzip the | ||
| artifact at the repo root so it replaces (rather than merges into) the | ||
| existing directory. Also overwrite the four `regl_precompiled.js` files | ||
| under `src/traces/{scattergl,scatterpolargl,splom,parcoords}/`. |
There was a problem hiding this comment.
I don't quite follow this -- will these regl_precompiled.js files be nested inside src/generated/regl-codegen/?
If you have a link to an uploaded artifact, I can verify
| The `rm -rf` mirrors what CI does, so any orphaned shader files left over from | ||
| previous changes get cleaned up. `npm run regl-codegen` will prompt you to open a |
There was a problem hiding this comment.
| The `rm -rf` mirrors what CI does, so any orphaned shader files left over from | |
| previous changes get cleaned up. `npm run regl-codegen` will prompt you to open a | |
| The `rm -rf` step is needed to clean up any orphaned shader files left over from | |
| previous changes. `npm run regl-codegen` will prompt you to open a |
| browser window, run through all traces with 'regl' in the tags, and store the | ||
| captured code into | ||
| [src/generated/regl-codegen](https://github.com/plotly/plotly.js/blob/master/src/generated/regl-codegen). |
There was a problem hiding this comment.
Some of the captured code will also be stored into src/traces/{scattergl,scatterpolargl,splom,parcoords}/, right?
Or do those files need to be moved manually?
Description
Add a CI step to check if precompiled regl shaders need to be updated.
Closes #7785.
Changes
Testing
Notes