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 | |
30 | if: github.ref == 'refs/heads/${{ github.event.repository.default_branch }}' | |
31 | run: ./bench.sh | |
32 | - name: Commit files | |
33 | if: github.ref == 'refs/heads/${{ github.event.repository.default_branch }}' | |
34 | env: | |
35 | COMMIT_MESSAGE: 'docs: update benchmark versus external pools results' | |
36 | COMMIT_AUTHOR: Benchmark Bot | |
37 | COMMIT_EMAIL: benchmark-bot@users.noreply.github.com | |
38 | run: | | |
39 | git config --local user.name "${{ env.COMMIT_AUTHOR }}" | |
40 | git config --local user.email "${{ env.COMMIT_EMAIL }}" | |
f0067563 | 41 | git pull |
11eee0d8 | 42 | git add ./BENCH-100000.md ./BENCH-100000.json |
27c3ac59 JB |
43 | git commit -a -m "${{ env.COMMIT_MESSAGE }}" |
44 | - name: Push changes | |
45 | if: github.ref == 'refs/heads/${{ github.event.repository.default_branch }}' | |
46 | uses: CasperWA/push-protected@v2 | |
47 | with: | |
48 | token: ${{ secrets.GH_TOKEN_PROTECTED }} | |
49 | branch: ${{ github.event.repository.default_branch }} |