luau/.github/workflows/benchmark.yml

68 lines
1.8 KiB
YAML
Raw Normal View History

2022-06-25 09:30:26 +08:00
name: benchmark
2022-06-14 23:48:07 +08:00
on:
push:
branches:
- master
paths-ignore:
- "docs/**"
- "papers/**"
- "rfcs/**"
- "*.md"
- "prototyping/**"
jobs:
callgrind:
name: callgrind ${{ matrix.compiler }}
2022-06-14 23:48:07 +08:00
strategy:
fail-fast: false
matrix:
os: [ubuntu-22.04]
compiler: [g++]
2022-06-14 23:48:07 +08:00
benchResultsRepo:
- { name: "luau-lang/benchmark-data", branch: "main" }
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Luau repository
2022-06-14 23:48:07 +08:00
uses: actions/checkout@v3
- name: Install valgrind
run: |
sudo apt-get install valgrind
- name: Build Luau
run: CXX=${{ matrix.compiler }} make config=release CALLGRIND=1 luau
- name: Run benchmark
run: |
python bench/bench.py --callgrind --vm "./luau -O2" | tee output.txt
- name: Checkout benchmark results
uses: actions/checkout@v3
with:
repository: ${{ matrix.benchResultsRepo.name }}
ref: ${{ matrix.benchResultsRepo.branch }}
token: ${{ secrets.BENCH_GITHUB_TOKEN }}
path: "./gh-pages"
- name: Store results
uses: Roblox/rhysd-github-action-benchmark@v-luau
with:
name: callgrind ${{ matrix.compiler }}
tool: "benchmarkluau"
output-file-path: ./output.txt
external-data-json-path: ./gh-pages/bench/data.json
- name: Push benchmark results
if: github.event_name == 'push'
2022-06-14 23:48:07 +08:00
run: |
echo "Pushing benchmark results..."
cd gh-pages
git config user.name github-actions
git config user.email github@users.noreply.github.com
git add ./bench/data.json
2022-06-14 23:48:07 +08:00
git commit -m "Add benchmarks results for ${{ github.sha }}"
git push
cd ..