From b41bc6766cb8c79c0fd6431fba00dc6e06cd2906 Mon Sep 17 00:00:00 2001 From: Boris Verkhovskiy Date: Sat, 24 Jun 2023 18:34:27 +0100 Subject: [PATCH] Debug in CI --- .github/workflows/build.yml | 43 +++++++++++++++++++------------------ src/node.cc | 25 +++++++++++++++++++++ 2 files changed, 47 insertions(+), 21 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7be752ab..109630c6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -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: @@ -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 }} @@ -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+ # @@ -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 }} @@ -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 }} diff --git a/src/node.cc b/src/node.cc index c45b5cf6..4219342a 100644 --- a/src/node.cc +++ b/src/node.cc @@ -30,6 +30,31 @@ static inline void setup_transfer_buffer(uint32_t node_count) { transfer_buffer_length = new_length; transfer_buffer = static_cast(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()