-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add CI with github actions #3409
Conversation
I’m in favor of merging this. As I laid out in the RFC (linked above) i would love to see something that adds value now instead of delaying further to reach perfection. This change is small and easy to revert whenever something else or better has been established. Let’s start having mandatory CI tests now and improve later. This will also mean that no further changes will be merged until the currently broken tests have been fixed. That definitely seems right to me. What’s not to like? |
.github/workflows/test.yml
Outdated
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: cachix/install-nix-action@v8 | ||
- run: nix-build release.nix --arg nix '{ outPath = ./.; revCount = 123; shortRev = "abcdefgh"; }' --arg systems '[ builtins.currentSystem ]' -A build -A binaryTarball -A coverage -A perlBindings -A tarball -A installerScript |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will not work once the flakes branch is merged because flake.nix
(which replaces release.nix
) does not accept arguments, and builtins.currentSystem
does not exist.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to build the coverage
job. It's currently broken, takes a long time to build and nobody ever looks at it anyway.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will not work once the flakes branch is merged because
flake.nix
(which replacesrelease.nix
) does not accept arguments, andbuiltins.currentSystem
does not exist.
Why cant' the release.nix
stay for compatibility with non-flake users? Couldn't we just do an import of release.nix
in the flake?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's what I did originally, but it's much more convenient to have one file rather than a release.nix, shell.nix, release-common.nix, ...
I disagree. It means that updating the github actions (e.g. when merging the flakes branch) becomes my responsibility, even though it already works fine in Hydra. That's why I've always objected to having multiple CI systems. |
Hydra isn't well-intergrated into GitHub PRs, Github Actions is. I see a lot of benefit from having CI results for each PR immediately visible inside the PR, as a status. I think it's the right thing, and this also means CI descriptions need to be updated if the underlying assumptions change. |
I agree, but then we should get rid of the Hydra jobset so that we don't have to deal with two CI systems. The main issue with that is the VM tests, but they're not that important (and the nix-copy-closure and remote build tests can probably be rewritten as regular tests if we avoid going through SSH). |
You pointed out a conflict with the flakes fork and @andi offered a simple way to work around this by sticking to the I won't disagree that it is desirable and preferable to have one definitive CI system but doesn't it make sense to look at what we have and what we can do right now ? My summary would be:
I understand that you don't want additional burden but to finally get all Nix PRs checked in the first place is something that I would argue removes burden. Furthermore we are talking about a very small A lot of people are very eager to get Nix PRs CI checked and i'm sure would be willing to help out to refactor a small GitHub actions yaml file when that becomes necessary (I don't want to question the results of the RFC process but I would argue this approach should be less maintenance than using ofborg). Once ofborg is ready, the |
PS: One more thought concerning the use of hydra - We could use https://github.com/nlewo/hydra-cli to integrate hydra. https://github.com/nlewo/hydra-cli/blob/master/.travis.yml
Note that the above is currently disfunctional because the hydra instance doesn't exist anymore iirc. |
@gilligan I think we should move long-term discussions to a separate issue - this PR is about adding the GitHub Action. @edolstra what about keeping the VM tests in hydra for now, until we have a better alternative, but drop everything from Hydra that's covered by this PR? We don't currently require a passing Hydra for Nix PRs anyways, but keeping to run the VM test we'd at least still have ways to quickly spot when we broke a test only visible in a VM test. Edit: With the command propsed from @gilligan we might even be able to expose the hydra status for the VM tests. |
aba2ad0
to
30962d2
Compare
About flakes branch: we can build nix and run flakes to do all the checks. |
Thank you Eelco ❤️ |
Thank you indeed! |
This builds nix on macos and linux, but avoids running three tests that require a VM.
It currently fails the build so that's a proof it adds value :)
In the future I plan to add installer script as an artifact.
I commit to maintain the CI, but I'd welcome anyone to help me out.