From 0a4eb64797211d36193a51ea8a0aab9d82f8778c Mon Sep 17 00:00:00 2001 From: tiankaima Date: Fri, 20 Oct 2023 17:28:38 +0800 Subject: [PATCH] fix: windows ci --- .github/workflows/cmake-multi-platform.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/cmake-multi-platform.yml b/.github/workflows/cmake-multi-platform.yml index 3bdeb66..2c9bc2d 100644 --- a/.github/workflows/cmake-multi-platform.yml +++ b/.github/workflows/cmake-multi-platform.yml @@ -55,6 +55,7 @@ jobs: echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT" - name: Configure CMake + if: runner.os != 'Windows' # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type run: > @@ -68,15 +69,14 @@ jobs: if: runner.os == 'Windows' run: | cmake -G "Visual Studio 17 2022" -A x64 - Get-ChildItem -Path $env:sourceDir -File -Recurse | ForEach-Object { + $sourceDir = "D:/a/numerical_algebra/numerical_algebra" + $replaceText = "D:/a/numerical_algebra/numerical_algebra" + $replacement = '$(SolutionDir)' + Get-ChildItem -Path $sourceDir -File -Recurse | ForEach-Object { $content = Get-Content $_.FullName - $newContent = $content -replace [regex]::Escape($env:replaceText), $env:replacement + $newContent = $content -replace [regex]::Escape($replaceText), $replacement Set-Content -Path $_.FullName -Value $newContent } - env: - sourceDir: ${{ github.workspace }} - replaceText: ${{ github.workspace }} - replacement: '$(SolutionDir)' - name: Build