From e7defb36decf925dab49dd046959a4b6a2b10d5e Mon Sep 17 00:00:00 2001 From: Josh McKinney Date: Mon, 17 Mar 2025 16:09:51 -0700 Subject: [PATCH] ci: remove bencher workflows (#1719) These actions are currently unused as we haven't invested the time necessary to understand how best to use them. We can always re-add them later if we find them useful. --- .github/workflows/bench_base.yml | 25 ---------- .github/workflows/bench_run_fork_pr.yml | 25 ---------- .github/workflows/bench_track_fork_pr.yml | 56 ----------------------- 3 files changed, 106 deletions(-) delete mode 100644 .github/workflows/bench_base.yml delete mode 100644 .github/workflows/bench_run_fork_pr.yml delete mode 100644 .github/workflows/bench_track_fork_pr.yml diff --git a/.github/workflows/bench_base.yml b/.github/workflows/bench_base.yml deleted file mode 100644 index 83006e90..00000000 --- a/.github/workflows/bench_base.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Run Benchmarks - -on: - push: - branches: - - main - -jobs: - benchmark_base_branch: - name: Continuous Benchmarking with Bencher - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - uses: bencherdev/bencher@main - - name: Track base branch benchmarks with Bencher - run: | - bencher run \ - --project ratatui-org \ - --token '${{ secrets.BENCHER_API_TOKEN }}' \ - --branch main \ - --testbed ubuntu-latest \ - --adapter rust_criterion \ - --err \ - cargo bench diff --git a/.github/workflows/bench_run_fork_pr.yml b/.github/workflows/bench_run_fork_pr.yml deleted file mode 100644 index 1764d693..00000000 --- a/.github/workflows/bench_run_fork_pr.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Run and Cache Benchmarks - -on: - pull_request: - types: [opened, reopened, edited, synchronize] - -jobs: - benchmark_fork_pr_branch: - name: Run Fork PR Benchmarks - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Run Benchmarks - run: cargo bench > benchmark_results.txt - - name: Upload Benchmark Results - uses: actions/upload-artifact@v4 - with: - name: benchmark_results.txt - path: ./benchmark_results.txt - - name: Upload GitHub Pull Request Event - uses: actions/upload-artifact@v4 - with: - name: event.json - path: ${{ github.event_path }} diff --git a/.github/workflows/bench_track_fork_pr.yml b/.github/workflows/bench_track_fork_pr.yml deleted file mode 100644 index 54770303..00000000 --- a/.github/workflows/bench_track_fork_pr.yml +++ /dev/null @@ -1,56 +0,0 @@ -name: Track Benchmarks with Bencher - -on: - workflow_run: - workflows: [Run and Cache Benchmarks] - types: [completed] - -permissions: - contents: read - pull-requests: write - -jobs: - track_fork_pr_branch: - if: github.event.workflow_run.conclusion == 'success' - runs-on: ubuntu-latest - env: - BENCHMARK_RESULTS: benchmark_results.txt - PR_EVENT: event.json - steps: - - name: Download Benchmark Results - uses: dawidd6/action-download-artifact@v9 - with: - name: ${{ env.BENCHMARK_RESULTS }} - run_id: ${{ github.event.workflow_run.id }} - - name: Download PR Event - uses: dawidd6/action-download-artifact@v9 - with: - name: ${{ env.PR_EVENT }} - run_id: ${{ github.event.workflow_run.id }} - - name: Export PR Event Data - uses: actions/github-script@v7 - with: - script: | - let fs = require('fs'); - let prEvent = JSON.parse(fs.readFileSync(process.env.PR_EVENT, {encoding: 'utf8'})); - core.exportVariable("PR_HEAD", prEvent.pull_request.head.ref); - core.exportVariable("PR_BASE", prEvent.pull_request.base.ref); - core.exportVariable("PR_BASE_SHA", prEvent.pull_request.base.sha); - core.exportVariable("PR_NUMBER", prEvent.number); - - uses: bencherdev/bencher@main - - name: Track Benchmarks with Bencher - run: | - bencher run \ - --project ratatui-org \ - --token '${{ secrets.BENCHER_API_TOKEN }}' \ - --branch "$PR_HEAD" \ - --start-point "$PR_BASE" \ - --start-point-hash "$PR_BASE_SHA" \ - --start-point-clone-thresholds \ - --start-point-reset \ - --testbed ubuntu-latest \ - --adapter rust_criterion \ - --err \ - --github-actions '${{ secrets.GITHUB_TOKEN }}' \ - --ci-number "$PR_NUMBER" \ - --file "$BENCHMARK_RESULTS" \ No newline at end of file