From acd7a4ef76fea6fa0e8e42613020a049fca2ee31 Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Tue, 27 Feb 2024 15:36:20 -0500 Subject: [PATCH] /p:Configuration=Release --- .github/workflows/win-cpu-arm64-build.yml | 15 ++++++++------- .github/workflows/win-cpu-x64-build.yml | 15 ++++++++------- .github/workflows/win-gpu-x64-build.yml | 5 +++-- 3 files changed, 19 insertions(+), 16 deletions(-) diff --git a/.github/workflows/win-cpu-arm64-build.yml b/.github/workflows/win-cpu-arm64-build.yml index 2a482d63c..0f39e4edf 100644 --- a/.github/workflows/win-cpu-arm64-build.yml +++ b/.github/workflows/win-cpu-arm64-build.yml @@ -14,6 +14,7 @@ env: ort_dir: "onnxruntime-win-arm64-1.17.0" ort_zip: "$(ort_dir).zip" ort_url: "https://github.com/microsoft/onnxruntime/releases/download/v1.17.0/$(ort_zip)" + cmake_build_dir: build jobs: windows-cpu-arm64-build: @@ -46,12 +47,12 @@ jobs: - name: Build with CMake run: | - cmake -G "Visual Studio 17 2022" -A arm64 -S . -B build -DCMAKE_BUILD_TYPE=Release -DUSE_CUDA=OFF - cmake --build build --config Release --parallel + cmake -G "Visual Studio 17 2022" -A arm64 -S . -B $env:cmake_build_dir -DCMAKE_BUILD_TYPE=Release -DUSE_CUDA=OFF + cmake --build $env:cmake_build_dir --config Release --parallel - name: Install the Python Wheel and Test Dependencies run: | - python -m pip install (Get-ChildItem ("build\wheel\*.whl")) + python -m pip install (Get-ChildItem ("$env:cmake_build_dir\wheel\*.whl")) python -m pip install -r test\python\requirements.txt - name: Run the Python Tests @@ -61,18 +62,18 @@ jobs: - name: Build the C# API and Run the C# Tests run: | cd test\csharp - dotnet test /p:NativeBuildOutputDir="..\..\Release\" + dotnet test /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:cmake_build_dir\Release" - name: Verify Build Artifacts if: always() continue-on-error: true run: | - Get-ChildItem -Path $env:GITHUB_WORKSPACE\Release -Recurse - Get-ChildItem -Path $env:GITHUB_WORKSPACE\test\Release -Recurse + Get-ChildItem -Path $env:GITHUB_WORKSPACE\$env:cmake_build_dir\Release -Recurse + Get-ChildItem -Path $env:GITHUB_WORKSPACE\$env:cmake_build_dir\test\Release -Recurse - name: Run tests run: | - .\build\test\Release\unit_tests.exe + .\$env:cmake_build_dir\test\Release\unit_tests.exe - name: Upload Build Artifacts uses: actions/upload-artifact@v3 diff --git a/.github/workflows/win-cpu-x64-build.yml b/.github/workflows/win-cpu-x64-build.yml index 1336ca1a0..84113c401 100644 --- a/.github/workflows/win-cpu-x64-build.yml +++ b/.github/workflows/win-cpu-x64-build.yml @@ -14,6 +14,7 @@ env: ort_dir: "onnxruntime-win-x64-1.17.0" ort_zip: "$(ort_dir).zip" ort_url: "https://github.com/microsoft/onnxruntime/releases/download/v1.17.0/$(ort_zip)" + cmake_build_dir: build jobs: windows-cpu-x64-build: @@ -53,12 +54,12 @@ jobs: - name: Build with CMake run: | - cmake -G "Visual Studio 17 2022" -A x64 -S . -B build -DCMAKE_BUILD_TYPE=Release -DUSE_CUDA=OFF - cmake --build build --config Release --parallel + cmake -G "Visual Studio 17 2022" -A x64 -S . -B $env:cmake_build_dir -DCMAKE_BUILD_TYPE=Release -DUSE_CUDA=OFF + cmake --build $env:cmake_build_dir --config Release --parallel - name: Install the python wheel and test dependencies run: | - python -m pip install (Get-ChildItem ("build\wheel\*.whl")) + python -m pip install (Get-ChildItem ("$env:cmake_build_dir\wheel\*.whl")) python -m pip install -r test\python\requirements.txt - name: Run the Python Tests @@ -68,18 +69,18 @@ jobs: - name: Build the C# API and Run the C# Tests run: | cd test\csharp - dotnet test /p:NativeBuildOutputDir="..\..\Release\" + dotnet test /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:cmake_build_dir\Release" - name: Verify Build Artifacts if: always() continue-on-error: true run: | - Get-ChildItem -Path $env:GITHUB_WORKSPACE\build\Release -Recurse - Get-ChildItem -Path $env:GITHUB_WORKSPACE\build\test\Release -Recurse + Get-ChildItem -Path $env:GITHUB_WORKSPACE\$env:cmake_build_dir\Release -Recurse + Get-ChildItem -Path $env:GITHUB_WORKSPACE\$env:cmake_build_dir\test\Release -Recurse - name: Run tests run: | - .\build\test\Release\unit_tests.exe + .\$env:cmake_build_dir\test\Release\unit_tests.exe - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/win-gpu-x64-build.yml b/.github/workflows/win-gpu-x64-build.yml index 2b4fbb7c3..acb408a5f 100644 --- a/.github/workflows/win-gpu-x64-build.yml +++ b/.github/workflows/win-gpu-x64-build.yml @@ -19,6 +19,7 @@ env: # CUDA_PATH: "${{ github.workspace }}\\cuda_sdk\\v12.2" cuda_version: "11.8" CUDA_PATH: ${{ github.workspace }}\\cuda_sdk\\v11.8 + cmake_build_dir: build jobs: @@ -69,10 +70,10 @@ jobs: run: | echo "${{ env.cuda_dir }}\\v${{ env.cuda_version }}\\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - - name: Build the C# API and run the C# tests + - name: Build the C# API and Run the C# Tests run: | cd test\csharp - dotnet test /p:Configuration=Release /p:NativeBuildOutputDir="..\..\build\Release\" + dotnet test /p:Configuration=Release /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:cmake_build_dir\Release" - name: Verify Build Artifacts if: always()