Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Windows ci #314

Merged
merged 3 commits into from
Dec 1, 2024
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
14 changes: 5 additions & 9 deletions .github/workflows/build-win.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ on:
# tags:
# - v*

env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: true

jobs:
build-windows-x64:
runs-on: windows-2022
Expand All @@ -18,15 +15,14 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: ilammy/msvc-dev-cmd@v1
- name: Install OpenSSL
run: choco install openssl
run: choco install openssl -y
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- name: Build
run: set npm_config_cache= && set NPM_CONFIG_CACHE= && npm install --build-from-source
run: npm install --build-from-source
env:
CI: true
# - name: Test
Expand All @@ -39,10 +35,10 @@ jobs:
CI: true

build-windows-x86:
runs-on: windows-2022
runs-on: windows-2019
strategy:
matrix:
node_version: [18.x]
node_version: [18]
node_arch:
- x86
steps:
Expand All @@ -61,7 +57,7 @@ jobs:
node-version: ${{ matrix.node_version }}
node-arch: ${{ matrix.node_arch }}
- name: Build
run: set npm_config_cache= && set NPM_CONFIG_CACHE= && npm install --build-from-source
run: npm install --build-from-source
env:
CI: true
# - name: Test
Expand Down
5 changes: 5 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,8 @@ if(WIN32)
endif()

target_link_libraries(${PROJECT_NAME} PRIVATE ${LINK_LIBRARIES})

if(MSVC AND CMAKE_JS_NODELIB_DEF AND CMAKE_JS_NODELIB_TARGET)
# Generate node.lib
execute_process(COMMAND ${CMAKE_AR} /def:${CMAKE_JS_NODELIB_DEF} /out:${CMAKE_JS_NODELIB_TARGET} ${CMAKE_STATIC_LINKER_FLAGS})
endif()