-
-
Notifications
You must be signed in to change notification settings - Fork 330
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
32 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,23 @@ | ||
name: 'Setup node with debug support' | ||
description: 'Setup the nodejs version with debug support' | ||
inputs: | ||
node-version: | ||
description: 'Version of nodejs' | ||
required: true | ||
default: '20' | ||
debug: | ||
description: Enable the debug version | ||
required: true | ||
default: 'false' | ||
|
||
name: "Setup node with debug support" | ||
description: "Setup the nodejs version with debug support" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ inputs.node-version }} | ||
check-latest: true | ||
cache: yarn | ||
|
||
# For now we only have the Node 20 debug build | ||
- run: sudo apt-get install unzip && curl -L "https://drive.google.com/uc?export=download&id=1hlhbbQi-NJi8_WjULvOdo-K_tfZFzN3Z&confirm=t" > nodejs.zip && unzip nodejs.zip | ||
shell: sh | ||
if: ${{ inputs.debug == 'true' }} | ||
- run: sudo cp -f node $(which node) | ||
shell: sh | ||
if: ${{ inputs.debug == 'true' }} | ||
- run: sudo sh -c "ulimit -c unlimited" | ||
- run: | | ||
sudo apt-get install unzip && curl -L "https://drive.google.com/uc?export=download&id=1hlhbbQi-NJi8_WjULvOdo-K_tfZFzN3Z&confirm=t" > nodejs.zip && unzip nodejs.zip | ||
sudo cp -f node /usr/bin/node-with-debug | ||
sudo chmod +x /usr/bin/node-with-debug | ||
shell: sh | ||
if: ${{ inputs.debug == 'true' }} | ||
- run: sudo sh -c "echo core > /proc/sys/kernel/core_pattern" | ||
shell: sh | ||
if: ${{ inputs.debug == 'true' }} | ||
- run: echo $(node --print "process.version") | ||
# List of naming patterns | ||
# https://man7.org/linux/man-pages/man5/core.5.html | ||
- run: | | ||
sudo mkdir -p /cores | ||
sudo sh -c "echo /cores/core-%e-%s-%u-%g-%p-%t > /proc/sys/kernel/core_pattern" | ||
shell: sh | ||
- run: echo $(node --print "process.features.debug") | ||
- run: | | ||
echo $(/usr/bin/node-with-debug --print "process.version") | ||
echo $(/usr/bin/node-with-debug --print "process.features.debug") | ||
shell: sh | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters