Skip to content

Commit

Permalink
Update CI to run and export benchmarks across several GHC versions
Browse files Browse the repository at this point in the history
  • Loading branch information
tbagrel1 committed Sep 11, 2024
1 parent 4b0b15c commit 1fcc277
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 5 deletions.
11 changes: 10 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,16 @@ jobs:
- name: Haddock
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "cabal --allow-newer haddock"
- name: cabal-docspec
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run cabal-docspec
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "cabal-docspec"
- name: Run benchmarks
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "cabal bench --allow-newer 2>&1 | tee benchmark_ghc${{ matrix.ghc-version }}.txt"
- name: Upload benchmark results
uses: actions/upload-artifact@v3
with:
name: linear-base_benchmarks_ghc${{ matrix.ghc-version }}
path: |
benchmark_ghc${{ matrix.ghc-version }}.txt
retention-days: 365

ormolu:
name: check formatting with ormolu
Expand Down
8 changes: 4 additions & 4 deletions linear-base.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@ common build-opts
-- Additional warnings we may consider adding:
-- * -Wredundant-constraints : would need deactivating in the modules which use Nat
common rts-opts-multithread
ghc-options: -threaded -rtsopts -with-rtsopts=-N
common rts-opts-monothread
ghc-options: -threaded -rtsopts -with-rtsopts=-N1
ghc-options: -threaded -rtsopts "-with-rtsopts=-N"
common rts-opts-monothread-stats
ghc-options: -threaded -rtsopts "-with-rtsopts=-N1 -T"

library
import: build-opts
Expand Down Expand Up @@ -212,7 +212,7 @@ test-suite test-examples

benchmark bench
import: build-opts
import: rts-opts-monothread
import: rts-opts-monothread-stats
type: exitcode-stdio-1.0
main-is: Main.hs
hs-source-dirs: bench
Expand Down

0 comments on commit 1fcc277

Please sign in to comment.