Skip to content

Commit

Permalink
ci: build several GHC versions
Browse files Browse the repository at this point in the history
  • Loading branch information
DavSanchez committed May 20, 2024
1 parent f536643 commit 64389b5
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 10 deletions.
70 changes: 70 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,73 @@ jobs:

- name: Build with Nix (runs tests)
run: nix build

default-ghc:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4

- name: Install Nix
uses: cachix/install-nix-action@v27

- name: Enable cache for Nix
uses: DeterminateSystems/magic-nix-cache-action@v2

- name: Build default package with Nix
run: nix build


ghc-94:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4

- name: Install Nix
uses: cachix/install-nix-action@v27

- name: Enable cache for Nix
uses: DeterminateSystems/magic-nix-cache-action@v2

- name: Build package with Nix (GHC 9.4)
run: nix build ".#richenv-ghc94"


ghc-98:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4

- name: Install Nix
uses: cachix/install-nix-action@v27

- name: Enable cache for Nix
uses: DeterminateSystems/magic-nix-cache-action@v2

- name: Build package with Nix (GHC 9.8)
run: nix build ".#richenv-ghc98"

ghc-910:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- uses: actions/checkout@v4

- name: Install Nix
uses: cachix/install-nix-action@v27

- name: Enable cache for Nix
uses: DeterminateSystems/magic-nix-cache-action@v2

- name: Build package with Nix (GHC 9.10)
run: nix build ".#richenv-ghc910"
16 changes: 7 additions & 9 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@

outputs = inputs @ {flake-parts, ...}:
flake-parts.lib.mkFlake {inherit inputs;} {
imports = [
inputs.git-hooks.flakeModule
imports = with inputs; [
git-hooks.flakeModule
# haskell-flake.flakeModule
];

systems = [
Expand Down Expand Up @@ -41,8 +42,6 @@
ormolu.enable = true;
hlint.enable = true;
hpack.enable = true;
# yamllint.enable = true;
# hunspell.enable = true;
};
};
};
Expand All @@ -65,11 +64,10 @@
packages = {
default = pkgs.haskellPackages.callPackage ./default.nix {};

ghc92 = pkgs.haskell.packages.ghc92.callPackage ./default.nix {};
ghc94 = pkgs.haskell.packages.ghc94.callPackage ./default.nix {};
ghc96 = pkgs.haskell.packages.ghc96.callPackage ./default.nix {};
ghc98 = pkgs.haskell.packages.ghc98.callPackage ./default.nix {};
ghc910 = pkgs.haskell.packages.ghc910.callPackage ./default.nix {};
richenv-ghc94 = pkgs.haskell.packages.ghc94.callPackage ./default.nix {};
# richenv-ghc96 = pkgs.haskell.packages.ghc96.callPackage ./default.nix {};
richenv-ghc98 = pkgs.haskell.packages.ghc98.callPackage ./default.nix {};
richenv-ghc910 = pkgs.haskell.packages.ghc910.callPackage ./default.nix {};
};
};
};
Expand Down
2 changes: 1 addition & 1 deletion richenv.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ extra-doc-files:
-- Extra source files to be distributed with the package, such as examples, or a tutorial module.
-- extra-source-files:

tested-with: GHC ==9.2.8 || ==9.4.8 || ==9.6.5 || ==9.8.2 || ==9.10.1
tested-with: GHC ==9.4.8 || ==9.6.5 || ==9.8.2 || ==9.10.1

source-repository head
type: git
Expand Down

0 comments on commit 64389b5

Please sign in to comment.