mirror of
https://github.com/discordeno/discordeno.git
synced 2026-09-17 16:57:22 +00:00
39 lines
1.0 KiB
YAML
39 lines
1.0 KiB
YAML
name: Benchmark
|
|
|
|
on:
|
|
workflow_call:
|
|
|
|
jobs:
|
|
benchmark:
|
|
name: Benchmark
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 18
|
|
- name: Check cpu model
|
|
run: node ./scripts/checkCpuModel.js
|
|
|
|
- name: Get yarn cache directory path
|
|
id: yarn-cache-dir-path
|
|
run: echo "dir=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
|
|
- uses: actions/cache@v3
|
|
with:
|
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-yarn-
|
|
- run: yarn install --immutable
|
|
- name: Build
|
|
run: yarn build
|
|
|
|
#
|
|
- name: Download db from benchmark repo
|
|
run: wget https://github.com/discordeno/benchmarks/raw/main/db.tar.gz
|
|
- name: Decompress db
|
|
run: tar -xzvf db.tar.gz
|
|
|
|
- name: Benchmark
|
|
run: node ./packages/benchmark/dist/index.js
|