Skip to content

Commit

Permalink
Run profiler only on release and on demand (#1392)
Browse files Browse the repository at this point in the history
Since we are not using the cpu/heap profiles that much (if at all), IMHO
it is an environmental offense to run the profiler on every commit.

With this change we only run the profiler on releases. In addition, it
is now easy to run the profiler on demand from any branch, tag or
commit.
  • Loading branch information
erikvanoosten authored Nov 16, 2024
1 parent 9cddaeb commit 5f62a09
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions .github/workflows/profile.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
# Copied from Flavio W. Brasil's work on Kyo: https://github.com/fwbrasil/kyo
name: profile
on:
push:
branches:
- main
pull_request:
types: [ opened, reopened, synchronize ]

# Prevent multiple builds at the same time from the same branch (except for 'master').
concurrency:
group: ${{ github.workflow }}-${{ github.ref == format('refs/heads/{0}', github.event.repository.default_branch) && github.run_id || github.ref }}
cancel-in-progress: true
release:
types: [ created ]
workflow_dispatch:
inputs:
ref:
description: 'The branch, tag or commit SHA to checkout for profiling. Leave empty for the default branch'
required: true
type: string
default: ''

permissions:
contents: write
Expand All @@ -24,6 +23,7 @@ jobs:
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.ref }}
fetch-depth: 0
- name: Setup Java
uses: actions/setup-java@v4
Expand Down

0 comments on commit 5f62a09

Please sign in to comment.