Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
60 changes: 59 additions & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
with:
node-version-file: "package.json"
- name: Install Yarn (if not yet installed)
run: yarn --version || npm install -g yarn@1.22.22
- name: Install dependencies
run: yarn install --ignore-engines --ignore-scripts --frozen-lockfile
- name: Lint
Expand Down Expand Up @@ -49,6 +51,10 @@ jobs:
container: ghcr.io/getsentry/sentry-test-ubuntu-20.04-amd64:0dd255f3d41d013c1db4c4e08ffd22ee7959c3cc
node: 24
binary: linux-x64-glibc-137
- os: ubuntu-22.04
container: ghcr.io/getsentry/sentry-test-ubuntu-20.04-amd64:0dd255f3d41d013c1db4c4e08ffd22ee7959c3cc
node: 26
binary: linux-x64-glibc-147

# x64 musl
- os: ubuntu-22.04
Expand All @@ -67,6 +73,10 @@ jobs:
container: node:24-alpine3.20
node: 24
binary: linux-x64-musl-137
- os: ubuntu-22.04
container: node:26-alpine3.22
node: 26
binary: linux-x64-musl-147

# arm64 glibc
- os: ubuntu-22.04
Expand All @@ -85,6 +95,10 @@ jobs:
arch: arm64
node: 24
binary: linux-arm64-glibc-137
- os: ubuntu-22.04
arch: arm64
node: 26
binary: linux-arm64-glibc-147

# arm64 musl
- os: ubuntu-22.04
Expand All @@ -107,6 +121,11 @@ jobs:
container: node:24-alpine3.20
node: 24
binary: linux-arm64-musl-137
- os: ubuntu-22.04
arch: arm64
container: node:26-alpine3.22
node: 26
binary: linux-arm64-musl-147

# macos x64
- os: macos-15-intel
Expand All @@ -125,6 +144,10 @@ jobs:
node: 24
arch: x64
binary: darwin-x64-137
- os: macos-15-intel
node: 26
arch: x64
binary: darwin-x64-147

# macos arm64
- os: macos-15
Expand All @@ -147,6 +170,11 @@ jobs:
node: 24
target_platform: darwin
binary: darwin-arm64-137
- os: macos-15
arch: arm64
node: 26
target_platform: darwin
binary: darwin-arm64-147

# windows x64
- os: windows-2022
Expand All @@ -165,6 +193,10 @@ jobs:
node: 24
arch: x64
binary: win32-x64-137
- os: windows-2022
node: 26
arch: x64
binary: win32-x64-147

steps:
- name: Setup (alpine)
Expand All @@ -185,6 +217,8 @@ jobs:
if: contains(matrix.container, 'alpine') == false
with:
node-version: ${{ matrix.node }}
- name: Install Yarn (if not yet installed)
run: yarn --version || npm install -g yarn@1.22.22

- name: Increase yarn network timeout on Windows
if: contains(matrix.os, 'windows')
Expand All @@ -204,6 +238,22 @@ jobs:
with:
python-version: "3.9.13"

# Node 26 V8 headers include <source_location>, which requires a newer C++ toolchain.
# Our ubuntu-20.04 glibc container defaults to an older compiler, so upgrade only this target.
- name: Setup compiler (Node 26 glibc x64)
if: matrix.binary == 'linux-x64-glibc-147'
run: |
# The base container ships a stale Yarn apt source with an expired/missing key.
# Remove it so apt-get update can succeed for toolchain installation.
rm -f /etc/apt/sources.list.d/yarn.list
apt-get update
apt-get install -y software-properties-common
add-apt-repository -y ppa:ubuntu-toolchain-r/test
apt-get update
apt-get install -y gcc-12 g++-12
echo "CC=gcc-12" >> "$GITHUB_ENV"
echo "CXX=g++-12" >> "$GITHUB_ENV"

- name: Setup (arm64| ${{ contains(matrix.container, 'alpine') && 'musl' || 'glibc' }})
if: matrix.arch == 'arm64' && !contains(matrix.container, 'alpine') && matrix.target_platform != 'darwin'
run: |
Expand Down Expand Up @@ -280,6 +330,8 @@ jobs:
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
with:
node-version-file: "package.json"
- name: Install Yarn (if not yet installed)
run: yarn --version || npm install -g yarn@1.22.22

