Skip to content

Commit

Permalink
Remove GHC9.2 from CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
carbolymer committed Dec 27, 2023
1 parent 1c10a28 commit ce1a5c1
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 16 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/github-page.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: "Haddock documentation"

on:
pull_request:
push:
branches:
- main
Expand Down Expand Up @@ -32,17 +33,17 @@ jobs:

- name: Fetch nix cache and update cabal indices
run: |
nix develop .\#ghc962 --command \
nix develop .\#haddockShell --command \
cabal update
- name: Build whole project
run: |
nix develop .\#ghc962 --command \
nix develop .\#haddockShell --command \
cabal build all
- name: Build documentation
run: |
nix develop .\#ghc962 --command \
nix develop .\#haddockShell --command \
cabal haddock-project --local --output=./haddocks --internal --foreign-libraries
- name: Compress haddocks
Expand Down
7 changes: 2 additions & 5 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,9 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: ["8.10.7", "9.2.7", "9.6.2"]
cabal: ["3.10.1.0"]
ghc: ["8.10.7", "9.6.3"]
cabal: ["3.10.2.0"]
os: [ubuntu-latest, macos-latest, windows-latest]
exclude:
- ghc: "9.2.7"
os: macos-latest

env:
# Modify this value to "invalidate" the cabal cache.
Expand Down
25 changes: 17 additions & 8 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@
inherit (nixpkgs) lib;

# see flake `variants` below for alternative compilers
defaultCompiler = "ghc928";
defaultCompiler = "ghc963";
haddockShellCompiler = "ghc963";
# We use cabalProject' to ensure we don't build the plan for
# all systems.
cabalProject = nixpkgs.haskell-nix.cabalProject' ({config, ...}: {
Expand Down Expand Up @@ -76,7 +77,7 @@
# tools we want in our shell, from hackage
shell.tools =
{
cabal = "3.10.1.0";
cabal = "3.10.2.0";
ghcid = "0.8.8";
}
// lib.optionalAttrs (config.compiler-nix-name == defaultCompiler) {
Expand Down Expand Up @@ -137,25 +138,33 @@
# This ensure hydra send a status for the required job (even if no change other than commit hash)
revision = nixpkgs.writeText "revision" (inputs.self.rev or "dirty");
};
};
legacyPackages = rec {
}
// { haddockShell = devShells.haddockShell; };
legacyPackages = {
inherit cabalProject nixpkgs;
# also provide hydraJobs through legacyPackages to allow building without system prefix:
inherit hydraJobs;
};
devShells = let
profillingShell = p: {
profilingShell = p: {
# `nix develop .#profiling` (or `.#ghc927.profiling): a shell with profiling enabled
profiling = (p.appendModule {modules = [{enableLibraryProfiling = true;}];}).shell;
};
in
profillingShell cabalProject
profilingShell cabalProject
# Additional shells for every GHC version supported by haskell.nix, eg. `nix develop .#ghc927`
// lib.mapAttrs (compiler-nix-name: _: let
p = cabalProject.appendModule {inherit compiler-nix-name;};
in
p.shell // (profillingShell p))
nixpkgs.haskell-nix.compiler;
p.shell // (profilingShell p))
nixpkgs.haskell-nix.compiler
# Add GHC 9.6 shell for haddocks
//
{ haddockShell = let
p = cabalProject.appendModule {compiler-nix-name = haddockShellCompiler;};
in
p.shell // (profilingShell p);
};
# formatter used by nix fmt
formatter = nixpkgs.alejandra;
}
Expand Down

0 comments on commit ce1a5c1

Please sign in to comment.