Skip to content

Commit

Permalink
/p:Configuration=Release
Browse files Browse the repository at this point in the history
  • Loading branch information
jchen351 committed Feb 27, 2024
1 parent cf975f1 commit acd7a4e
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 16 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/win-cpu-arm64-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
15 changes: 8 additions & 7 deletions .github/workflows/win-cpu-x64-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/win-gpu-x64-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit acd7a4e

Please sign in to comment.