Skip to content

Commit

Permalink
add workflow to measure a scenario for all cases
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra committed Oct 6, 2021
1 parent b404986 commit 8db09ce
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 1 deletion.
90 changes: 90 additions & 0 deletions .github/workflows/measure-all-cases.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Measure scenario and date for all cases

on:
workflow_dispatch:
inputs:
scenario:
description: "Scenario to measure"
default: "development-build"
required: true
date:
description: "Date to measure (yyyy-mm-dd)"
default: "2021-10-01"
required: true

jobs:
bench:
strategy:
fail-fast: false
matrix:
case:
- common-libs
- esbuild-three
- rome
- atlaskit-editor
- common-libs-chunks
runs-on: ubuntu-latest
steps:
- run: echo ${{ matrix.case }} ${{ github.event.inputs.scenario }} ${{ github.event.inputs.date }}
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 14.x
- id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-${{ matrix.case }}-${{ github.event.inputs.date }}
restore-keys: |
yarn-${{ matrix.case }}-
yarn-
- uses: nick-invision/[email protected]
with:
max_attempts: 3
timeout_minutes: 5
command: yarn
- uses: nick-invision/[email protected]
with:
max_attempts: 3
timeout_minutes: 30
command: node bin/measure-mean-normalized.js ${{ matrix.case }} ${{ github.event.inputs.scenario }} ${{ github.event.inputs.date }}
- uses: actions/upload-artifact@v2
with:
name: measure-results
path: output
upload:
needs: [bench]
if: ${{ always() }}
runs-on: ubuntu-latest
steps:
- run: echo ${{ github.event.inputs.scenario }} ${{ github.event.inputs.date }}
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 14.x
- id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: yarn-upload-${{ hashFiles('yarn.lock') }}
restore-keys: |
yarn-upload-
yarn-
- uses: nick-invision/[email protected]
with:
max_attempts: 3
timeout_minutes: 5
command: yarn
- uses: actions/download-artifact@v2
with:
name: measure-results
path: output
- name: Setup git user
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
- run: node bin/upload.js ${{ github.event.inputs.date }} ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion .github/workflows/measure-single.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ on:
required: true
date:
description: "Date to measure (yyyy-mm-dd)"
default: "2021-01-01"
default: "2021-10-01"
required: true
jobs:
bench:
Expand Down

0 comments on commit 8db09ce

Please sign in to comment.