-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Test macos/linux installer script for each push #4549
Conversation
37d7437
to
936e7df
Compare
Wouldn't it be better to serve the tarball from GitHub as an uploaded artifact?
This is probably because changing |
Yes! However that's really tricky to implement as the installer script wants urls hardcoded for each platform.
What's the workaround here? A new flake that changes input for |
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.
You are missing final new lines.
936e7df
to
54ba51c
Compare
@abathur this PR creates an artifact, that is a zip file containing a tar that has the executable to install Nix. That's a huge hack due to limitations of GHA that it always creates a zip out of artifacts and that those artifacts are never executables. Maybe it would be easier to just print the url for the installer instead, that would allow us to use it with cachix-action. WDYT? |
08d19d9
to
d8daada
Compare
This works by using Cachix feature of serving a file from a store path.
af978fd
to
22aec8c
Compare
This PR now adds automated testing of installer script via GHA.
|
@edolstra this is ready to be merged and it already caught a bug :) |
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.
Really cool!
Is there a way to print some instructions for installing this locally? Afaict the actuall installer URL is never shown in the logs nor exported in any way (maybe this could even be exported in an artifact)
I tried an artifact before, but it doesn't preserve execution bit. install-nix-action inputs are printed in beginning of the log |
Yeah I saw that, I was just thinking of a plain text file containing the actual URL or something like that. But it's not really important, and certainly not a blocker for this PR.
Uh. So today I learned that the little triangle at the begining of the |
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/anyone-up-for-picking-at-some-nix-onboarding-improvements/13152/1 |
#- run: nix flake check | ||
- run: nix-build -A checks.$(if [[ `uname` = Linux ]]; then echo x86_64-linux; else echo x86_64-darwin; fi) | ||
installer: | ||
if: github.event_name == 'push' |
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.
The commit message says PR/push
while this is only on push
would this test have caught the typo introduced in #6285 if the test was run?
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.
Probably, though iirc they still won't run if you don't have your own cachix key (and, as a glance at the master history shows, these are not always green).
This works by using Cachix feature of serving a file from
a store path.
Fixes #4564
Fixes #4047
cc @edolstra