Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build nix develop for all GHCs #372

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 21 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,28 @@ jobs:
run: nix flake check
- name: Build all packages
run: nix build --accept-flake-config

build-devshell:
name: Nix Flake Develop
needs:
- generateMatrix
- build-flake
strategy:
matrix: ${{ fromJSON(needs.generateMatrix.outputs.matrix) }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v30
- uses: DeterminateSystems/magic-nix-cache-action@v8
- uses: cachix/cachix-action@v15
with:
name: rhine
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Run tests
run: |
nix develop --accept-flake-config -c cabal update
nix develop --accept-flake-config -c cabal test all
ghc="ghc$(echo ${{ matrix.ghc }} | tr -d '.')" # Removes the dot from the ghc version and prepends "ghc"
nix develop .#${ghc} --accept-flake-config -c cabal update
nix develop .#${ghc} --accept-flake-config -c cabal test all

cabal-check:
name: Check and format all cabal files
Expand All @@ -154,6 +172,7 @@ jobs:
needs:
- build-cabal
- build-flake
- build-devshell
runs-on:
- ubuntu-latest
steps:
Expand Down
6 changes: 3 additions & 3 deletions flake.lock

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

6 changes: 6 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@
(hfinal: hprev: lib.optionalAttrs (lib.versionOlder hprev.ghc.version "9.4") {
time-domain = doJailbreak hprev.time-domain;
})
(hfinal: hprev: lib.optionalAttrs (lib.versionOlder hprev.ghc.version "9.6") {
cabal-gild = null; # cabal-gild is only available from 9.6 onwards
fourmolu = null;
haskell-language-server = null;
cabal-install = null;
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well that would suck

})
(hfinal: hprev: lib.optionalAttrs (lib.versionAtLeast hprev.ghc.version "9.10") {
# Remove these as nixpkgs progresses!
finite-typelits = doJailbreak hprev.finite-typelits;
Expand Down
10 changes: 5 additions & 5 deletions rhine/rhine.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,11 @@ data-files:
test/assets/*.txt

tested-with:
ghc ==9.2.8
ghc ==9.4.7
ghc ==9.6.4
ghc ==9.8.2
ghc ==9.10.1
ghc ==9.2
ghc ==9.4
ghc ==9.6
ghc ==9.8
ghc ==9.10

source-repository head
type: git
Expand Down
Loading