name: benchmark on: push: branches: - master paths-ignore: - "docs/**" - "papers/**" - "rfcs/**" - "*.md" - "prototyping/**" jobs: callgrind: name: callgrind ${{ matrix.compiler }} strategy: fail-fast: false matrix: os: [ubuntu-22.04] compiler: [g++] 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: 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' 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 ..