Skip to content

Commit

Permalink
Windows CI fix (#176)
Browse files Browse the repository at this point in the history
* Check error code and abort.

* Use 32 bit version of reg.exe for 32bit binaries.
  • Loading branch information
Kerilk authored May 17, 2022
1 parent 792682a commit eaf36a6
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,20 @@ jobs:
working-directory: ${{runner.workspace}}/OpenCL-ICD-Loader/build
shell: cmd
run: |
reg ADD HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenCL\Vendors /v %GITHUB_WORKSPACE%/build/Release/OpenCLDriverStub.dll /t REG_DWORD /d 0
if /I "${{matrix.BIN}}"=="x64" set REG=reg
if /I "${{matrix.BIN}}"=="x86" set REG=%systemroot%\Syswow64\reg.exe
%REG% ADD HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenCL\Vendors /v %GITHUB_WORKSPACE%/build/Release/OpenCLDriverStub.dll /t REG_DWORD /d 0
%CTEST_EXE% -C Release --output-on-failure --parallel %NUMBER_OF_PROCESSORS%
reg DELETE HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenCL\Vendors /v %GITHUB_WORKSPACE%/build/Release/OpenCLDriverStub.dll /f
reg ADD HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenCL\Vendors /v %GITHUB_WORKSPACE%/build/Debug/OpenCLDriverStub.dll /t REG_DWORD /d 0
if errorlevel 1 (
exit /b %errorlevel%
)
%REG% DELETE HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenCL\Vendors /v %GITHUB_WORKSPACE%/build/Release/OpenCLDriverStub.dll /f
%REG% ADD HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenCL\Vendors /v %GITHUB_WORKSPACE%/build/Debug/OpenCLDriverStub.dll /t REG_DWORD /d 0
%CTEST_EXE% -C Debug --output-on-failure --parallel %NUMBER_OF_PROCESSORS%
reg DELETE HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenCL\Vendors /v %GITHUB_WORKSPACE%/build/Debug/OpenCLDriverStub.dll /f
if errorlevel 1 (
exit /b %errorlevel%
)
%REG% DELETE HKEY_LOCAL_MACHINE\SOFTWARE\Khronos\OpenCL\Vendors /v %GITHUB_WORKSPACE%/build/Debug/OpenCLDriverStub.dll /f
- name: Install
shell: cmd
Expand Down

0 comments on commit eaf36a6

Please # to comment.