Skip to content

Commit

Permalink
Remove GHC9.2 from CI. Use GHC 9.6.3 as default.
Browse files Browse the repository at this point in the history
  • Loading branch information
carbolymer committed Jan 25, 2024
1 parent 6347927 commit 4fb9175
Show file tree
Hide file tree
Showing 4 changed files with 112 additions and 55 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
119 changes: 86 additions & 33 deletions flake.lock

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

36 changes: 20 additions & 16 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
# setup our nixpkgs with the haskell.nix overlays, and the iohk-nix
# overlays...
nixpkgs = import inputs.nixpkgs {
overlays = with inputs; [
overlays = [
# iohkNix.overlays.crypto provide libsodium-vrf, libblst and libsecp256k1.
inputs.iohkNix.overlays.crypto
# haskellNix.overlay can be configured by later overlays, so need to come before them.
Expand All @@ -45,7 +45,8 @@
inherit (nixpkgs) lib;

# see flake `variants` below for alternative compilers
defaultCompiler = "ghc928";
defaultCompiler = "ghc963";
haddockShellCompiler = defaultCompiler;
# 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 = "2.5.0.0";
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,6 +93,7 @@
# 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 = [
Expand Down Expand Up @@ -137,25 +139,27 @@
# 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
# 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;
profilingShell cabalProject
# 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 4fb9175

Please sign in to comment.