name: benchmark on: push: branches: - master - callgrind paths-ignore: - "docs/**" - "papers/**" - "rfcs/**" - "*.md" - "prototyping/**" jobs: callgrind: name: ubuntu-callgrind strategy: fail-fast: false matrix: os: [ubuntu-latest] bench: - { title: "Luau Benchmarks (Callgrind)" } benchResultsRepo: - { name: "luau-lang/benchmark-data", branch: "main" } runs-on: ${{ matrix.os }} steps: - name: Checkout Luau repository uses: actions/checkout@v3 - name: Install valgrind run: | sudo apt-get install valgrind - name: Build Luau run: make config=release CALLGRIND=1 luau - name: Run benchmark run: | python bench/bench.py --callgrind | tee output.txt - name: Checkout Benchmark Results repository uses: actions/checkout@v3 with: repository: ${{ matrix.benchResultsRepo.name }} ref: ${{ matrix.benchResultsRepo.branch }} token: ${{ secrets.BENCH_GITHUB_TOKEN }} path: "./gh-pages" - name: Store ${{ matrix.bench.title }} result uses: Roblox/rhysd-github-action-benchmark@v-luau with: name: ${{ matrix.bench.title }} tool: "benchmarkluau" output-file-path: ./output.txt external-data-json-path: ./gh-pages/bench/data.json github-token: ${{ secrets.BENCH_GITHUB_TOKEN }} - name: Push benchmark results if: github.event_name == 'push' 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 git commit -m "Add benchmarks results for ${{ github.sha }}" git push cd ..