diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 0000000..193f77d --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,57 @@ +name: Generate and deploy GH pages from Vue + +on: + # Runs on pushes targeting the default branch + push: + branches: ["main"] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages +permissions: + contents: read + pages: write + id-token: write + +# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. +# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + build: + name: Generate dist directory and build with Jekyll + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup Node.js + uses: actions/setup-node@v3 + with: + node-version: '18' + - name: Install dependencies + run: npm install + - name: Build dist + run: npm run build + - name: Setup Pages + uses: actions/configure-pages@v5 + - name: Build with Jekyll + uses: actions/jekyll-build-pages@v1 + with: + source: ./dist + destination: ./_site + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a547bf3 --- /dev/null +++ b/.gitignore @@ -0,0 +1,24 @@ +# Logs +logs +*.log +npm-debug.log* +yarn-debug.log* +yarn-error.log* +pnpm-debug.log* +lerna-debug.log* + +node_modules +dist +dist-ssr +*.local + +# Editor directories and files +.vscode/* +!.vscode/extensions.json +.idea +.DS_Store +*.suo +*.ntvs* +*.njsproj +*.sln +*.sw? diff --git a/.prettierrc.json b/.prettierrc.json new file mode 100644 index 0000000..3fa24a2 --- /dev/null +++ b/.prettierrc.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://json.schemastore.org/prettierrc", + "plugins": ["prettier-plugin-organize-imports"], + "semi": false, + "tabWidth": 2, + "singleQuote": true, + "printWidth": 100, + "trailingComma": "all", + "organizeImportsSkipDestructiveCodeActions": true, + "experimentalTernaries": true +} \ No newline at end of file diff --git a/.vscode/extensions.json b/.vscode/extensions.json new file mode 100644 index 0000000..a7cea0b --- /dev/null +++ b/.vscode/extensions.json @@ -0,0 +1,3 @@ +{ + "recommendations": ["Vue.volar"] +} diff --git a/README.md b/README.md index 6295c8d..4bccc4e 100644 --- a/README.md +++ b/README.md @@ -1,7 +1,9 @@ # Stdlib and Engine benchmark results This repository hosts results from benchmarks from the [enso repo](https://github.com/enso-org/enso). This repo has GH pages enabled and hosts them at [https://enso-org.github.io/engine-benchmark-results/](https://enso-org.github.io/engine-benchmark-results/). +It is a VueJS single-page-application. +## Data The benchmarks are scheduled in [Benchmark Engine](https://github.com/enso-org/enso/actions/workflows/engine-benchmark.yml) and [Benchmark Standard Libraries](https://github.com/enso-org/enso/actions/workflows/std-libs-benchmark.yml) GH Actions. The results from these actions are gathered by another GH Action [Benchmarks Upload](https://github.com/enso-org/enso/actions/workflows/bench-upload.yml) @@ -11,7 +13,33 @@ There is a special `cache/index.json` file that maps json file names to their ti The `Benchmarks Upload` actions the runs [website_regen.py](https://github.com/enso-org/enso/blob/develop/tools/performance/engine-benchmarks/website_regen.py) script. -For more info, see: +## Contributing +Run the dev server with `npm install && npx vite`. + + +### Building static sites from Vue +Run `npm run build` to build the static site. +The output will be in the `dist` directory. +Run `npm run preview` to serve the `dist` directory. + +## Technology stack +- [Vue-chartjs](https://vue-chartjs.org/) + - For plotting +- [Pinia](https://pinia.vuejs.org/) + - For global state management +- [Vuetify](https://vuetifyjs.com/en/) + - Material component library for Vue + +## References - [enso-org/enso:tools/performance/engine-benchmarks](https://github.com/enso-org/enso/blob/develop/tools/performance/engine-benchmarks/README.md) - - This is a directory with Python package that deals with benchmarks - regenerate HTML website, gather results from GH artifacts and upload them to this repo, etc. + - This is a directory with Python package that deals with benchmarks - regenerate HTML website, gather results from GH artifacts and upload them to this repo, etc. - [enso-org/enso:docs/infrastructure/benchmarks.md](https://github.com/enso-org/enso/blob/develop/docs/infrastructure/benchmarks.md#visualization) +- https://mkay11.medium.com/how-to-deploy-your-vite-vue-3-application-in-github-pages-2023-2b842f50576a + +## Legacy static webpages +The old static webpages are still generated inside `stdlib-benchs.html` +and `engine-benchs.html` files and included in the deployed GH pages. +They will be removed as soon as the data format is changed. +Accessible via these URLs: +- https://enso-org.github.io/engine-benchmark-results/stdlib-benchs.html +- https://enso-org.github.io/engine-benchmark-results/engine-benchs.html diff --git a/eslint.config.js b/eslint.config.js new file mode 100644 index 0000000..532a94f --- /dev/null +++ b/eslint.config.js @@ -0,0 +1,30 @@ +import { FlatCompat } from '@eslint/eslintrc' +import eslintJs from '@eslint/js' + +const compat = new FlatCompat() + +const conf = [ + { + ignores: ['dist'], + }, + ...compat.extends('plugin:vue/vue3-recommended'), + eslintJs.configs.recommended, + ...compat.extends('@vue/eslint-config-typescript', '@vue/eslint-config-prettier'), + { + rules: { + camelcase: [1, { ignoreImports: true }], + 'no-inner-declarations': 0, + 'vue/attribute-hyphenation': [2, 'never'], + 'vue/v-on-event-hyphenation': [2, 'never'], + '@typescript-eslint/no-unused-vars': [ + 1, + { + varsIgnorePattern: '^_', + argsIgnorePattern: '^_', + }, + ], + }, + }, +] + +export default conf diff --git a/index.html b/index.html index 8bfded2..d1a2cd0 100644 --- a/index.html +++ b/index.html @@ -1,51 +1,12 @@ - - + -
- - -