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

ci: Use Nix for obtaining dependencies #1235

Merged
merged 6 commits into from
Dec 24, 2020
Merged

ci: Use Nix for obtaining dependencies #1235

merged 6 commits into from
Dec 24, 2020

Conversation

jtojnar
Copy link
Member

@jtojnar jtojnar commented Dec 16, 2020

Previously we were installing

  • PHP using Travis’s built-in mechanism that downloads distributions-specific tarballs (PHP 7.1 is not compatible with focal),
  • Composer using itself,
  • Python using pyenv (quite slow),
  • Python libraries using pip,
  • Node using nvm,
  • jq using apt,
  • PHP dependencies using Composer,
  • client-side dependencies using npm.

Switching to Nix will allow us to get rid of all except the last two methods and achieve fully reproducible environment across both CI and developers’ machines.

The travis config is based on https://github.com/cachix/travis-ci-example.

Also allows us to switch distribution to focal.

@jtojnar jtojnar force-pushed the nix-ci branch 5 times, most recently from 467c828 to e5ef5a8 Compare December 16, 2020 20:36
@jtojnar jtojnar changed the title nix: Clean up PHP definitions ci: Use Nix for obtaining dependencies Dec 16, 2020
@jtojnar jtojnar force-pushed the nix-ci branch 6 times, most recently from a37e9cd to 2b2b7dd Compare December 18, 2020 15:48
I added `packageOverrides` argument to `php` package in nixpkgs, allowing us to simplify the php definitions a lot.
This will allow us to run integration test and create-zipball script reproducibly.
Previously we were installing

- PHP using Travis’s built-in mechanism that downloads distributions-specific tarballs (PHP 7.1 is not compatible with focal),
- Composer using itself,
- Python using pyenv (quite slow),
- Python libraries using pip,
- Node using nvm,
- jq using apt,
- PHP dependencies using Composer,
- client-side dependencies using npm.

Switching to Nix will allow us to get rid of all except the last two methods and achieve fully reproducible environment across both CI and developers’ machines.

The travis config is based on https://github.com/cachix/travis-ci-example.

Also allows us to switch distribution to focal.

Additionally, I had to add shebang to bump-version.js and make it executable since npm run does not seem to set $NODE any more.
@jtojnar jtojnar marked this pull request as ready for review December 24, 2020 11:15
@jtojnar jtojnar merged commit e6e1ba7 into master Dec 24, 2020
@jtojnar jtojnar deleted the nix-ci branch December 24, 2020 11:50
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.

1 participant