Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/rocjitsu-benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ jobs:
repository: ROCm/rocm-systems
path: dashboard
persist-credentials: false
sparse-checkout: emulation/rocjitsu/website
sparse-checkout: emulation/rocjitsu/website/dashboard

- name: Set up publisher Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
Expand Down Expand Up @@ -233,7 +233,7 @@ jobs:
--is-beta
)

node "${GITHUB_WORKSPACE}/dashboard/emulation/rocjitsu/website/scripts/validate-dashboard-data.mjs" \
node "${GITHUB_WORKSPACE}/dashboard/emulation/rocjitsu/website/dashboard/scripts/validate-dashboard-data.mjs" \
"${GITHUB_WORKSPACE}/publication/rocjitsu-dashboard/data"

git add rocjitsu-dashboard/data
Expand Down
66 changes: 66 additions & 0 deletions .github/workflows/rocjitsu-publish-website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Publish the Rocjitsu dashboard from develop.
# A change under emulation/rocjitsu/website/dashboard/ replaces gh-pages/rocjitsu-dashboard/.

name: "rocjitsu-publish-website"

on:
push:
branches:
- develop
paths:
- "emulation/rocjitsu/website/dashboard/**"
- ".github/workflows/rocjitsu-publish-website.yml"
workflow_dispatch:

permissions:
contents: read

concurrency:
group: rocjitsu-publish-website
cancel-in-progress: false

jobs:
publish:
name: Publish rocjitsu dashboard
if: github.ref == 'refs/heads/develop'
runs-on: ubuntu-latest
timeout-minutes: 20
steps:
- name: Check out repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: "22.13.0"
cache: npm
cache-dependency-path: emulation/rocjitsu/website/dashboard/package-lock.json

- name: Verify and build rocjitsu dashboard
working-directory: emulation/rocjitsu/website/dashboard
run: |
Comment thread
RattataKing marked this conversation as resolved.
Resolved
npm ci
npm run test:e2e:install
npm run verify

- name: Generate publishing token
id: app-token
uses: actions/create-github-app-token@df432ceedc7162793a195dd1713ff69aefc7379e # v2.0.6
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}
permission-contents: write

- name: Publish rocjitsu dashboard
uses: peaceiris/actions-gh-pages@84c30a85c19949d7eee79c4ff27748b70285e453 # v4.1.0
with:
# GITHUB_TOKEN pushes do not trigger branch-based Pages builds.
github_token: ${{ steps.app-token.outputs.token }}
publish_branch: gh-pages
publish_dir: ./emulation/rocjitsu/website/dashboard/dist
destination_dir: rocjitsu-dashboard
commit_message: "Publish rocjitsu dashboard"
# Skip the default root .nojekyll file so only rocjitsu-dashboard changes.
enable_jekyll: true
33 changes: 10 additions & 23 deletions .github/workflows/rocjitsu-website-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ name: "rocjitsu-website"
on:
pull_request:
paths:
- "emulation/rocjitsu/website/**"
- "emulation/rocjitsu/website/dashboard/**"
- ".github/workflows/rocjitsu-website-test.yml"
- ".github/workflows/rocjitsu-publish-website.yml"
push:
branches:
- develop
paths:
- "emulation/rocjitsu/website/**"
- "emulation/rocjitsu/website/dashboard/**"
- ".github/workflows/rocjitsu-website-test.yml"
- ".github/workflows/rocjitsu-publish-website.yml"
workflow_dispatch:

permissions:
Expand All @@ -27,7 +29,7 @@ jobs:
timeout-minutes: 10
defaults:
run:
working-directory: emulation/rocjitsu/website
working-directory: emulation/rocjitsu/website/dashboard
steps:
- name: Check out repository
uses: actions/checkout@v4
Expand All @@ -37,39 +39,24 @@ jobs:
with:
node-version: "22.13.0"
cache: npm
cache-dependency-path: emulation/rocjitsu/website/package-lock.json
cache-dependency-path: emulation/rocjitsu/website/dashboard/package-lock.json

- name: Install dependencies
run: npm ci

- name: Install Playwright browser
run: npm run test:e2e:install

- name: Lint
run: npm run lint

