cleanup #13
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: Package Manager Benchmarks | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
benchmark: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Install Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: '22' | |
- name: Install Tools | |
run: | | |
npm install -g vlt | |
curl -fsSL https://bun.sh/install | bash | |
curl -fsSL https://deno.land/x/install/install.sh | sh | |
sudo apt-get install -y hyperfine | |
- name: Run Benchmarks | |
run: | | |
echo "Benchmarking vlt..." | |
npm -v | |
hyperfine --warmup 3 -i --prepare 'rm -rf node_modules vlt-lock.json' 'vlt install' --export-markdown vlt.md | |
echo "Benchmarking npm..." | |
hyperfine --warmup 3 -i --prepare 'rm -rf node_modules package-lock.json .npmrc' 'npm install' --export-markdown npm.md | |
echo "Benchmarking yarn v1..." | |
hyperfine --warmup 3 -i --prepare 'rm -rf node_modules yarn.lock .yarnrc' 'yarn install' --export-markdown yarn.md | |
corepack enable yarn pnpm | |
echo "Benchmarking pnpm..." | |
hyperfine --warmup 3 -i --prepare 'rm -rf node_modules pnpm-lock.yaml .npmrc' 'pnpm install' --export-markdown pnpm.md | |
echo "Benchmarking yarn v2+..." | |
hyperfine --warmup 3 -i --prepare 'rm -rf node_modules yarn.lock .yarnrc && npm i -g @yarnpkg/cli-dist' 'yarn install' --export-markdown yarn2.md | |
echo "Benchmarking bun..." | |
hyperfine --warmup 3 -i --prepare 'rm -rf node_modules package-lock.json bun.lockb' 'bun install' --export-markdown bun.md | |
echo "Benchmarking deno..." | |
hyperfine -i --prepare 'rm -rf node_modules deno.json' 'deno install' --export-markdown deno.md | |
cat vlt.md >> combined_results.md | |
cat npm.md >> combined_results.md | |
cat yarn.md >> combined_results.md | |
cat yarn2.md >> combined_results.md | |
cat pnpm.md >> combined_results.md | |
cat bun.md >> combined_results.md | |
cat deno.md >> combined_results.md | |
cat combined_results.md |