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: install Nushell from latest nightly build #30

Merged
merged 9 commits into from
Oct 15, 2023

Conversation

amtoine
Copy link
Member

@amtoine amtoine commented Oct 12, 2023

related to

should close #29

Description

this PR uses the nightly builds of Nushell to save download + compilation time. The CI goes
from

Changelog

this PR uses $nu.current-exe instead of implicite nu in nupm install and nupm test: this allows to not rely on nu being in the PATH, e.g. inside $HOME/ in the CI

the CI

  • does not install Rust and Cargo anymore
  • pulls the latest asset with curl and jq
  • uses different architecture and archive tool per platform
  • extracts the archive to $HOME/nu
  • shows the version of Nushell
  • can run on workflow dispatch, i.e. manually

Note
there is a trick to run use nupm on Windows...
see the Run the tests step, the goal being to avoid that kind of error

@amtoine amtoine closed this Oct 12, 2023
@amtoine amtoine reopened this Oct 12, 2023
@amtoine amtoine force-pushed the ci-use-nightly-build branch 2 times, most recently from bd320f4 to 6bd87bc Compare October 12, 2023 09:35
@amtoine amtoine changed the title get the latest build with jq and extract the tarball CI: install Nushell from latest nightly build Oct 12, 2023
@amtoine amtoine marked this pull request as ready for review October 12, 2023 13:43
@amtoine amtoine requested a review from kubouch October 12, 2023 13:43
@amtoine amtoine marked this pull request as draft October 12, 2023 14:51
@amtoine amtoine marked this pull request as ready for review October 12, 2023 14:56
@amtoine
Copy link
Member Author

amtoine commented Oct 12, 2023

ok, enough with the back and forth 👀 😉 😆

@kubouch kubouch merged commit a4a1ca9 into nushell:main Oct 15, 2023
3 checks passed
@amtoine amtoine deleted the ci-use-nightly-build branch October 15, 2023 11:14
@fdncred
Copy link
Collaborator

fdncred commented Oct 15, 2023

wow, 7 minutes to 10 seconds. That's a huge difference.

@amtoine
Copy link
Member Author

amtoine commented Oct 15, 2023

wow, 7 minutes to 10 seconds. That's a huge difference.

pretty nice, right? 😏

it's just so much better to reuse the compilation from Nightly 💪 👌

melMass pushed a commit to amtoine/nu-git-manager that referenced this pull request Oct 19, 2023
related to
- nushell/nupm#30
- #24

wait for these to land 
- nushell/nupm#30

## description
this PR
- adds an empty `tests/mod.nu` module so that `nupm test` can work
- adds a CI greatly inspired by nushell/nupm#30
  - does not need the `CWD` trick for Windows (:pray:)
  - pulls down Nushell from nightly builds
  - clones Nupm
  - shows the version of Nushell
  - runs the tests
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.

grab the nightly build of Nushell in the CI
3 participants