File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -60,10 +60,12 @@ jobs:
6060 mkdir -p ./bcrypt@5.1.0/node_modules
6161 mkdir -p ./cld@2.9.1/node_modules
6262 mkdir -p ./unix-dgram@2.0.6/node_modules
63+ mkdir -p "./@datadog+pprof@5.8.0/node_modules/@datadog"
6364 mv node_modules/bcrypt ./bcrypt@5.1.0/node_modules/
6465 mv node_modules/cld ./cld@2.9.1/node_modules/
6566 mv node_modules/unix-dgram ./unix-dgram@2.0.6/node_modules/
66- tar --hard-dereference -cvzf packages_${{matrix.arch}}.tar.gz bcrypt@5.1.0 cld@2.9.1 unix-dgram@2.0.6
67+ mv "node_modules/@datadog/pprof" "./@datadog+pprof@5.8.0/node_modules/@datadog/"
68+ tar --hard-dereference -cvzf packages_${{matrix.arch}}.tar.gz bcrypt@5.1.0 cld@2.9.1 unix-dgram@2.0.6 "@datadog+pprof@5.8.0"
6769
6870 - name : Upload archive to release
6971 uses : softprops/action-gh-release@v1
Original file line number Diff line number Diff line change @@ -28,6 +28,23 @@ RUN npm i --nodedir="/usr/src/node/node-install/usr/local" bcrypt@5.1.0
2828RUN npm i --nodedir="/usr/src/node/node-install/usr/local" cld@2.9.1
2929RUN npm i --nodedir="/usr/src/node/node-install/usr/local" unix-dgram@2.0.6
3030
31+ # Build @datadog/pprof from source against Asana custom Node.
32+ # The npm package ships with "install: exit 0" and no C++ source (only prebuilts),
33+ # so we clone from GitHub to build the native binding against our pointer-compressed V8.
34+ # The standard prebuilts are ABI-incompatible with --experimental-enable-pointer-compression.
35+ RUN npm i @datadog/pprof@5.8.0 --ignore-scripts
36+ RUN git clone --branch v5.8.0 --depth 1 https://github.com/DataDog/pprof-nodejs.git /usr/src/pprof-source
37+ WORKDIR /usr/src/pprof-source
38+ RUN npm install --ignore-scripts
39+ RUN npm_config_nodedir="/usr/src/node/node-install/usr/local" node_modules/.bin/node-gyp rebuild --jobs=max
40+ # Replace the linux prebuilt with our pointer-compression-compatible binary.
41+ # NODE_MODULE_VERSION and arch are read dynamically from the custom Node binary.
42+ WORKDIR /usr/src/node
43+ RUN ARCH=$(node -e "process.stdout.write(process.arch)") && \
44+ MODULES_VER=$(node -e "process.stdout.write(process.versions.modules)") && \
45+ cp /usr/src/pprof-source/build/Release/profiler.node \
46+ node_modules/@datadog/pprof/prebuilds/linuxglibc-${ARCH}/node-${MODULES_VER}.node
47+
3148RUN ls
3249RUN ls node_modules
3350
You can’t perform that action at this time.
0 commit comments