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 Jan 24, 2024
1 parent 83899dc commit 54962ab
Show file tree
Hide file tree
Showing 4 changed files with 105 additions and 41 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/github-page.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,17 +32,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
6 changes: 3 additions & 3 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ jobs:
strategy:
fail-fast: false
matrix:
ghc: ["8.10.7", "9.6.2"]
cabal: ["3.10.1.0"]
ghc: ["8.10.7", "9.6.4"]
cabal: ["3.10.2.0"]
os: [ubuntu-latest, macos-latest, windows-latest]

env:
# Modify this value to "invalidate" the cabal cache.
CABAL_CACHE_VERSION: "2024-01-16"
CABAL_CACHE_VERSION: "2024-01-24"

concurrency:
group: >
Expand Down
101 changes: 77 additions & 24 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

33 changes: 22 additions & 11 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 = "ghc964";
haddockShellCompiler = "ghc964";
# 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,14 +77,14 @@
# 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) {
# tools that work or should be used only with default compiler
haskell-language-server = "2.0.0.0";
hlint = "3.5";
stylish-haskell = "0.14.4.0";
haskell-language-server = nixpkgs.haskell-nix.sources."hls-2.6";
hlint = "3.6.1";
stylish-haskell = "0.14.5.0";
};
# and from nixpkgs or other inputs
shell.nativeBuildInputs = with nixpkgs; [ gh jq yq-go ];
Expand All @@ -92,9 +93,11 @@
# Skip cross compilers for the shell
shell.crossPlatforms = _: [];


# package customizations as needed. Where cabal.project is not
# specific enough, or doesn't allow setting these.
modules = [
{ reinstallableLibGhc = true; }
({pkgs, ...}: {
packages.cardano-api = {
configureFlags = ["--ghc-option=-Werror"];
Expand Down Expand Up @@ -137,25 +140,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 54962ab

Please sign in to comment.