-
-
Notifications
You must be signed in to change notification settings - Fork 10
feat: make use of Nix files to set up dev env #22
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
base: main
Are you sure you want to change the base?
Changes from all commits
f6543b1
3a89bf6
7534642
885db6b
cfde596
b7b5eed
a8c190f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,5 +1,8 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -e # Exit with nonzero exit code if anything fails | ||
| set -xe | ||
|
|
||
| /home/developer/nodejs/node/configure --ninja && make -C /home/developer/nodejs/node | ||
| cd /home/developer/nodejs/node | ||
| eval "$(direnv export bash)" | ||
|
|
||
| make -C /home/developer/nodejs/node build-ci | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does it have to use make? I think maybe it's about time that we can just use ninja in the GHA...it would be rather unfortunate to revert to make for development when the devcontainer is used, as it's not really pleasant to use for local development, and if the image is not built with ninja, then switching to ninja for development no longer hits the cache and everything has to be recompiled.
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The image is still using Ninja, it's defined in https://github.com/nodejs/node/blob/83ba6b107a067f5831b03ab69c787fcb35bdcb05/shell.nix#L87. The fact that the build is started with FWIW that's also what test-shared is doing on nodejs/node, and as you can see in e.g. https://github.com/nodejs/node/actions/runs/20067281194/job/57559349798, we're using Ninja there. |
||
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,10 +1,11 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -e # Exit with nonzero exit code if anything fails | ||
| set -xe | ||
|
|
||
| mkdir -p /home/developer/nodejs | ||
| cd /home/developer/nodejs | ||
| git clone https://github.com/nodejs/node.git --single-branch --branch main --depth 1 | ||
| cd /home/developer/nodejs/node | ||
| git remote add upstream https://github.com/nodejs/node.git | ||
| git restore-mtime # Restore file modification times to commit times for build cache to match. | ||
| git clone https://github.com/nodejs/node.git --depth 1 /home/developer/nodejs/node | ||
| ( | ||
| cd /home/developer/nodejs/node | ||
| git remote add upstream https://github.com/nodejs/node.git | ||
| git restore-mtime # Restore file modification times to commit times for build cache to match. | ||
| ) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,13 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -e # Exit with nonzero exit code if anything fails | ||
| set -xe | ||
|
|
||
| cd /home/developer/nodejs/node | ||
| eval "$(direnv export bash)" | ||
|
|
||
| make install PREFIX=/home/developer/.local -C /home/developer/nodejs/node | ||
| echo '' >> /home/developer/.bashrc | ||
| echo 'export PATH=/home/developer/.local/bin:$PATH' >> /home/developer/.bashrc | ||
| { | ||
| echo '' | ||
| # Expose the PATH generated by Nix + the recently built `node` installation | ||
| echo "export PATH=/home/developer/.local/bin:$PATH" | ||
| } >> /home/developer/.bashrc |
This file was deleted.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,9 @@ | ||
| #!/usr/bin/env bash | ||
|
|
||
| set -e # Exit with nonzero exit code if anything fails | ||
| set -xe | ||
|
|
||
| npm install -g @node-core/utils | ||
| cd /home/developer/nodejs/node | ||
| eval "$(direnv export bash)" | ||
|
|
||
| ncu-config set upstream upstream | ||
| ncu-config set branch main |
This file was deleted.
Uh oh!
There was an error while loading. Please reload this page.
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.
Can we make this a variable, so that we can have two nightly build workflows, one for shared builds and one for static ones, then users can easily choose different images when spinning a container? That'll be handy if say one day I need to reproduce a bug that only reproduces with shared builds, then I can just spin a container with the shared builds and build it quickly without compiling the entire V8 and whatnot when I am working on non-Linux.
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.
Done in 885db6b...a8c190f. I've set the default value to
false, to be consistent with the current images, though that's taking much longer to build