- name: Build
run: npm run build

- name: Run unit tests
run: npm run test:unit

- name: Run e2e tests
run: npm run test:e2e

- name: Smoke test production hosting and caching
run: npm run test:e2e:production

- name: Run chart race tests
run: npm run test:e2e:chart-race
- name: Verify website
run: npm run verify

- name: Upload Playwright diagnostics
if: ${{ !cancelled() && failure() }}
uses: actions/upload-artifact@v4
with:
name: rocjitsu-website-playwright-results
path: |
emulation/rocjitsu/website/test-results
emulation/rocjitsu/website/playwright-report
emulation/rocjitsu/website/dashboard/test-results
emulation/rocjitsu/website/dashboard/playwright-report
if-no-files-found: ignore
retention-days: 7
10 changes: 1 addition & 9 deletions emulation/rocjitsu/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,6 @@ __pycache__
.codex
.agents

# Website dependencies and generated artifacts
/website/node_modules/
/website/dist/
/website/.test-dist/
/website/.test-data/
/website/.vite/
/website/coverage/
/website/playwright-report/
/website/test-results/
# Local website settings
/website/**/*.local
/website/**/.DS_Store
3 changes: 2 additions & 1 deletion emulation/rocjitsu/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ configs/ GPU topology JSON files
schemas/ FlatBuffers schemas
tests/ Test suite
docs/ Design documents and guides
website/ React dashboard source and web tests
website/ Public web applications
dashboard/ React dashboard source and web tests
```

## Building
Expand Down
68 changes: 12 additions & 56 deletions emulation/rocjitsu/website/README.md
Original file line number Diff line number Diff line change
@@ -1,60 +1,16 @@
# Rocjitsu Simulation Performance Dashboard
# Rocjitsu web applications

React + Vite source for the Rocjitsu simulation-performance dashboard, with MUI components and
ECharts visualizations. This directory contains application source, build configuration,
and tests. Production builds fetch benchmark JSON from `rocjitsu-dashboard/data/` on
the `gh-pages-rocjitsu branch` in the `ROCm/rocm-systems` repository.
This directory contains the public web applications for Rocjitsu.

**Live website:** [RocJitsu Performance Dashboard](https://rocm.github.io/rocm-systems/rocjitsu-dashboard/)
| Directory | Purpose | Published path |
| --- | --- | --- |
| [dashboard/](dashboard/README.md) | Simulation-performance dashboard (React + Vite) | `/rocjitsu-dashboard/` |

## Quick start: preview with dummy data
Each application owns its dependencies, build configuration, and tests. See its
README for local development instructions. Canonical technical documentation
lives in [../docs/](../docs/).

Use npm and a Node.js version matching the `engines` field in [package.json](package.json).
From the `rocm-systems` repository root:

```bash
cd emulation/rocjitsu/website
npm ci
npm run build -- --mode fixtures
npm run preview -- --mode fixtures
```

Open http://localhost:4174 to visualize the website with dummy benchmark data.
Press **Ctrl+C** to stop the preview. The fixture build uses `.test-dist/` and the
fixture preview always uses port 4174; the production preview uses port 4173.

The production build writes application files to `dist/` without dummy data and loads
JSON from the [`gh-pages-rocjitsu` branch](https://raw.githubusercontent.com/ROCm/rocm-systems/refs/heads/gh-pages-rocjitsu/rocjitsu-dashboard/data/).
The data directory must contain `metadata.json`, `index.json`, `test-catalogs/`, and `runs/`.
Before every data publication, validate the complete staged data directory:

```bash
npm run validate:data -- /absolute/path/to/staged/data
```

Do not publish when this command fails. The browser assumes published input is valid
and fails closed instead of displaying partial history when invalid data bypasses the
publication gate.

See the [build and test guide](docs/build-and-test.md) for local development with
dummy data or a local data directory (`npm run dev:data -- <data-directory>`),
browser setup, verification commands, and the production build.

## Source layout

| Path | Purpose |
| --- | --- |
| `index.html`, `src/main.jsx` | Browser entry points |
| `src/components/`, `src/hooks/` | Views, shared components, interaction state |
| `src/data/` | Data loading, validation, selectors, comparison logic |
| `src/theme/`, `src/utils/`, `src/index.css` | Theme, chart/display helpers, styles |
| `package.json`, `package-lock.json` | Commands and reproducible dependency installation |
| `*.config.js` | Vite, ESLint, Vitest, and Playwright configuration |
| `tests/unit/`, `tests/e2e/`, `tests/fixtures/` | Tests, helpers, and dummy fixtures |
| `docs/` | Build, testing, hosting, and data-contract documentation |

## Further documentation

- [Website data contract](docs/website-data-contract.md): JSON schema, comparison
rules, and data publication requirements.
- [Test fixtures](tests/fixtures/README.md): focused test cases and generated history.
The [publishing workflow](../../../.github/workflows/rocjitsu-publish-website.yml)
publishes the dashboard from `develop` to `gh-pages/rocjitsu-dashboard/`. Moving
the source directory does not change that public URL or the benchmark-data
location on `gh-pages-rocjitsu`.
8 changes: 8 additions & 0 deletions emulation/rocjitsu/website/dashboard/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
/node_modules/
Comment thread
RattataKing marked this conversation as resolved.
Resolved
/dist/
/.test-dist/
/.test-data/
/.vite/
/coverage/
/test-results/
/playwright-report/
60 changes: 60 additions & 0 deletions emulation/rocjitsu/website/dashboard/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# Rocjitsu Simulation Performance Dashboard

React + Vite source for the Rocjitsu simulation-performance dashboard, with MUI components and
ECharts visualizations. This directory contains application source, build configuration,
and tests. Production builds fetch benchmark JSON from `rocjitsu-dashboard/data/` on
the `gh-pages-rocjitsu branch` in the `ROCm/rocm-systems` repository.

**Live website:** [RocJitsu Performance Dashboard](https://rocm.github.io/rocm-systems/rocjitsu-dashboard/)

## Quick start: preview with dummy data

Use npm and a Node.js version matching the `engines` field in [package.json](package.json).
From the `rocm-systems` repository root:

```bash
cd emulation/rocjitsu/website/dashboard
npm ci
npm run build -- --mode fixtures
npm run preview -- --mode fixtures
```

Open http://localhost:4174 to visualize the website with dummy benchmark data.
Press **Ctrl+C** to stop the preview. The fixture build uses `.test-dist/` and the
fixture preview always uses port 4174; the production preview uses port 4173.

The production build writes application files to `dist/` without dummy data and loads
JSON from the [`gh-pages-rocjitsu` branch](https://raw.githubusercontent.com/ROCm/rocm-systems/refs/heads/gh-pages-rocjitsu/rocjitsu-dashboard/data/).
The data directory must contain `metadata.json`, `index.json`, `test-catalogs/`, and `runs/`.
Before every data publication, validate the complete staged data directory:

```bash
npm run validate:data -- /absolute/path/to/staged/data
```

Do not publish when this command fails. The browser assumes published input is valid
and fails closed instead of displaying partial history when invalid data bypasses the
publication gate.

See the [build and test guide](docs/build-and-test.md) for local development with
dummy data or a local data directory (`npm run dev:data -- <data-directory>`),
browser setup, verification commands, and the production build.

## Source layout

| Path | Purpose |
| --- | --- |
| `index.html`, `src/main.jsx` | Browser entry points |
| `src/components/`, `src/hooks/` | Views, shared components, interaction state |
| `src/data/` | Data loading, validation, selectors, comparison logic |
| `src/theme/`, `src/utils/`, `src/index.css` | Theme, chart/display helpers, styles |
| `package.json`, `package-lock.json` | Commands and reproducible dependency installation |
| `*.config.js` | Vite, ESLint, Vitest, and Playwright configuration |
| `tests/unit/`, `tests/e2e/`, `tests/fixtures/` | Tests, helpers, and dummy fixtures |
| `docs/` | Build, testing, hosting, and data-contract documentation |

## Further documentation

- [Website data contract](docs/website-data-contract.md): JSON schema, comparison
rules, and data publication requirements.
- [Test fixtures](tests/fixtures/README.md): focused test cases and generated history.
Loading
Loading