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

Minimize nix dependencies for CI #3223

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

wolfgangwalther
Copy link
Member

@wolfgangwalther wolfgangwalther commented Feb 11, 2024

As discussed in #3211, one way to make CI is faster is to just reduce the number of dependencies we pull in for all our tooling. The heaviest tool is withTools - it includes the full postgrest environment (GHC + all deps) and postgresql in many different versions, including all it's dependencies.

The closure of withTools is currently 7.9G on main. After all the changes in this PR, it sits at around 2.1G. This should make a big difference.

I did the following:

  • Removed pg9.6 and pg10 as prepared for in feat: drop support for pg 9.6 #2052.
  • Removed pg11 on top of that as proposed in feat: drop support for pg 9.6 #2052 (comment) - this removes the duplicated buildchain from the older nixpkgs version.
  • Removed postgis, which gives us somewhere between 1G and 1.5G as well. Heavy dependencies here. Maybe we can replace our postgis support with the new domain-based mimetype handling anyway? Not sure whether that's discussed somewhere already.
  • Reconfigured postgresql without many optional dependencies. No systemd, no icu, no gssapi, no debug symbols. None of this affects the libpq we are building to actually link against, though. This is just about the 5-8 copies of postgresql we have laying around for our tests.
  • Reconfigured GHC to not create profiled libs or dynamic libs - it uses static libs only anyway. We'd need the profiled libs for the memory test - but this can be a separate build of GHC including only the profiled libs. Then the memory test would only have to download those and not everything as well.

This is still heavily WIP. I made no effort, so far, to make the static build work, nor did I actually make sure the tests pass etc. This first test is just about evaluating how much time we potentially saving for CI jobs.

@wolfgangwalther wolfgangwalther marked this pull request as ready for review February 11, 2024 20:06
@wolfgangwalther wolfgangwalther marked this pull request as draft February 11, 2024 20:07
PostgreSQL 11 is EOL already, so we only support the latest minor release, which
is 11.22. Since the legacy nixpkgs we import PG in for our tests only has 11.21,
we are happy with that as well.
PostgreSQL 11 is EOL since November 2023.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant