Remove 2048 leaf limit in splits_to_edge() with hybrid stack/heap allocation #295
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Benchmark | |
| on: | |
| workflow_dispatch: | |
| pull_request: | |
| paths-ignore: | |
| - "Meta**" | |
| - "memcheck**" | |
| - "docs**" | |
| - "**.git" | |
| - "**.json" | |
| - "**.md" | |
| - "**.yaml" | |
| - "**.yml" | |
| - "!**benchmark.yml" | |
| - "**.R[dD]ata" | |
| - "**.Rpro*" | |
| jobs: | |
| benchmark: | |
| runs-on: ubuntu-latest | |
| env: | |
| GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
| RSPM: "https://packagemanager.rstudio.com/cran/__linux__/noble/latest" | |
| _R_CHECK_BUILD_VIGNETTES_: false | |
| _R_CHECK_CRAN_INCOMING_: false | |
| _R_CHECK_FORCE_SUGGESTS_: false # CRAN settings | |
| R_REMOTES_STANDALONE: true | |
| R_REMOTES_NO_ERRORS_FROM_WARNINGS: true | |
| R_REALLY_FORCE_SYMBOLS: true # Until R4.3 | |
| PKG_CXXFLAGS: "-O3" | |
| steps: | |
| - name: Checkout PR branch | |
| uses: actions/checkout@v5 | |
| with: | |
| path: pr | |
| - name: Checkout target branch | |
| uses: actions/checkout@v5 | |
| with: | |
| ref: ${{ github.event.pull_request.base.ref || 'master' }} | |
| path: main | |
| - name: Set up R | |
| uses: r-lib/actions/setup-r@v2 | |
| - name: Install R dependencies | |
| uses: r-lib/actions/setup-r-dependencies@v2 | |
| with: | |
| dependencies: '"hard"' | |
| needs: benchmark | |
| - name: Benchmark PR | |
| uses: ms609/actions/benchmark-step@main | |
| with: | |
| path: pr | |
| output: pr | |
| reinstall-packages: TreeDist | |
| - name: Benchmark target | |
| uses: ms609/actions/benchmark-step@main | |
| with: | |
| path: main | |
| output: main | |
| reinstall-packages: TreeDist | |
| - name: Benchmark PR again | |
| uses: ms609/actions/benchmark-step@main | |
| with: | |
| path: pr | |
| output: pr2 | |
| reinstall-packages: TreeDist | |
| - run: dir pr-benchmark-results | |
| working-directory: pr | |
| - run: dir main-benchmark-results | |
| working-directory: pr | |
| - name: Compare benchmarks | |
| id: compare_results | |
| working-directory: pr | |
| run: | | |
| Rscript benchmark/_compare_results.R | |
| shell: bash | |
| - name: Upload PR benchmark results | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pr-benchmark-results | |
| path: pr/pr-benchmark-results/*.bench.Rds | |
| - name: Upload main benchmark results | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: main-benchmark-results | |
| path: pr/main-benchmark-results/*.bench.Rds | |
| - name: Comment on PR | |
| if: always() && github.event_name == 'pull_request' && steps.compare_results.outputs.report != '' | |
| uses: actions/github-script@v7 | |
| env: | |
| BENCHMARK_MESSAGE: ${{ steps.compare_results.outputs.report }} | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| script: | | |
| const benchmarkIdentifier = '<!-- benchmark-comment -->'; | |
| const outdatedPrefix = '> **⚠️ This benchmark result is outdated. See the latest comment below.**\n\n'; | |
| // Get all comments on the PR | |
| const comments = await github.rest.issues.listComments({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.issue.number | |
| }); | |
| // Find previous benchmark comments by this bot | |
| const previousBenchmarkComments = comments.data.filter(comment => | |
| comment.user.type === 'Bot' && | |
| comment.body.includes(benchmarkIdentifier) && | |
| !comment.body.startsWith('> **⚠️ This benchmark result is outdated.') | |
| ); | |
| // Mark previous comments as outdated | |
| for (const comment of previousBenchmarkComments) { | |
| await github.rest.issues.updateComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| comment_id: comment.id, | |
| body: outdatedPrefix + comment.body | |
| }); | |
| } | |
| // Create new comment with identifier | |
| const newCommentBody = benchmarkIdentifier + '\n' + process.env.BENCHMARK_MESSAGE; | |
| await github.rest.issues.createComment({ | |
| owner: context.repo.owner, | |
| repo: context.repo.repo, | |
| issue_number: context.issue.number, | |
| body: newCommentBody | |
| }); |