|
| 1 | +name: 'run-veristat' |
| 2 | +description: 'Run veristat benchmark' |
| 3 | +inputs: |
| 4 | + veristat_output: |
| 5 | + description: 'Veristat output filepath' |
| 6 | + required: true |
| 7 | + baseline_name: |
| 8 | + description: 'Veristat baseline cache name' |
| 9 | + required: true |
| 10 | +runs: |
| 11 | + using: "composite" |
| 12 | + steps: |
| 13 | + - uses: actions/upload-artifact@v4 |
| 14 | + with: |
| 15 | + name: ${{ inputs.baseline_name }} |
| 16 | + if-no-files-found: error |
| 17 | + path: ${{ github.workspace }}/${{ inputs.veristat_output }} |
| 18 | + |
| 19 | + # For pull request: |
| 20 | + # - get baseline log from cache |
| 21 | + # - compare it to current run |
| 22 | + - if: ${{ github.event_name == 'pull_request' }} |
| 23 | + uses: actions/cache/restore@v4 |
| 24 | + with: |
| 25 | + key: ${{ inputs.baseline_name }} |
| 26 | + restore-keys: | |
| 27 | + ${{ inputs.baseline_name }}- |
| 28 | + path: '${{ github.workspace }}/${{ inputs.baseline_name }}' |
| 29 | + |
| 30 | + - if: ${{ github.event_name == 'pull_request' }} |
| 31 | + name: Show veristat comparison |
| 32 | + shell: bash |
| 33 | + run: ./.github/scripts/compare-veristat-results.sh |
| 34 | + env: |
| 35 | + BASELINE_PATH: ${{ github.workspace }}/${{ inputs.baseline_name }} |
| 36 | + VERISTAT_OUTPUT: ${{ inputs.veristat_output }} |
| 37 | + |
| 38 | + # For push: just put baseline log to cache |
| 39 | + - if: ${{ github.event_name == 'push' }} |
| 40 | + shell: bash |
| 41 | + run: | |
| 42 | + mv "${{ github.workspace }}/${{ inputs.veristat_output }}" \ |
| 43 | + "${{ github.workspace }}/${{ inputs.baseline_name }}" |
| 44 | +
|
| 45 | + - if: ${{ github.event_name == 'push' }} |
| 46 | + uses: actions/cache/save@v4 |
| 47 | + with: |
| 48 | + key: ${{ inputs.baseline_name }}-${{ github.run_id }} |
| 49 | + path: '${{ github.workspace }}/${{ inputs.baseline_name }}' |
0 commit comments