File tree Expand file tree Collapse file tree 4 files changed +34
-10
lines changed Expand file tree Collapse file tree 4 files changed +34
-10
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ function ExportModel-Xnnpack {
3434 [bool ]$quantize
3535 )
3636
37- if $ ( quantize) {
37+ if ( $ quantize ) {
3838 python - m examples.xnnpack.aot_compiler -- model_name= " ${MODEL_NAME} " -- delegate -- quantize | Write-Host
3939 $modelFile = " $ ( $modelName ) _xnnpack_q8.pte"
4040 } else {
Original file line number Diff line number Diff line change @@ -6,10 +6,34 @@ Set-PSDebug -Trace 1
66$ErrorActionPreference = ' Stop'
77$PSNativeCommandUseErrorActionPreference = $true
88
9- # Run pytest with coverage
10- # pytest -n auto --cov=./ --cov-report=xml
11- pytest - v -- full- trace - c pytest- windows.ini
9+ Write-Host " Working dir: $CWD "
10+ ls
11+
12+ # Run pytest
13+ pytest - v - c pytest- windows.ini
1214if ($LASTEXITCODE -ne 0 ) {
1315 Write-Host " Pytest invocation was unsuccessful. Exit code: $LASTEXITCODE ."
1416 exit $LASTEXITCODE
1517}
18+
19+ # Run native unit tests (via ctest)
20+ New-Item - Path " test-build" - ItemType Directory
21+ cd " test-build"
22+
23+ cmake .. -- preset windows - DCMAKE_BUILD_TESTS= ON
24+ if ($LASTEXITCODE -ne 0 ) {
25+ Write-Host " CMake configuration was unsuccessful. Exit code: $LASTEXITCODE ."
26+ exit $LASTEXITCODE
27+ }
28+
29+ cmake -- build . - j8 -- config Release
30+ if ($LASTEXITCODE -ne 0 ) {
31+ Write-Host " CMake build was unsuccessful. Exit code: $LASTEXITCODE ."
32+ exit $LASTEXITCODE
33+ }
34+
35+ ctest - j8
36+ if ($LASTEXITCODE -ne 0 ) {
37+ Write-Host " CTest run was unsuccessful. Exit code: $LASTEXITCODE ."
38+ exit $LASTEXITCODE
39+ }
Original file line number Diff line number Diff line change 6969 \$ErrorActionPreference = 'Stop'
7070 \$PSNativeCommandUseErrorActionPreference = \$true
7171
72- .ci/scripts/setup-windows.ps1
72+ .ci/scripts/setup-windows.ps1
7373
74- powershell .ci/scripts/unittest-windows.ps1 -editable "${{ inputs.editable }}"
74+ .ci/scripts/unittest-windows.ps1 -editable "${{ inputs.editable }}"
7575 }"
Original file line number Diff line number Diff line change @@ -993,13 +993,13 @@ jobs:
993993 timeout : 60
994994 script : |
995995 conda init powershell
996-
996+
997997 powershell -Command "& {
998998 Set-PSDebug -Trace 1
999999 \$ErrorActionPreference = 'Stop'
10001000 \$PSNativeCommandUseErrorActionPreference = \$true
10011001
1002- .ci/scripts/setup-windows.ps1
1002+ .ci/scripts/setup-windows.ps1
10031003
1004- powershell .ci/scripts/test_model.ps1 -modelName ${{ matrix.model }} -backend ${{ matrix.backend }}
1005- }"
1004+ .ci/scripts/test_model.ps1 -modelName ${{ matrix.model }} -backend ${{ matrix.backend }}
1005+ }"
You can’t perform that action at this time.
0 commit comments