Scheduled #1579
This file contains 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: Scheduled | |
on: | |
schedule: | |
- cron: '0 19 * * *' | |
workflow_dispatch: | |
permissions: | |
# Allow `github-pages-deploy-action` to write to `gh-pages` branch | |
contents: write | |
jobs: | |
benchmark: | |
continue-on-error: true | |
strategy: | |
max-parallel: 2 | |
matrix: | |
include: | |
- case: rspack-binary-size | |
product: RSPACK | |
- case: rsbuild-react | |
product: RSBUILD | |
- case: rsbuild-vue3 | |
product: RSBUILD | |
- case: rsbuild-lit | |
product: RSBUILD | |
- case: rsbuild-svelte | |
product: RSBUILD | |
- case: rsbuild-vanilla | |
product: RSBUILD | |
- case: rsbuild-arco-pro | |
product: RSBUILD | |
- case: rsbuild-react-app-10k | |
product: RSBUILD | |
- case: rspress-minimal | |
product: RSPRESS | |
- case: rspress-website | |
product: RSPRESS | |
- case: rspress-website-mdxjs | |
product: RSPRESS | |
- case: rslib-node-basic | |
product: RSLIB | |
- case: rslib-react-basic | |
product: RSLIB | |
- case: app-minimal | |
product: MODERNJS_FRAMEWORK | |
- case: app-initial | |
product: MODERNJS_FRAMEWORK | |
- case: app-initial-rspack | |
product: MODERNJS_FRAMEWORK | |
- case: app-tailwind | |
product: MODERNJS_FRAMEWORK | |
- case: app-ssr | |
product: MODERNJS_FRAMEWORK | |
- case: app-ssg | |
product: MODERNJS_FRAMEWORK | |
- case: app-bff-koa | |
product: MODERNJS_FRAMEWORK | |
- case: app-arco-pro | |
product: MODERNJS_FRAMEWORK | |
- case: app-arco-pro-swc | |
product: MODERNJS_FRAMEWORK | |
- case: app-arco-pro-esbuild | |
product: MODERNJS_FRAMEWORK | |
- case: app-arco-pro-rspack | |
product: MODERNJS_FRAMEWORK | |
# Use `ubuntu-latest` for `rspack-binary-size` | |
# Use self-hosted runner for other bench cases | |
runs-on: ${{ matrix.case == 'rspack-binary-size' && 'ubuntu-latest' || fromJSON(vars.SELF_LINUX_LABELS || '"ubuntu-latest"') }} | |
steps: | |
- name: Print runner context | |
env: | |
RUNNER_CONTEXT: ${{ toJson(runner) }} | |
run: echo "$RUNNER_CONTEXT" | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 1 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache-dependency-path: pnpm-lock.yaml | |
- name: Activate corepack | |
shell: bash | |
run: | | |
# corepack > 0.24.1 will use native fetch | |
# and native fetch not support HTTP_PROXY | |
# https://github.com/nodejs/undici/issues/1650 | |
npm install -g [email protected] | |
corepack enable | |
- name: Install Pnpm | |
run: pnpm -v && pnpm store path | |
- name: Cache pnpm cache | |
uses: actions/cache@v3 | |
if: ${{ startsWith(runner.name, 'GitHub Actions') }} | |
with: | |
path: | | |
~/.cache/pnpm | |
key: ${{ runner.os }}-pnpm-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}-pnpm- | |
- name: Install Dependencies | |
run: pnpm run install:scripts | |
- name: 🚀 Run benchmark | |
run: cd scripts && pnpm start ${{ matrix.product }} ${{ matrix.case }} | |
- name: Setup git user | |
run: | | |
git config --global user.name "github-actions[bot]" | |
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | |
- name: Install rsync | |
# Only needed for self-hosted runners | |
if: ${{ matrix.case != 'rspack-binary-size' }} | |
run: | | |
apt-get update && apt-get install -y rsync | |
- name: Update data | |
uses: JamesIves/[email protected] | |
with: | |
branch: gh-pages | |
folder: data | |
target-folder: data | |
git-config-name: gh-pages-bot | |
git-config-email: 41898282+github-actions[bot]@users.noreply.github.com | |
clean: false |