ghcide/.github/workflows/bench.yml
Javier Neira 27b4250bb2
Extend CI with all GHC minor versions supported by hls and fix ghc-8.8.3 and ghc-8.8.2 builds (#947)
* Extend CI matrix with all the GHC minor versions supported by HLS
  * Adding a new job for windows: ghc-8.10.2.2

* Use GADTs for all ghc versions in Development.IDE.Plugin.Completions.Logic 
  * Fix ghc-8.8.2 and ghc-8.8.3 builds

Co-authored-by: Pepe Iborra <pepeiborra@gmail.com>
2020-12-11 12:23:16 +01:00

59 lines
1.5 KiB
YAML

name: Benchmark
on: [pull_request]
jobs:
bench:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
ghc: ['8.10.2', '8.8.4', '8.6.5']
os: [ubuntu-latest, macOS-latest]
steps:
- uses: actions/checkout@v2
- run: git fetch origin master # check the master branch for benchmarking
- uses: actions/setup-haskell@v1
with:
ghc-version: ${{ matrix.ghc }}
cabal-version: '3.2'
enable-stack: false
- name: Cache Cabal
uses: actions/cache@v2
with:
path: |
~/.cabal/packages
~/.cabal/store
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal-bench
- run: cabal update
- run: cabal configure --enable-benchmarks
- name: Build
shell: bash
# Retry it three times to workaround compiler segfaults in windows
run: cabal build || cabal build || cabal build
- name: Bench
shell: bash
# run the tests without parallelism, otherwise tasty will attempt to run
# all test cases simultaneously which causes way too many hls
# instances to be spun up for the poor github actions runner to handle
run: cabal bench
- name: Display results
shell: bash
run: |
column -s, -t < bench-results/results.csv | tee bench-results/results.txt
- name: Archive benchmarking artifacts
uses: actions/upload-artifact@v2
with:
name: bench-results-${{ runner.os }}-${{ matrix.ghc }}
path: |
bench-results/results.*
bench-results/**/*.svg