Skip to content

Benchmark

Benchmark #781

Workflow file for this run

name: Benchmark
on:
# Submit your review with a comment body containing "#benchmark"
pull_request_review:
types: [ submitted ]
schedule:
- cron: '0 0 * * *'
# Manurally trigger
workflow_dispatch:
jobs:
benchmark:
name: Benchmark
runs-on: ubuntu-latest
if: |
(
github.event_name == 'pull_request_review' &&
contains(github.event.review.body, '#benchmark')
) || (
github.event_name == 'schedule' &&
github.repository_owner == 'nervosnetwork'
) || (
github.event_name == 'workflow_dispatch'
)
env:
AWS_ACCESS_KEY: ${{ secrets.AWS_ACCESS_KEY }}
AWS_SECRET_KEY: ${{ secrets.AWS_SECRET_KEY }}
AWS_EC2_TYPE: "c5.xlarge"
GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
steps:
- uses: actions/checkout@v2
- name: Get branch name when event is pr review comments
if: github.event_name == 'pull_request_review' && contains(github.event.review.body, '#benchmark')
uses: xt0rted/pull-request-comment-branch@v1
id: comment-branch
- name: Benchmark
run: |
git clone https://github.com/nervosnetwork/ckb-integration-test.git
export GITHUB_BRANCH=${{ steps.comment-branch.outputs.head_ref }}
export GITHUB_REPO=${{ github.repository }}
devtools/ci/benchmark.sh
- uses: actions/upload-artifact@v2
with:
name: report.yml
path: ${{ env.ANSIBLE_DIR }}/report.yml
- uses: actions/upload-artifact@v2
with:
name: ckb-bench.log
path: ${{ env.ANSIBLE_DIR }}/ckb-bench.log