|
23 | 23 | outputs: |
24 | 24 | stackgl_modules: ${{ steps.check.outputs.stackgl_modules }} |
25 | 25 | topojson: ${{ steps.check.outputs.topojson }} |
| 26 | + regl_codegen: ${{ steps.check.outputs.regl_codegen }} |
26 | 27 | steps: |
27 | 28 | - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 |
28 | 29 | with: |
|
42 | 43 | if git diff --name-only "$BASE"...HEAD -- stackgl_modules/ | grep -q .; then |
43 | 44 | echo "stackgl_modules=true" >> "$GITHUB_OUTPUT" |
44 | 45 | fi |
| 46 | + if git diff --name-only "$BASE"...HEAD -- src/traces/scattergl/ src/traces/scatterpolargl/ src/traces/splom/ src/traces/parcoords/ src/lib/prepare_regl.js stackgl_modules/ devtools/regl_codegen/ | grep -q .; then |
| 47 | + echo "regl_codegen=true" >> "$GITHUB_OUTPUT" |
| 48 | + fi |
45 | 49 |
|
46 | 50 | # ============================================================ |
47 | 51 | # Root build job - all dependent jobs fan out from here |
@@ -753,3 +757,43 @@ jobs: |
753 | 757 | name: topojson-dist |
754 | 758 | retention-days: 7 |
755 | 759 | path: topojson/dist/ |
| 760 | + |
| 761 | + check-regl-codegen: |
| 762 | + needs: [detect-changes, install-and-cibuild] |
| 763 | + if: needs.detect-changes.outputs.regl_codegen == 'true' |
| 764 | + runs-on: ubuntu-latest |
| 765 | + timeout-minutes: 10 |
| 766 | + steps: |
| 767 | + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6 |
| 768 | + - uses: ./.github/actions/setup-workspace |
| 769 | + - uses: ./.github/actions/setup-chrome |
| 770 | + |
| 771 | + - name: Run regl codegen |
| 772 | + run: | |
| 773 | + node devtools/regl_codegen/server.mjs & |
| 774 | + SERVER_PID=$! |
| 775 | + until curl -sf -o /dev/null http://localhost:3000/build/regl_codegen-bundle.js 2>/dev/null; do |
| 776 | + sleep 1 |
| 777 | + done |
| 778 | + $CHROME_BIN --headless=new --no-sandbox --enable-unsafe-swiftshader --ignore-gpu-blocklist http://localhost:3000/devtools/regl_codegen/index.html & |
| 779 | + wait $SERVER_PID |
| 780 | +
|
| 781 | + - name: Check regl precompiled shaders are up to date |
| 782 | + run: | |
| 783 | + if ! git diff --exit-code src/generated/regl-codegen/ src/traces/scattergl/regl_precompiled.js src/traces/scatterpolargl/regl_precompiled.js src/traces/splom/regl_precompiled.js src/traces/parcoords/regl_precompiled.js; then |
| 784 | + echo "::error::Regl precompiled shaders are out of date. Download the 'regl-codegen' artifact from this workflow run and commit the updated files to this pull request." |
| 785 | + exit 1 |
| 786 | + fi |
| 787 | +
|
| 788 | + - uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 |
| 789 | + name: Upload updated regl codegen files |
| 790 | + if: failure() |
| 791 | + with: |
| 792 | + name: regl-codegen |
| 793 | + retention-days: 7 |
| 794 | + path: | |
| 795 | + src/generated/regl-codegen/ |
| 796 | + src/traces/scattergl/regl_precompiled.js |
| 797 | + src/traces/scatterpolargl/regl_precompiled.js |
| 798 | + src/traces/splom/regl_precompiled.js |
| 799 | + src/traces/parcoords/regl_precompiled.js |
0 commit comments