Skip to content

Move Linux & Mac OS tests into the Nix GitHub action #768

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

Closed
wants to merge 3 commits into from

Conversation

pepeiborra
Copy link
Collaborator

Merge the Test Github Action into the Nix one, leaving the Windows tests on their own Github action.

Reasons:

  • Avoid redundant work, saving 6 jobs. The CI is very heavily overloaded right now and every bit helps.
  • The Nix caching seems much more reliable, taking only ~10m to build everything whereas the Test action takes >30m since Cabal rebuilds all the dependencies
  • https://github.com/cachix/pre-commit-hooks.nix can be useful in the future

Got lost during the ghcide merge
@jneira
Copy link
Member

jneira commented Jan 1, 2021

jumm not sure about this, in the past nix and Linux/macos had failed independently for different causes and afaik most Linux/macos users don't use nix for building but raw cabal/stack
I would investigate instead why cabal is rebuilding continuously deps, it should not do it (due precisely to the nix-style cache of v2 builds!)

@pepeiborra
Copy link
Collaborator Author

@jneira the Nix job uses cabal install to build the project, just like the Test job definition does.
The Nix job exists to validate that the Nix derivations are kept up to date when the project layout changes. The goal of this PR is to combine that check with the other checks in the Test job. This is a union, not an intersection, i.e. there is no loss of information involved.

@pepeiborra
Copy link
Collaborator Author

Actually, the Nix shell script does not offer caching for ghc versions other than the default one (ghc 8.10.1) and cannot do so, since the Nix haskell snapshot builds on the Stackage nightly snapshot, so it's not compatible with earlier ghc versions.

This means that the Nix action is not a good replacement (in terms of caching) for the Test action, so I'm dropping this PR

@pepeiborra pepeiborra closed this Jan 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants