|
| 1 | +name: Measure scenario and date for all cases |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + inputs: |
| 6 | + scenario: |
| 7 | + description: "Scenario to measure" |
| 8 | + default: "development-build" |
| 9 | + required: true |
| 10 | + date: |
| 11 | + description: "Date to measure (yyyy-mm-dd)" |
| 12 | + default: "2021-10-01" |
| 13 | + required: true |
| 14 | + |
| 15 | +jobs: |
| 16 | + bench: |
| 17 | + strategy: |
| 18 | + fail-fast: false |
| 19 | + matrix: |
| 20 | + case: |
| 21 | + - common-libs |
| 22 | + - esbuild-three |
| 23 | + - rome |
| 24 | + - atlaskit-editor |
| 25 | + - common-libs-chunks |
| 26 | + runs-on: ubuntu-latest |
| 27 | + steps: |
| 28 | + - run: echo ${{ matrix.case }} ${{ github.event.inputs.scenario }} ${{ github.event.inputs.date }} |
| 29 | + - uses: actions/checkout@v2 |
| 30 | + - name: Use Node.js |
| 31 | + uses: actions/setup-node@v1 |
| 32 | + with: |
| 33 | + node-version: 14.x |
| 34 | + - id: yarn-cache-dir-path |
| 35 | + run: echo "::set-output name=dir::$(yarn cache dir)" |
| 36 | + - uses: actions/cache@v1 |
| 37 | + with: |
| 38 | + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} |
| 39 | + key: yarn-${{ matrix.case }}-${{ github.event.inputs.date }} |
| 40 | + restore-keys: | |
| 41 | + yarn-${{ matrix.case }}- |
| 42 | + yarn- |
| 43 | + - uses: nick-invision/[email protected] |
| 44 | + with: |
| 45 | + max_attempts: 3 |
| 46 | + timeout_minutes: 5 |
| 47 | + command: yarn |
| 48 | + - uses: nick-invision/[email protected] |
| 49 | + with: |
| 50 | + max_attempts: 3 |
| 51 | + timeout_minutes: 30 |
| 52 | + command: node bin/measure-mean-normalized.js ${{ matrix.case }} ${{ github.event.inputs.scenario }} ${{ github.event.inputs.date }} |
| 53 | + - uses: actions/upload-artifact@v2 |
| 54 | + with: |
| 55 | + name: measure-results |
| 56 | + path: output |
| 57 | + upload: |
| 58 | + needs: [bench] |
| 59 | + if: ${{ always() }} |
| 60 | + runs-on: ubuntu-latest |
| 61 | + steps: |
| 62 | + - run: echo ${{ github.event.inputs.scenario }} ${{ github.event.inputs.date }} |
| 63 | + - uses: actions/checkout@v2 |
| 64 | + - name: Use Node.js |
| 65 | + uses: actions/setup-node@v1 |
| 66 | + with: |
| 67 | + node-version: 14.x |
| 68 | + - id: yarn-cache-dir-path |
| 69 | + run: echo "::set-output name=dir::$(yarn cache dir)" |
| 70 | + - uses: actions/cache@v1 |
| 71 | + with: |
| 72 | + path: ${{ steps.yarn-cache-dir-path.outputs.dir }} |
| 73 | + key: yarn-upload-${{ hashFiles('yarn.lock') }} |
| 74 | + restore-keys: | |
| 75 | + yarn-upload- |
| 76 | + yarn- |
| 77 | + - uses: nick-invision/[email protected] |
| 78 | + with: |
| 79 | + max_attempts: 3 |
| 80 | + timeout_minutes: 5 |
| 81 | + command: yarn |
| 82 | + - uses: actions/download-artifact@v2 |
| 83 | + with: |
| 84 | + name: measure-results |
| 85 | + path: output |
| 86 | + - name: Setup git user |
| 87 | + run: | |
| 88 | + git config --global user.name "github-actions[bot]" |
| 89 | + git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" |
| 90 | + - run: node bin/upload.js ${{ github.event.inputs.date }} ${{ secrets.GITHUB_TOKEN }} |
0 commit comments