Skip to content

Visualize and interact with micro benchmarks in performance report #46

Visualize and interact with micro benchmarks in performance report

Visualize and interact with micro benchmarks in performance report #46

name: Generate Performance Release Report
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
on:
pull_request:
push:
branches: main
paths:
- ".github/workflows/performance-release-report.yml"
- "performance-release-report/performance-release-report.qmd"
workflow_dispatch:
inputs:
baseline_git_commit:
description: 'Baseline Git Commit'
required: false
contender_git_commit:
description: 'Contender Git Commit'
required: false
rc_label:
description: 'RC Label'
required: false
publish:
type: boolean
description: 'Publish to S3'
required: false
default: false
permissions:
contents: read
env:
## payload vars
BASELINE_GIT_COMMIT: ${{ github.event.inputs.baseline_git_commit }}
CONTENDER_GIT_COMMIT: ${{ github.event.inputs.contender_git_commit }}
RC_LABEL: ${{ github.event.inputs.rc_label || 'manual' }}
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Setup Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
version: 1.3.450
- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
r-version: '4.3.1'
use-public-rspm: true
# Needed due to https://github.com/r-lib/actions/issues/618
- name: Link renv.lock
run: ln -sf 'performance-release-report/renv.lock'
- name: Setup renv
uses: r-lib/actions/setup-renv@v2
env:
# This is set by setup-r
RENV_CONFIG_REPOS_OVERRIDE: ""
with:
cache-version: 1
- name: Build Report
uses: quarto-dev/quarto-actions/render@v2
env:
BASELINE_GIT_COMMIT: ${{ env.BASELINE_GIT_COMMIT }}
CONTENDER_GIT_COMMIT: ${{ env.CONTENDER_GIT_COMMIT }}
with:
to: html
path: 'performance-release-report/performance-release-report.qmd'
- name: Upload Rendered Perf Report
if: github.event_name == 'pull_request'
uses: actions/upload-artifact@v3
with:
name: perf-report
path: 'performance-release-report/performance-release-report.html'
- name: Upload result
if: ${{ github.event.inputs.publish == 'true' }}
working-directory: performance-release-report
shell: bash
env:
AWS_ACCESS_KEY_ID: ${{ secrets.CROSSBOW_DOCS_AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CROSSBOW_DOCS_AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.CROSSBOW_DOCS_S3_BUCKET_REGION }}
BUCKET: ${{ secrets.CROSSBOW_DOCS_S3_BUCKET }}
run: |
aws s3 cp performance-release-report.html $BUCKET/performance-release-report${{ env.RC_LABEL }}.html