Commit | Line | Data |
---|---|---|
27c3ac59 JB |
1 | name: External benchmark |
2 | ||
3 | on: | |
4 | workflow_dispatch: | |
5 | schedule: | |
6 | - cron: '0 3 * * *' | |
7 | ||
8 | jobs: | |
9 | external-benchmark: | |
10 | if: github.repository == 'poolifier/poolifier' | |
27c3ac59 JB |
11 | runs-on: [self-hosted, external-benchmark] |
12 | defaults: | |
13 | run: | |
14 | working-directory: benchmarks/versus-external-pools | |
15 | steps: | |
16 | - name: Checkout | |
17 | uses: actions/checkout@v4 | |
18 | - name: Setup pnpm | |
19 | uses: pnpm/action-setup@v2 | |
20 | with: | |
21 | version: 8 | |
22 | - name: Setup Node.js | |
23 | uses: actions/setup-node@v3 | |
24 | with: | |
25 | node-version: '18.x' | |
26 | cache: 'pnpm' | |
27 | - name: Install dependencies | |
28 | run: pnpm install --ignore-scripts | |
29 | - name: Run benchmark | |
0320ab48 | 30 | uses: blacha/hyperfine-action@v1 |
27c3ac59 | 31 | with: |
0320ab48 JB |
32 | benchmark-config: '.hyperfine.json' |
33 | count: 500 | |
34 | benchmark-branch: 'gh-pages' | |
35 | benchmark-output: './benchmarks.json' | |
36 | benchmark-html: './benchmarks.html' | |
37 | master-branch: 'master' | |
38 | github-token: ${{ secrets.GITHUB_TOKEN }} | |
39 | # - name: Run benchmark | |
40 | # if: github.ref == 'refs/heads/${{ github.event.repository.default_branch }}' | |
41 | # run: ./bench.sh | |
42 | # - name: Commit files | |
43 | # if: github.ref == 'refs/heads/${{ github.event.repository.default_branch }}' | |
44 | # env: | |
45 | # COMMIT_MESSAGE: 'docs: update benchmark versus external pools results' | |
46 | # COMMIT_AUTHOR: Benchmark Bot | |
47 | # COMMIT_EMAIL: benchmark-bot@users.noreply.github.com | |
48 | # run: | | |
49 | # git config --local user.name "${{ env.COMMIT_AUTHOR }}" | |
50 | # git config --local user.email "${{ env.COMMIT_EMAIL }}" | |
51 | # git pull | |
52 | # git add ./BENCH-100000.md ./BENCH-100000.json | |
53 | # git commit -a -m "${{ env.COMMIT_MESSAGE }}" | |
54 | # - name: Push changes | |
55 | # if: github.ref == 'refs/heads/${{ github.event.repository.default_branch }}' | |
56 | # uses: CasperWA/push-protected@v2 | |
57 | # with: | |
58 | # token: ${{ secrets.GH_TOKEN_PROTECTED }} | |
59 | # branch: ${{ github.event.repository.default_branch }} |