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