Skip to content

Commit 058f5c7

Browse files
committed
Update CI to run and export benchmarks across several GHC versions
1 parent 95776ea commit 058f5c7

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

.github/workflows/ci.yaml

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,20 @@ jobs:
3737
- name: Build
3838
run: nix-shell --arg ghcVersion '"${{ matrix.ghc-version }}"' --arg installHls 'false' --pure --run "cabal build --allow-newer --disable-tests --disable-benchmarks"
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 --allow-newer"
45+
- name: Run benchmarks
46+
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"
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: 365
4354

4455
ormolu:
4556
name: check formatting with ormolu

cabal.project

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,7 @@
11
packages: *.cabal
2+
3+
-- We need the `--alloc-newer` flag on cabal invocations because otherwise a build plan cannot be found.
4+
-- 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).
5+
-- 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.
6+
-- Setting `filepath` to 1.4.2.2 fixes that.
7+
constraints: filepath ==1.4.2.2

0 commit comments

Comments
 (0)