Use rendered path geometry for curved mark interaction #189
Workflow file for this run
This file contains hidden or 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
| name: Chart library benchmarks | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| schedule: | |
| - cron: '17 7 * * 1' | |
| workflow_dispatch: | |
| inputs: | |
| upload_bundle_baseline_candidate: | |
| description: Upload exact comparison bundle measurements | |
| required: false | |
| type: boolean | |
| default: false | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: chart-library-benchmarks-${{ github.event_name }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| static: | |
| name: Static checks | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 15 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| - name: Run cached validation graph | |
| run: pnpm run validate | |
| - name: Check React Native POC types | |
| run: pnpm react-native:poc:types | |
| - name: Upload production catalog | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| with: | |
| name: charts-catalog-${{ github.sha }} | |
| path: .catalog-artifact | |
| if-no-files-found: error | |
| include-hidden-files: true | |
| bundle-baseline: | |
| name: Bundle baseline | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| - name: Check comparison bundle baseline | |
| id: benchmark-check | |
| run: pnpm benchmark:check | |
| - name: Upload comparison bundle baseline candidate | |
| if: ${{ always() && steps.benchmark-check.outcome != 'skipped' && (steps.benchmark-check.outcome == 'failure' || inputs.upload_bundle_baseline_candidate) }} | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| with: | |
| name: comparison-bundle-baseline-${{ github.sha }} | |
| path: .benchmark-output/results/bundle-baseline.candidate.json | |
| if-no-files-found: error | |
| compare: | |
| name: Comparison (${{ matrix.chart }}) | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 20 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| chart: | |
| - line | |
| - bar | |
| - area | |
| - scatter | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| with: | |
| playwright: 'true' | |
| - name: Run comparison shard | |
| run: pnpm benchmark -- --profile=ci --chart=${{ matrix.chart }} | |
| - name: Publish comparison summary | |
| if: success() | |
| run: | | |
| summaries=(.benchmark-output/results/*.md) | |
| test -e "${summaries[0]}" | |
| cat "${summaries[@]}" >> "$GITHUB_STEP_SUMMARY" | |
| - name: Upload comparison | |
| if: always() | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| with: | |
| name: chart-library-comparison-${{ matrix.chart }}-${{ github.run_id }} | |
| path: .benchmark-output/results | |
| if-no-files-found: error | |
| stress: | |
| name: Stress (${{ matrix.name }}) | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 25 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - name: raw | |
| workloads: raw-line,raw-scatter,interactive-scatter | |
| - name: envelopes | |
| workloads: binned-density,pixel-envelope,viewport-envelope | |
| - name: transforms | |
| workloads: stats-multi-series-line,rolling-keyed-window,histogram-128 | |
| - name: collections | |
| workloads: top-categories,dashboard-lines | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| persist-credentials: false | |
| - name: Setup | |
| uses: ./.github/actions/setup | |
| with: | |
| playwright: 'true' | |
| - name: Validate stress workload invariants | |
| run: pnpm exec vitest run benchmarks/comparison/stress | |
| - name: Run quick stress shard | |
| if: github.event_name == 'pull_request' || github.event_name == 'push' | |
| run: pnpm benchmark:stress:quick -- --workload=${{ matrix.workloads }} | |
| - name: Run standard stress shard | |
| if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | |
| run: pnpm benchmark:stress:standard -- --workload=${{ matrix.workloads }} | |
| - name: Publish stress summary | |
| if: success() | |
| run: | | |
| summaries=(.benchmark-output/stress/results/*.md) | |
| test -e "${summaries[0]}" | |
| cat "${summaries[@]}" >> "$GITHUB_STEP_SUMMARY" | |
| - name: Upload stress results | |
| if: always() | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0 | |
| with: | |
| name: chart-library-stress-${{ matrix.name }}-${{ github.run_id }} | |
| path: .benchmark-output/stress/results | |
| if-no-files-found: error | |
| ci: | |
| name: CI | |
| if: always() | |
| needs: | |
| - static | |
| - bundle-baseline | |
| - compare | |
| - stress | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 5 | |
| steps: | |
| - name: Require every CI partition | |
| env: | |
| STATIC_RESULT: ${{ needs.static.result }} | |
| BUNDLE_RESULT: ${{ needs.bundle-baseline.result }} | |
| COMPARISON_RESULT: ${{ needs.compare.result }} | |
| STRESS_RESULT: ${{ needs.stress.result }} | |
| run: | | |
| for result in \ | |
| "$STATIC_RESULT" \ | |
| "$BUNDLE_RESULT" \ | |
| "$COMPARISON_RESULT" \ | |
| "$STRESS_RESULT" | |
| do | |
| test "$result" = success | |
| done | |
| publish-catalog: | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| needs: | |
| - static | |
| - ci | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 10 | |
| concurrency: | |
| group: catalog-dist-publication | |
| cancel-in-progress: false | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Download validated catalog | |
| uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0 | |
| with: | |
| name: charts-catalog-${{ github.sha }} | |
| path: .catalog-artifact | |
| - name: Publish generated catalog | |
| env: | |
| CATALOG_BRANCH: catalog-dist | |
| run: | | |
| source_revision="$(jq -er '.revision | select(test("^[0-9a-f]{40}$"))' .catalog-artifact/catalog.json)" | |
| if [ "$source_revision" != "$GITHUB_SHA" ]; then | |
| echo "Catalog revision $source_revision does not match workflow revision $GITHUB_SHA." >&2 | |
| exit 1 | |
| fi | |
| git fetch origin main:refs/remotes/origin/main | |
| if ! git merge-base --is-ancestor "$source_revision" origin/main; then | |
| echo "Catalog revision $source_revision is not on the current main branch." >&2 | |
| exit 1 | |
| fi | |
| publication_dir="$(mktemp -d)" | |
| if git ls-remote --exit-code --heads origin "$CATALOG_BRANCH" >/dev/null 2>&1; then | |
| git fetch origin "$CATALOG_BRANCH" | |
| git worktree add -B "$CATALOG_BRANCH" "$publication_dir" "origin/$CATALOG_BRANCH" | |
| else | |
| git worktree add --detach "$publication_dir" | |
| git -C "$publication_dir" switch --orphan "$CATALOG_BRANCH" | |
| fi | |
| if [ -f "$publication_dir/catalog.json" ]; then | |
| published_revision="$(jq -er '.revision | select(test("^[0-9a-f]{40}$"))' "$publication_dir/catalog.json")" | |
| if [ "$published_revision" = "$source_revision" ]; then | |
| exit 0 | |
| fi | |
| if git merge-base --is-ancestor "$published_revision" origin/main 2>/dev/null; then | |
| if git merge-base --is-ancestor "$source_revision" "$published_revision"; then | |
| echo "Skipping stale catalog revision $source_revision; $published_revision is already published." | |
| exit 0 | |
| fi | |
| if ! git merge-base --is-ancestor "$published_revision" "$source_revision"; then | |
| echo "Catalog revision $source_revision diverges from published revision $published_revision." >&2 | |
| exit 1 | |
| fi | |
| else | |
| echo "Replacing legacy catalog revision $published_revision with canonical main revision $source_revision." | |
| fi | |
| fi | |
| git -C "$publication_dir" rm -rf --ignore-unmatch . | |
| cp -R "$GITHUB_WORKSPACE/.catalog-artifact/." "$publication_dir/" | |
| git -C "$publication_dir" add --all | |
| if git -C "$publication_dir" diff --cached --quiet; then | |
| exit 0 | |
| fi | |
| git -C "$publication_dir" config user.name "github-actions[bot]" | |
| git -C "$publication_dir" config user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
| git -C "$publication_dir" commit -m "Publish catalog $GITHUB_SHA" | |
| git -C "$publication_dir" push origin "HEAD:$CATALOG_BRANCH" |