Skip to content

Commit 6fafed7

Browse files
committed
Update CI to run and export benchmarks across several GHC versions
1 parent 39a37e9 commit 6fafed7

File tree

2 files changed

+25
-4
lines changed

2 files changed

+25
-4
lines changed

.github/workflows/ci.yaml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,24 @@ jobs:
3333
- name: Update Cabal's database
3434
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "cabal update"
3535
- name: Build Cabal's dependencies
36-
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "cabal build --allow-newer --disable-tests --disable-benchmarks --dependencies-only"
36+
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "cabal build --dependencies-only"
3737
- name: Build
38-
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "cabal build --allow-newer --disable-tests --disable-benchmarks"
38+
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "cabal build"
3939
- name: Haddock
40-
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "cabal --allow-newer haddock"
40+
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "cabal haddock --allow-newer"
4141
- name: cabal-docspec
42-
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run cabal-docspec
42+
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "cabal-docspec"
43+
- name: Build benchmarks
44+
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "cabal build linear-base:bench:bench"
45+
- name: Run benchmarks
46+
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "cabal bench 2>&1 | tee benchmark_ghc${{ matrix.ghc-version }}.txt"
47+
- name: Upload benchmark results
48+
uses: actions/upload-artifact@v3
49+
with:
50+
name: linear-base_benchmarks_ghc${{ matrix.ghc-version }}
51+
path: |
52+
benchmark_ghc${{ matrix.ghc-version }}.txt
53+
retention-days: 90
4354

4455
ormolu:
4556
name: check formatting with ormolu

cabal.project

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
11
packages: *.cabal
2+
3+
tests: False
4+
benchmarks: False
5+
allow-newer: all
6+
index-state: 2024-09-13T13:31:57Z
7+
8+
-- But as of 2024-09-11, the latest version of the `unix` 2.8.5.1 package has a conditional bound on `filepath` depending on the `os-string` flag (see https://hackage.haskell.org/package/unix-2.8.5.1/dependencies).
9+
-- With no extra parameter or setting, we get a dependency conflict on `filepath`, as other libs use a version of `filepath` incompatible with the one `unix` wants.
10+
-- Setting `filepath` to 1.4.2.2 fixes that.
11+
constraints: filepath ==1.4.2.2

0 commit comments

Comments
 (0)