Repository navigation
Moving from circleci to gha WRT benchmark flows #1108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
dcf748f
Moving from circleci to gha WRT benchmark flows
filipecosta90 72049ae
doing system setup prior benchmark steps
filipecosta90 1918d58
sourcing cargo env vars before building json
filipecosta90 5614221
Using action-rs to have rustc toolchain
filipecosta90 ec25108
Installing linux-source prior using it on gha
filipecosta90 3045587
Updated linux-source install steps
filipecosta90 ba3f385
Merge branch 'master' into benchmarks.gha
filipecosta90 b68b403
Updated linux-source install steps
filipecosta90 fdb5801
Merge branch 'benchmarks.gha' of github.com:RedisJSON/RedisJSON into …
filipecosta90 0d8e502
Replacement for source command in benchmark flows
filipecosta90 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,118 @@ | ||
| name: Run a Benchmark Flow | ||
|
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| container: | ||
| type: string | ||
| default: redisfab/rmbuilder:6.2.7-x64-focal | ||
| module_path: | ||
| type: string | ||
| default: bin/linux-x64-release/rejson.so | ||
| profile_env: | ||
| type: number # for default of 0 | ||
| cluster_env: | ||
| type: string # for default of "" | ||
| benchmark_glob: | ||
| type: string | ||
| default: "*.yml" | ||
| triggering_env: | ||
| type: string | ||
| default: "circleci" # TODO: change to "github-actions" when ready on grafana | ||
| allowed_envs: | ||
| type: string | ||
| default: "oss-standalone" | ||
| allowed_setups: | ||
| type: string | ||
| benchmark_runner_group_member_id: | ||
| type: number | ||
| default: 1 | ||
| benchmark_runner_group_total: | ||
| type: number | ||
| default: 1 | ||
|
|
||
| jobs: | ||
| benchmark-steps: | ||
| runs-on: ubuntu-latest | ||
| container: ${{ inputs.container }} | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v4 | ||
| - run: | | ||
| git init | ||
| git config --global --add safe.directory '*' | ||
| git submodule update --init --recursive | ||
|
|
||
| - name: System setup | ||
| run: ./sbin/system-setup.py | ||
|
|
||
| - name: Get Redis | ||
| uses: actions/checkout@v4 | ||
| with: | ||
| repository: redis/redis | ||
| ref: '7.2' | ||
| path: redis | ||
|
|
||
| - name: Build Redis | ||
| working-directory: redis | ||
| run: make install | ||
|
|
||
| - name: Build RedisJSON | ||
| run: | | ||
| . $HOME/.cargo/env | ||
| make build | ||
|
|
||
| - name: Prepare automation | ||
| run: | | ||
| ./deps/readies/bin/getpy3 | ||
| python3 -m pip install -r tests/benchmarks/requirements.txt | ||
| VERSION=0.14.8 ./deps/readies/bin/getterraform | ||
|
|
||
| - name: Run CI benchmarks on aws for envs ${{ inputs.allowed_envs }} | ||
| timeout-minutes: 240 # timeout for the step | ||
| working-directory: tests/benchmarks | ||
| continue-on-error: true | ||
| env: | ||
| # Hard-coded | ||
| PERF_CALLGRAPH_MODE: dwarf | ||
| MAX_PROFILERS: 1 | ||
| # Secrets | ||
| AWS_ACCESS_KEY_ID: ${{ secrets.PERFORMANCE_EC2_ACCESS_KEY }} | ||
| AWS_SECRET_ACCESS_KEY: ${{ secrets.PERFORMANCE_EC2_SECRET_KEY }} | ||
| AWS_DEFAULT_REGION: ${{ secrets.PERFORMANCE_EC2_REGION }} | ||
| EC2_PRIVATE_PEM: ${{ secrets.PERFORMANCE_EC2_PRIVATE_PEM }} | ||
| # Inputs | ||
| PROFILE: ${{ inputs.profile_env }} | ||
| BENCHMARK_GLOB: ${{ inputs.benchmark_glob }} | ||
| BENCHMARK_RUNNER_GROUP_M_ID: ${{ inputs.benchmark_runner_group_member_id }} | ||
| BENCHMARK_RUNNER_GROUP_TOTAL: ${{ inputs.benchmark_runner_group_total }} | ||
| run: redisbench-admin run-remote | ||
| --module_path ../../${{ inputs.module_path }} | ||
| --github_actor ${{ github.triggering_actor }} | ||
| --github_repo ${{ github.event.repository.name }} | ||
| --github_org ${{ github.repository_owner }} | ||
| --required-module ReJSON | ||
| --github_sha ${{ github.sha }} | ||
| --github_branch ${{ github.head_ref || github.ref_name }} | ||
| --upload_results_s3 | ||
| --triggering_env ${{ inputs.triggering_env }} | ||
| --allowed-envs ${{ inputs.allowed_envs }} | ||
| --allowed-setups ${{ inputs.allowed_setups }} | ||
| --push_results_redistimeseries | ||
| --redistimeseries_host ${{ secrets.PERFORMANCE_RTS_HOST }} | ||
| --redistimeseries_port ${{ secrets.PERFORMANCE_RTS_PORT }} | ||
| --redistimeseries_pass '${{ secrets.PERFORMANCE_RTS_AUTH }}' | ||
|
|
||
| - name: Generate Pull Request Performance info | ||
| if: github.event.number | ||
| env: | ||
| PERFORMANCE_GH_TOKEN: ${{ secrets.PERFORMANCE_GH_TOKEN }} | ||
| PERFORMANCE_WH_TOKEN: ${{ secrets.PERFORMANCE_WH_TOKEN }} | ||
| run: redisbench-admin compare | ||
| --defaults_filename ./tests/benchmarks/defaults.yml | ||
| --comparison-branch ${{ github.head_ref || github.ref_name }} | ||
| --auto-approve | ||
| --pull-request ${{ github.event.number }} | ||
| --redistimeseries_host ${{ secrets.PERFORMANCE_RTS_HOST }} | ||
| --redistimeseries_port ${{ secrets.PERFORMANCE_RTS_PORT }} | ||
| --redistimeseries_pass '${{ secrets.PERFORMANCE_RTS_AUTH }}' | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| name: Run RedisJSON Benchmarks | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| extended: | ||
| type: boolean | ||
| description: 'Run extended benchmarks' | ||
| default: false | ||
| workflow_call: | ||
| inputs: | ||
| extended: | ||
| type: boolean | ||
| default: false | ||
|
|
||
| jobs: | ||
| benchmark-json-oss-standalone: | ||
| strategy: | ||
| matrix: | ||
| member_id: [1, 2, 3] | ||
| uses: ./.github/workflows/benchmark-flow.yml | ||
| secrets: inherit | ||
| with: | ||
| benchmark_runner_group_member_id: ${{ matrix.member_id }} | ||
| benchmark_runner_group_total: ${{ strategy.job-total }} | ||
|
|
||
| benchmark-json-oss-standalone-profiler: | ||
| strategy: | ||
| matrix: | ||
| member_id: [1, 2, 3] | ||
| uses: ./.github/workflows/benchmark-flow.yml | ||
| secrets: inherit | ||
| with: | ||
| profile_env: 1 | ||
| # TODO: change to "github-actions.profilers" when ready on grafana | ||
| triggering_env: "circleci.profilers" # results generated with profilers attached are not mixed with the ones without it | ||
| benchmark_runner_group_member_id: ${{ matrix.member_id }} | ||
| benchmark_runner_group_total: ${{ strategy.job-total }} | ||
|
|
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| name: Check if needs trigger CircleCI benchmark | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [opened, labeled, unlabeled, synchronize] | ||
|
|
||
| jobs: | ||
| haslabel: | ||
| name: analyse labels | ||
| runs-on: ubuntu-latest | ||
| outputs: | ||
| benchmark: ${{ steps.haslabel.outputs.labeled-run-benchmark }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Check if labeled with run-benchmark | ||
| id: haslabel | ||
| uses: DanielTamkin/HasLabel@v1.0.4 | ||
| with: | ||
| contains: 'run-benchmark' | ||
|
|
||
| perf-ci: | ||
| name: Trigger | ||
| needs: haslabel | ||
| if: needs.haslabel.outputs.benchmark | ||
| uses: ./.github/workflows/benchmark-runner.yml | ||
| secrets: inherit |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| name: Push to Version, Feature or Master Branch | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - master | ||
| - 'feature-*' | ||
| - '[0-9]+.[0-9]+' | ||
|
|
||
| jobs: | ||
| benchmark: | ||
| uses: ./.github/workflows/benchmark-runner.yml | ||
| secrets: inherit |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| name: Weekly Flow | ||
|
|
||
| on: | ||
| schedule: | ||
| - cron: "0 0 * * 0" | ||
|
|
||
| jobs: | ||
| run-benchmarks: | ||
| uses: ./.github/workflows/benchmark-runner.yml | ||
| secrets: inherit | ||
| with: | ||
| extended: true |
This file was deleted.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.