rustlings icon indicating copy to clipboard operation
rustlings copied to clipboard

improvement(ci): Now github should also check if the nix dev-env/buil…

Open x10an14 opened this issue 2 years ago • 3 comments

…d breaks

x10an14 avatar Aug 30 '23 16:08 x10an14

Depends on #1650

x10an14 avatar Aug 30 '23 16:08 x10an14

Needs some debugging/fixing as to why the x86_64-linux experience on multiple private machines, break on the Ubuntu Github Actions build envs.

Any help from others to test the nix commands that fail is very welcome.

x10an14 avatar Sep 04 '23 12:09 x10an14

hi @x10an14 I gave your workflow a try, and this is what I found:

nix-build-and-run-rustlings

The nix-build-and-run-rustlings job seems to fail because of the rustc version.

Error:

> error: package `clap_derive v4.4.2` cannot be built because it requires rustc 1.70.0 or newer, while the currently active rustc version is 1.64.0

The error does not happen if I try a new build. I guess the rustc version was maybe bumped up in the Nix build.

Here is the link to a successful run with the --debug flag: nix-build-and-run-rustlings

copying path '/nix/store/66a3ip9miaimi7gyhl6jdzbjchp76ccv-rustc-1.72.0' from 'https://cache.nixos.org/'...
locking path '/nix/store/66a3ip9miaimi7gyhl6jdzbjchp76ccv-rustc-1.72.0'
lock acquired on '/nix/store/66a3ip9miaimi7gyhl6jdzbjchp76ccv-rustc-1.72.0.lock'

So this seems OK now.

nix-dev-shell

The nix-dev-shell job fails with this error:

error: flake output attribute 'devShell' is not a derivation or path

I am not very good with Nix but looking at the flake.nix file and the Flake docs here and here the error makes sense, as it doesn't look like devShell is defined as packages."<system>"."<name>".

If I replace nix build .#devShell with nix build .#rustlings-app instead I get this different error:

error: flake 'git+file:///home/runner/work/rustlings/rustlings?shallow=1' does not provide attribute 'packages.x86_64-linux.rustlings-app', 'legacyPackages.x86_64-linux.rustlings-app' or 'rustlings-app'

I did some additional testing in this branch if anybody is interested in seeing the results: https://github.com/markgreene74/rustlings/tree/test/x10an14-fork-add-nix-github-workflow

markgreene74 avatar Oct 21 '23 15:10 markgreene74

Closing because of missing response. Things will change in v6 anyway so we probably need something else then.

mo8it avatar Apr 01 '24 17:04 mo8it

Apologies for missing the message you expected a response to. What are the plans for v6? Where/what issue/PR can I read up on them?

x10an14 avatar Apr 01 '24 18:04 x10an14