| 1 | name: json decoder benchmark CI |
| 2 | |
| 3 | on: |
| 4 | push: |
| 5 | branches: |
| 6 | - master |
| 7 | paths: |
| 8 | - 'vlib/x/json2/**' # Trigger on changes in this folder |
| 9 | |
| 10 | jobs: |
| 11 | json-encode-benchmark: |
| 12 | runs-on: ubuntu-latest |
| 13 | timeout-minutes: 5 |
| 14 | |
| 15 | steps: |
| 16 | - name: Checkout repository |
| 17 | uses: actions/checkout@v6 |
| 18 | |
| 19 | - name: Build V |
| 20 | run: make -j4 && ./v symlink |
| 21 | |
| 22 | - name: Run V benchmark and save output |
| 23 | run: (echo '```txt'; v -prod crun vlib/x/json2/tests/bench.v; echo '```') > vlib/x/json2/tests/bench_out.md |
| 24 | |
| 25 | - name: Upload result file |
| 26 | uses: actions/upload-artifact@v7 |
| 27 | with: |
| 28 | name: program-output |
| 29 | path: vlib/x/json2/tests/bench_out.md |
| 30 | |