Skip to content

Remove calcs (#1023) #85

Remove calcs (#1023)

Remove calcs (#1023) #85

Workflow file for this run

# Do not run this workflow on pull request since this workflow has permission to modify contents.
on:
push:
branches:
- trunk
permissions:
# deployments permission to deploy GitHub pages website
deployments: write
# contents permission to update benchmark contents in gh-pages branch
contents: write
jobs:
benchmark:
name: Compiler performance regression check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: haskell-actions/setup@v2
with:
ghc-version: '9.6.2'
cabal-version: '3.10.1.0'
- name: Cache cabal global package db
id: cabal-global
uses: actions/cache@v3
with:
path: ~/.cabal
key: ${{ runner.os }}-2-cabal-global-${{ matrix.plan.ghc }}-${{ hashFiles('**.freeze') }}
restore-keys: |
${{ runner.os }}-2-cabal-global-${{ matrix.plan.ghc }}
- name: Cache cabal-installed programs in ~/.local/bin
id: cabal-programs
uses: actions/cache@v3
with:
path: ~/.cabal/bin
key: ${{ runner.os }}-2-cabal-programs-${{ matrix.plan.ghc }}-${{ hashFiles('**.freeze') }}
restore-keys: |
${{ runner.os }}-2-cabal-programs-${{ matrix.plan.ghc }}
- name: Cache .cabal-work
uses: actions/cache@v3
with:
path: dist-newstyle
key: ${{ runner.os }}-2-cabal-work-${{ matrix.plan.ghc }}-${{ hashFiles('**.freeze') }}
restore-keys: |
${{ runner.os }}-2-cabal-work-${{ matrix.plan.ghc }}
- name: Cabal update
run: cabal update
- name: Run benchmarks
run: make bench
- name: Create benchmark file
run: |
jq '.[2] | map({name: .reportName, unit: "Time (ms)", value: .reportAnalysis.anRegress[0].regCoeffs.iters.estPoint })' benchmarks/performance.json | tee sorted-results.json
# gh-pages branch is updated and pushed automatically with extracted benchmark data
- name: Store benchmark result
uses: benchmark-action/github-action-benchmark@v1
with:
name: Store benchmarks in Github Pages
tool: 'customSmallerIsBetter'
output-file-path: sorted-results.json
# Access token to deploy GitHub Pages branch
github-token: ${{ secrets.GITHUB_TOKEN }}
# Push and deploy GitHub pages branch automatically
auto-push: true