Repository navigation
[rocjitsu][web] Add web deployment workflow #12588
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
Merged
Merged
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
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 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
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
| 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: | | ||
| 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 | ||
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
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
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
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
| 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`. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| /node_modules/ | ||
|
RattataKing marked this conversation as resolved.
Resolved
|
||
| /dist/ | ||
| /.test-dist/ | ||
| /.test-data/ | ||
| /.vite/ | ||
| /coverage/ | ||
| /test-results/ | ||
| /playwright-report/ | ||
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
| 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. |
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.