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

build: add build workflow for debug nodejs #6103

Merged
merged 4 commits into from
Nov 10, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions .github/workflows/build-debug-node.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Build debug node

on:
workflow_dispatch:
inputs:
version:
required: true
description: 'Node.js version'

jobs:
build:
name: Build Debug version of Node.js
runs-on: buildjet-4vcpu-ubuntu-2204
strategy:
fail-fast: false
steps:
- name: Install dependencies
run: apt-get install python3 g++ make python3-pip

- name: Download Node.js source
uses: actions/checkout@v4
with:
repository: 'nodejs/node'
ref: 'v${{ github.event.inputs.version }}'
path: 'nodejs'

- name: Configure nodejs with debug flag
run: ./configure --debug
working-directory: 'nodejs'

- name: Compile the nodejs
run: make -j4
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it possible to use make -j$(nproc --all) here to default to the number of available cores?

working-directory: 'nodejs'

- name: Verify the build
run: make test-only
working-directory: 'nodejs'

- name: Create destination folder
run: mkdir -p ${{ github.workspace }}/nodejs-debug-build-${{ github.event.inputs.version }}

- name: Copy nodejs build
run: make install
working-directory: 'nodejs'
env:
DESTDIR: ${{ github.workspace }}/nodejs-debug-build-${{ github.event.inputs.version }}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Running make install only moves the Release version to the DESTDIR.

https://github.com/nodejs/node/blob/609cd7f5bf6c1b2373353fb3fcaed2a3bbe1efa7/tools/install.py#L146

You need to also copy nodejs/out/Debug/node binary over the Release binary in DESTDIR/lib/node (pretty sure about that dest path but not 1000%)


- name: Upload build to artifacts
uses: actions/upload-artifact@v3
with:
name: nodejs-debug-build-${{ github.event.inputs.version }}
path: nodejs-debug-build-${{ github.event.inputs.version }}


Loading