- name: Install dependencies
run: yarn install --ignore-engines --ignore-scripts --frozen-lockfile
Expand Down Expand Up @@ -319,14 +371,16 @@ jobs:
macos-15-intel, # macOS x64
windows-latest,
]
node: [18, 20, 22, 24]
node: [18, 20, 22, 24, 26]
steps:
- name: Check out current commit
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6
- name: Set up Node
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
with:
node-version: ${{ matrix.node }}
- name: Install Yarn (if not yet installed)
run: yarn --version || npm install -g yarn@1.22.22
- name: Install dependencies
run: yarn install --ignore-engines --ignore-scripts --frozen-lockfile
- name: Download Tarball
Expand All @@ -351,6 +405,8 @@ jobs:
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
with:
node-version-file: "package.json"
- name: Install Yarn (if not yet installed)
run: yarn --version || npm install -g yarn@1.22.22
- name: Install dependencies
run: yarn install --ignore-engines --ignore-scripts --frozen-lockfile
- name: Download Tarball
Expand All @@ -371,6 +427,8 @@ jobs:
uses: actions/setup-node@395ad3262231945c25e8478fd5baf05154b1d79f # v6
with:
node-version-file: "package.json"
- name: Install Yarn (if not yet installed)
run: yarn --version || npm install -g yarn@1.22.22
- name: Install dependencies
run: yarn install --ignore-engines --ignore-scripts --frozen-lockfile
- name: Download Tarball
Expand Down
21 changes: 21 additions & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ export function importCppBindingsModule(): PrivateV8CpuProfilerBindings {
if (abi === '137') {
return require('./sentry_cpu_profiler-darwin-x64-137.node');
}
if (abi === '147') {
return require('./sentry_cpu_profiler-darwin-x64-147.node');
}
}

if (arch === 'arm64') {
Expand All @@ -77,6 +80,9 @@ export function importCppBindingsModule(): PrivateV8CpuProfilerBindings {
if (abi === '137') {
return require('./sentry_cpu_profiler-darwin-arm64-137.node');
}
if (abi === '147') {
return require('./sentry_cpu_profiler-darwin-arm64-147.node');
}
}
}

Expand All @@ -94,6 +100,9 @@ export function importCppBindingsModule(): PrivateV8CpuProfilerBindings {
if (abi === '137') {
return require('./sentry_cpu_profiler-win32-x64-137.node');
}
if (abi === '147') {
return require('./sentry_cpu_profiler-win32-x64-147.node');
}
}
}

Expand All @@ -112,6 +121,9 @@ export function importCppBindingsModule(): PrivateV8CpuProfilerBindings {
if (abi === '137') {
return require('./sentry_cpu_profiler-linux-x64-musl-137.node');
}
if (abi === '147') {
return require('./sentry_cpu_profiler-linux-x64-musl-147.node');
}
}
if (stdlib === 'glibc') {
if (abi === '108') {
Expand All @@ -126,6 +138,9 @@ export function importCppBindingsModule(): PrivateV8CpuProfilerBindings {
if (abi === '137') {
return require('./sentry_cpu_profiler-linux-x64-glibc-137.node');
}
if (abi === '147') {
return require('./sentry_cpu_profiler-linux-x64-glibc-147.node');
}
}
}
if (arch === 'arm64') {
Expand All @@ -142,6 +157,9 @@ export function importCppBindingsModule(): PrivateV8CpuProfilerBindings {
if (abi === '137') {
return require('./sentry_cpu_profiler-linux-arm64-musl-137.node');
}
if (abi === '147') {
return require('./sentry_cpu_profiler-linux-arm64-musl-147.node');
}
}

if (stdlib === 'glibc') {
Expand All @@ -157,6 +175,9 @@ export function importCppBindingsModule(): PrivateV8CpuProfilerBindings {
if (abi === '137') {
return require('./sentry_cpu_profiler-linux-arm64-glibc-137.node');
}
if (abi === '147') {
return require('./sentry_cpu_profiler-linux-arm64-glibc-147.node');
}
}
}
}
Expand Down
Loading