Skip to content

Commit

Permalink
bindings: prebuild more binaries for node 20 (#177)
Browse files Browse the repository at this point in the history
* add 20

add 20

* test build

* use node:20 container

* remove build branch
  • Loading branch information
JonasBa committed Jul 13, 2023
1 parent 9e3c8ba commit a14018f
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ jobs:
node: 16
- os: ubuntu-20.04
node: 18
- os: ubuntu-20.04
node: 20

# linux x64 musl
- os: ubuntu-20.04
Expand All @@ -41,6 +43,9 @@ jobs:
- os: ubuntu-20.04
container: node:18-alpine3.17
node: 18
- os: ubuntu-20.04
container: node:20-alpine3.17
node: 20

# linux arm64 glibc
- os: ubuntu-20.04
Expand All @@ -52,6 +57,9 @@ jobs:
- os: ubuntu-20.04
arch: arm64
node: 18
- os: ubuntu-20.04
arch: arm64
node: 20

# linux arm64 musl
- os: ubuntu-20.04
Expand All @@ -66,14 +74,24 @@ jobs:
arch: arm64
container: node:18-alpine3.17
node: 18
- os: ubuntu-20.04
arch: arm64
container: node:20-alpine3.17
node: 20

# macos x64
- os: macos-11
node: 14
arch: x64
- os: macos-11
node: 16
arch: x64
- os: macos-11
node: 18
arch: x64
- os: macos-11
node: 20
arch: x64

# linux arm64 target attempt to cross compile for darwin
- os: ubuntu-20.04
Expand All @@ -91,6 +109,11 @@ jobs:
node: 18
target_platform: darwin

- os: ubuntu-20.04
arch: arm64
node: 20
target_platform: darwin

# windows x64
- os: windows-2019
node: 16
Expand All @@ -100,6 +123,10 @@ jobs:
node: 18
arch: x64

- os: windows-2019
node: 20
arch: x64

# For some reason it seems like it takes forever for
# the macos-m1 runners to start up, so we'll just skip it
# - os: macos-m1
Expand Down
24 changes: 24 additions & 0 deletions src/cpu_profiler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,18 @@ export function importCppBindingsModule(): PrivateV8CpuProfilerBindings {
switch (arch) {
case 'x64': {
switch (abi) {
case '83': {
return require('./sentry_cpu_profiler-darwin-x64-83.node');
}
case '93': {
return require('./sentry_cpu_profiler-darwin-x64-93.node');
}
case '108': {
return require('./sentry_cpu_profiler-darwin-x64-108.node');
}
case '115': {
return require('./sentry_cpu_profiler-darwin-x64-115.node');
}
}
}
case 'arm64': {
Expand All @@ -57,6 +63,9 @@ export function importCppBindingsModule(): PrivateV8CpuProfilerBindings {
case '108': {
return require('./sentry_cpu_profiler-darwin-arm64-108.node');
}
case '115': {
return require('./sentry_cpu_profiler-darwin-arm64-115.node');
}
}
}
}
Expand All @@ -72,6 +81,9 @@ export function importCppBindingsModule(): PrivateV8CpuProfilerBindings {
case '108': {
return require('./sentry_cpu_profiler-win32-x64-108.node');
}
case '115': {
return require('./sentry_cpu_profiler-win32-x64-115.node');
}
}
}
}
Expand All @@ -92,6 +104,9 @@ export function importCppBindingsModule(): PrivateV8CpuProfilerBindings {
case '108': {
return require('./sentry_cpu_profiler-linux-x64-musl-108.node');
}
case '115': {
return require('./sentry_cpu_profiler-linux-x64-musl-115.node');
}
}
break;
}
Expand All @@ -106,6 +121,9 @@ export function importCppBindingsModule(): PrivateV8CpuProfilerBindings {
case '108': {
return require('./sentry_cpu_profiler-linux-x64-glibc-108.node');
}
case '115': {
return require('./sentry_cpu_profiler-linux-x64-glibc-115.node');
}
}
}
}
Expand All @@ -123,6 +141,9 @@ export function importCppBindingsModule(): PrivateV8CpuProfilerBindings {
case '108': {
return require('./sentry_cpu_profiler-linux-arm64-musl-108.node');
}
case '115': {
return require('./sentry_cpu_profiler-linux-arm64-musl-115.node');
}
}
}
case 'glibc': {
Expand All @@ -136,6 +157,9 @@ export function importCppBindingsModule(): PrivateV8CpuProfilerBindings {
case '108': {
return require('./sentry_cpu_profiler-linux-arm64-glibc-108.node');
}
case '115': {
return require('./sentry_cpu_profiler-linux-arm64-glibc-115.node');
}
}
}
}
Expand Down

0 comments on commit a14018f

Please sign in to comment.