Skip to content

Commit

Permalink
Debug in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
verhovsky committed Jun 24, 2023
1 parent d6ad688 commit b41bc67
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 21 deletions.
43 changes: 22 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ on:

env:
NODE_PREBUILD_CMD: npx prebuild -t 10.0.0 -t 12.0.0 -t 14.0.0 -t 16.0.0 -t 18.0.0 -t 20.0.0 --strip
ELECTRON_PREBUILD_CMD: npx prebuild -r electron -t 3.0.0 -t 4.0.0 -t 5.0.0 -t 6.0.0 -t 7.0.0 -t 8.0.0 -t 9.0.0 -t 10.0.0 -t 11.0.0 -t 12.0.0 -t 13.0.0 -t 14.0.0 -t 15.0.0 -t 16.0.0 -t 17.0.0 -t 18.0.0 -t 19.0.0 -t 20.0.0 -t 21.0.0 -t 22.0.0 -t 23.0.0 -t 24.0.0 -t 25.0.0 --strip
# ELECTRON_PREBUILD_CMD: npx prebuild -r electron -t 3.0.0 -t 4.0.0 -t 5.0.0 -t 6.0.0 -t 7.0.0 -t 8.0.0 -t 9.0.0 -t 10.0.0 -t 11.0.0 -t 12.0.0 -t 13.0.0 -t 14.0.0 -t 15.0.0 -t 16.0.0 -t 17.0.0 -t 18.0.0 -t 19.0.0 -t 20.0.0 -t 21.0.0 -t 22.0.0 -t 23.0.0 -t 24.0.0 -t 25.0.0 --strip
ELECTRON_PREBUILD_CMD: npx prebuild -r electron -t 9.0.0 -t 10.0.0 -t 11.0.0 -t 12.0.0 -t 13.0.0 -t 14.0.0 -t 15.0.0 -t 16.0.0 -t 17.0.0 -t 18.0.0 -t 19.0.0 -t 20.0.0 -t 21.0.0 -t 22.0.0 -t 23.0.0 -t 24.0.0 -t 25.0.0 --strip

jobs:

Expand All @@ -19,14 +20,14 @@ jobs:
matrix:
os:
- windows-2019
- macos-latest
- ubuntu-latest
# - macos-latest
# - ubuntu-latest
node:
- 10
- 12
- 14
- 16
- 18
# - 10
# - 12
# - 14
# - 16
# - 18
- 20
fail-fast: false
name: Testing Node ${{ matrix.node }} on ${{ matrix.os }}
Expand All @@ -48,8 +49,8 @@ jobs:
matrix:
os:
- windows-2019
- macos-latest
- ubuntu-latest
# - macos-latest
# - ubuntu-latest
node:
# Node 10-14 fails to prebuild for Node 18+
#
Expand All @@ -69,8 +70,8 @@ jobs:
# - 10
# - 12
# - 14
- 16
- 18
# - 16
# - 18
- 20
fail-fast: false
name: Prebuild with Node ${{ matrix.node }} on ${{ matrix.os }}
Expand All @@ -85,13 +86,13 @@ jobs:
with:
node-version: ${{ matrix.node }}
- run: npm install
- if: matrix.os == 'windows-latest'
run: ${{ env.NODE_PREBUILD_CMD }} --arch ia32
- if: matrix.os == 'windows-latest'
run: ${{ env.ELECTRON_PREBUILD_CMD }} --arch ia32
- if: matrix.os == 'macos-latest'
run: ${{ env.NODE_PREBUILD_CMD }} --arch arm64
- if: matrix.os == 'macos-latest'
run: ${{ env.ELECTRON_PREBUILD_CMD }} --arch arm64
- run: ${{ env.NODE_PREBUILD_CMD }}
# - if: matrix.os == 'windows-latest'
# run: ${{ env.NODE_PREBUILD_CMD }} --arch ia32
# - if: matrix.os == 'windows-latest'
# run: ${{ env.ELECTRON_PREBUILD_CMD }} --arch ia32
# - if: matrix.os == 'macos-latest'
# run: ${{ env.NODE_PREBUILD_CMD }} --arch arm64
# - if: matrix.os == 'macos-latest'
# run: ${{ env.ELECTRON_PREBUILD_CMD }} --arch arm64
# - run: ${{ env.NODE_PREBUILD_CMD }}
- run: ${{ env.ELECTRON_PREBUILD_CMD }}
25 changes: 25 additions & 0 deletions src/node.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,31 @@ static inline void setup_transfer_buffer(uint32_t node_count) {
transfer_buffer_length = new_length;
transfer_buffer = static_cast<uint32_t *>(malloc(transfer_buffer_length * sizeof(uint32_t)));

#define STRINGIFY(x) #x
#define TOSTRING(x) STRINGIFY(x)

#pragma message ("_msc_ver: " TOSTRING(_MSC_VER))
#pragma message ("node_runime_electron: " TOSTRING(NODE_RUNTIME_ELECTRON))
#pragma message ("node_module_version: " TOSTRING(NODE_MODULE_VERSION))
#pragma message ("v8 major version: " TOSTRING(V8_MAJOR_VERSION))
#pragma message ("v8 minor version: " TOSTRING(V8_MINOR_VERSION))

#if defined(_MSC_VER)
#pragma message("_MSC_VER")
#endif
#if NODE_RUNTIME_ELECTRON
#pragma message("NODE_RUNTIME_ELECTRON")
#endif
#if NODE_MODULE_VERSION >= 89
#pragma message("NODE_MODULE_VERSION")
#endif
#if defined(_MSC_VER) && NODE_RUNTIME_ELECTRON
#pragma message("_MSC_VER && NODE_RUNTIME_ELECTRON")
#endif
#if defined(_MSC_VER) && NODE_RUNTIME_ELECTRON && NODE_MODULE_VERSION >= 89
#pragma message("defined(_MSC_VER) && NODE_RUNTIME_ELECTRON && NODE_MODULE_VERSION >= 89")
#endif

#if defined(_MSC_VER) && NODE_RUNTIME_ELECTRON && NODE_MODULE_VERSION >= 89
auto nodeBuffer = node::Buffer::New(Isolate::GetCurrent(), (char *)transfer_buffer, transfer_buffer_length * sizeof(uint32_t), [](char *data, void *hint) {}, nullptr)
.ToLocalChecked()
Expand Down

0 comments on commit b41bc67

Please sign in to comment.