Skip to content

Commit fc19804

Browse files
authored
Merge pull request #314 from murat-dogan/windows-ci
Windows ci
2 parents 97bba10 + ff0c09d commit fc19804

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

.github/workflows/build-win.yml

+5-9
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@ on:
66
# tags:
77
# - v*
88

9-
env:
10-
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
11-
129
jobs:
1310
build-windows-x64:
1411
runs-on: windows-2022
@@ -18,15 +15,14 @@ jobs:
1815

1916
steps:
2017
- uses: actions/checkout@v4
21-
- uses: ilammy/msvc-dev-cmd@v1
2218
- name: Install OpenSSL
23-
run: choco install openssl
19+
run: choco install openssl -y
2420
- name: Use Node.js ${{ matrix.node-version }}
2521
uses: actions/setup-node@v4
2622
with:
2723
node-version: ${{ matrix.node-version }}
2824
- name: Build
29-
run: set npm_config_cache= && set NPM_CONFIG_CACHE= && npm install --build-from-source
25+
run: npm install --build-from-source
3026
env:
3127
CI: true
3228
# - name: Test
@@ -39,10 +35,10 @@ jobs:
3935
CI: true
4036

4137
build-windows-x86:
42-
runs-on: windows-2022
38+
runs-on: windows-2019
4339
strategy:
4440
matrix:
45-
node_version: [18.x]
41+
node_version: [18]
4642
node_arch:
4743
- x86
4844
steps:
@@ -61,7 +57,7 @@ jobs:
6157
node-version: ${{ matrix.node_version }}
6258
node-arch: ${{ matrix.node_arch }}
6359
- name: Build
64-
run: set npm_config_cache= && set NPM_CONFIG_CACHE= && npm install --build-from-source
60+
run: npm install --build-from-source
6561
env:
6662
CI: true
6763
# - name: Test

CMakeLists.txt

+5
Original file line numberDiff line numberDiff line change
@@ -87,3 +87,8 @@ if(WIN32)
8787
endif()
8888

8989
target_link_libraries(${PROJECT_NAME} PRIVATE ${LINK_LIBRARIES})
90+
91+
if(MSVC AND CMAKE_JS_NODELIB_DEF AND CMAKE_JS_NODELIB_TARGET)
92+
# Generate node.lib
93+
execute_process(COMMAND ${CMAKE_AR} /def:${CMAKE_JS_NODELIB_DEF} /out:${CMAKE_JS_NODELIB_TARGET} ${CMAKE_STATIC_LINKER_FLAGS})
94+
endif()

0 commit comments

Comments
 (0)