From 51c7e1cf67e3c48161747ca4ca1ace333b8337e4 Mon Sep 17 00:00:00 2001 From: Jian Chen Date: Tue, 30 Apr 2024 14:57:11 -0700 Subject: [PATCH] - name: Build the C# API and Run the C# Tests run: | cd test\csharp dotnet test /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:binaryDir\Release" --- .github/workflows/win-cpu-arm64-build.yml | 10 ++++++---- .github/workflows/win-cpu-x64-build.yml | 10 ++++++---- .github/workflows/win-cuda-x64-build.yml | 9 +++++---- .../Microsoft.ML.OnnxRuntimeGenAI.Tests.csproj | 3 ++- test/csharp/nuget.config | 15 --------------- 5 files changed, 19 insertions(+), 28 deletions(-) delete mode 100644 test/csharp/nuget.config diff --git a/.github/workflows/win-cpu-arm64-build.yml b/.github/workflows/win-cpu-arm64-build.yml index 916af3009..ce3bfcf4b 100644 --- a/.github/workflows/win-cpu-arm64-build.yml +++ b/.github/workflows/win-cpu-arm64-build.yml @@ -53,6 +53,11 @@ jobs: run: | cmake --build --preset windows_arm64_cpu_release --parallel + - name: Build the C# API and Run the C# Tests + run: | + cd test\csharp + dotnet test /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:binaryDir\Release" + - name: Install the Python Wheel and Test Dependencies run: | python -m pip install (Get-ChildItem ("$env:binaryDir\wheel\*.whl")) @@ -62,10 +67,7 @@ jobs: run: | python test/python/test_onnxruntime_genai.py --cwd "test\python" --test_models "test\test_models" - - name: Build the C# API and Run the C# Tests - run: | - cd test\csharp - dotnet test /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:binaryDir\Release" + - name: Verify Build Artifacts if: always() diff --git a/.github/workflows/win-cpu-x64-build.yml b/.github/workflows/win-cpu-x64-build.yml index 8db9f2c03..cf5614dee 100644 --- a/.github/workflows/win-cpu-x64-build.yml +++ b/.github/workflows/win-cpu-x64-build.yml @@ -72,6 +72,11 @@ jobs: run: | cmake --build --preset windows_x64_cpu_release --parallel + - name: Build the C# API and Run the C# Tests + run: | + cd test\csharp + dotnet test /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:binaryDir\Release" + - name: Install the python wheel and test dependencies run: | python -m pip install (Get-ChildItem ("$env:binaryDir\wheel\*.whl")) @@ -88,10 +93,7 @@ jobs: run: | python test/python/test_onnxruntime_genai.py --cwd "test\python" --test_models "test\test_models" - - name: Build the C# API and Run the C# Tests - run: | - cd test\csharp - dotnet test /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:binaryDir\Release" + - name: Verify Build Artifacts if: always() diff --git a/.github/workflows/win-cuda-x64-build.yml b/.github/workflows/win-cuda-x64-build.yml index df584705f..f0cebbae8 100644 --- a/.github/workflows/win-cuda-x64-build.yml +++ b/.github/workflows/win-cuda-x64-build.yml @@ -72,6 +72,11 @@ 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 + run: | + cd test\csharp + dotnet test /p:Configuration=release /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:binaryDir\Release" + - name: Install the Python Wheel and Test Dependencies run: | python -m pip install (Get-ChildItem ("$env:binaryDir\wheel\*.whl")) @@ -88,10 +93,6 @@ jobs: run: | python test/python/test_onnxruntime_genai.py --cwd "test\python" --test_models "test\test_models" - - name: Build the C# API and Run the C# Tests - run: | - cd test\csharp - dotnet test /p:Configuration=release /p:NativeBuildOutputDir="$env:GITHUB_WORKSPACE\$env:binaryDir\Release" - name: Verify Build Artifacts if: always() diff --git a/test/csharp/Microsoft.ML.OnnxRuntimeGenAI.Tests.csproj b/test/csharp/Microsoft.ML.OnnxRuntimeGenAI.Tests.csproj index e4ec8e6d8..978deb04e 100644 --- a/test/csharp/Microsoft.ML.OnnxRuntimeGenAI.Tests.csproj +++ b/test/csharp/Microsoft.ML.OnnxRuntimeGenAI.Tests.csproj @@ -12,7 +12,8 @@ default True Debug;RelWithDebInfo;Release - + https://api.nuget.org/v3/index.json + $(RestoreAdditionalProjectSources);$(RestoreSources) Microsoft.ML.OnnxRuntimeGenAI.Tests Microsoft.ML.OnnxRuntimeGenAI.Tests diff --git a/test/csharp/nuget.config b/test/csharp/nuget.config deleted file mode 100644 index 299e16b88..000000000 --- a/test/csharp/nuget.config +++ /dev/null @@ -1,15 +0,0 @@ - - - - - - - - - - - - - - - \ No newline at end of file