Skip to content

chore(deps): update github actions #145

chore(deps): update github actions

chore(deps): update github actions #145

Workflow file for this run

name: CI
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
types: [opened, synchronize]
concurrency:
group: ${{ github.workflow }}-${{ github.ref_name }}-${{ github.event.pull_request.number || github.sha }}
cancel-in-progress: ${{ github.ref_name != 'main' }}
jobs:
benchmark:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
steps:
- uses: taiki-e/checkout-action@b13d20b7cda4e2f325ef19895128f7ff735c0b3d # v1.3.1
- uses: oxc-project/setup-node@8958a8e040102244b619c4a94fccb657a44b1c21 # v1.0.6
- uses: oven-sh/setup-bun@b7a1c7ccf290d58743029c4f6903da283811b979 # v2.1.0
- name: Install hyperfine
uses: taiki-e/install-action@cc33365ec7e3350bc47bf935f247582cc6f68344 # v2.65.12
with:
tool: hyperfine
- name: Test Vite build
working-directory: apps/10000
run: |
node --run build:vite
ls -lh dist-vite
- name: Test Rsbuild build
working-directory: apps/10000
run: |
node --run build:rsbuild
ls -lh dist-rsbuild
- name: Test Rspack build
working-directory: apps/10000
run: |
node --run build:rspack
ls -lh dist-rspack
- name: Test Rolldown build
working-directory: apps/10000
run: |
node --run build:rolldown
ls -lh dist-rolldown
- name: Test esbuild build
working-directory: apps/10000
run: |
node --run build:esbuild
ls -lh dist-esbuild
- name: Test Bun build
working-directory: apps/10000
run: |
node --run build:bun
ls -lh dist-bun
- name: Run benchmark
run: node bench.mjs --app apps/10000 > benchmark-output.txt
- name: Upload benchmark results
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: benchmark-${{ matrix.os }}
path: benchmark-output.txt
update-readme:
needs: benchmark
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
permissions:
contents: write
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
token: ${{ secrets.TOKEN }}
- name: Download all benchmark results
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
path: ./results
- uses: oxc-project/setup-node@8958a8e040102244b619c4a94fccb657a44b1c21 # v1.0.6
- name: Update README
run: node scripts/update-readme.mjs
- uses: stefanzweifel/git-auto-commit-action@04702edda442b2e678b25b537cec683a1493fcb9 # v7.1.0
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
with:
commit_message: 'chore: update benchmark results in README [skip ci]'
file_pattern: README.md