Skip to content

Commit 5b3bf22

Browse files
committed
ci fix2
1 parent b48e1cb commit 5b3bf22

File tree

3 files changed

+17
-16
lines changed

3 files changed

+17
-16
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -134,14 +134,8 @@ jobs:
134134
run: |
135135
git clone https://github.com/Microsoft/vcpkg.git
136136
.\vcpkg\bootstrap-vcpkg.bat
137-
138-
# 使用经典模式安装依赖包 (fftw3包含所有精度版本)
139137
.\vcpkg\vcpkg install fftw3:x64-windows boost:x64-windows
140-
141-
# 设置vcpkg环境变量
142-
echo "VCPKG_ROOT=${{ github.workspace }}\vcpkg" >> $env:GITHUB_ENV
143-
echo "CMAKE_TOOLCHAIN_FILE=${{ github.workspace }}\vcpkg\scripts\buildsystems\vcpkg.cmake" >> $env:GITHUB_ENV
144-
shell: powershell
138+
shell: cmd
145139

146140
- name: Setup Intel Fortran
147141
if: runner.os == 'Windows'
@@ -183,15 +177,12 @@ jobs:
183177
if: runner.os == 'Windows'
184178
run: |
185179
echo "--- Building with MSVC toolchain ---"
186-
if (Test-Path "build") { Remove-Item -Recurse -Force "build" }
187-
188-
npx cmake-js compile --arch=${{ matrix.cmake_arch }} `
189-
-G "Visual Studio 17 2022" -A x64 `
190-
--CDCMAKE_TOOLCHAIN_FILE="$env:CMAKE_TOOLCHAIN_FILE" `
191-
--CDVCPKG_MANIFEST_MODE=OFF `
192-
--CDVCPKG_MANIFEST_INSTALL=OFF `
180+
rmdir /s /q build 2>nul || echo "No build directory to clean"
181+
npx cmake-js compile --arch=${{ matrix.cmake_arch }} ^
182+
-G "Visual Studio 17 2022" -A x64 ^
183+
--CDCMAKE_TOOLCHAIN_FILE=vcpkg\scripts\buildsystems\vcpkg.cmake ^
193184
--verbose
194-
shell: powershell
185+
shell: cmd
195186

196187
# 7. 运行测试
197188
- name: Run tests

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"scripts": {
2424
"build": "npm run build:native && npm run build:ts",
2525
"build:native": "cmake-js compile",
26-
"build:native:win": "cmake-js compile -G \"Visual Studio 17 2022\" -A x64 --CDCMAKE_TOOLCHAIN_FILE=%VCPKG_ROOT%/scripts/buildsystems/vcpkg.cmake --CDVCPKG_MANIFEST_MODE=OFF --CDVCPKG_MANIFEST_INSTALL=OFF",
26+
"build:native:win": "cmake-js compile -G \"Visual Studio 17 2022\" -A x64 --CDCMAKE_TOOLCHAIN_FILE=vcpkg/scripts/buildsystems/vcpkg.cmake",
2727
"build:ts": "tsc",
2828
"clean": "cmake-js clean && rimraf dist",
2929
"test": "npm run build && node --test dist/test/wsjtx.basic.test.js",

vcpkg.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"name": "wsjtx-lib-nodejs",
3+
"version": "1.0.0",
4+
"description": "WSJTX library Node.js bindings",
5+
"dependencies": [
6+
"fftw3",
7+
"boost"
8+
],
9+
"builtin-baseline": "2024.01.12"
10+
}

0 commit comments

Comments
 (0)