Skip to content

Commit

Permalink
Fix automatic Windows artifacts build (#1011)
Browse files Browse the repository at this point in the history
* Test Windows build

* Fix cmake command

* Fix cmake command

* Fix cmake command

* Fix cmake command

* Fix cmake command

* Fix cmake command

* Fix cmake command

* Fix cmake command

* Fix cmake command

* Fix cmake command

* Fix cmake command

* See output

* Suppress build output

* vcpkg install opencl

* vcpkg integrate install

* Toolchain file

* Just win-amd64
  • Loading branch information
WrathfulSpatula authored Jun 18, 2024
1 parent de4a545 commit 1e3ef19
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 1 deletion.
40 changes: 40 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ on:
push:
branches:
- main # Trigger on pushes to the main branch (adjust if needed)
- development

workflow_dispatch: # Allow manual triggering of the workflow

Expand Down Expand Up @@ -73,3 +74,42 @@ jobs:
path: |
build/libqrack-*.sh
build/benchmarks
build_windows:
runs-on: windows-latest # Use a Linux runner
strategy:
matrix:
platform:
- win-amd64
dependencies: [vcpkg]
steps:
- name: Mount vcpkg cache
uses: actions/cache@v4
with:
path: "~/.cache/vcpkg/archives"
key: vcpkg-${{ matrix.os }}

- name: Install vcpkg dependencies
run: |
vcpkg install opencl
- name: Checkout Qrack
uses: actions/checkout@v4

- name: Build Qrack Windows x86-64
if: matrix.platform == 'win-amd64'
run: |
mkdir build
cd build
powershell -c "Invoke-WebRequest -Uri 'https://github.com/ckormanyos/xxd/releases/download/v1.1/xxd-win64-msvc.zip' -OutFile 'xxd-win64-msvc.zip'"
powershell -c "Expand-Archive -Path xxd-win64-msvc.zip -DestinationPath ."
cmake .. -DCMAKE_TOOLCHAIN_FILE="C:/vcpkg/scripts/buildsystems/vcpkg.cmake" -DXXD_BIN="xxd.exe" -DQBCAPPOW=12 -DCPP_STD=14
cmake --build . --config Release --target PACKAGE benchmarks
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: libqrack-${{ matrix.platform }}
path: |
build/libqrack-*.exe
build/Release/benchmarks.exe
3 changes: 2 additions & 1 deletion cmake/OpenCL.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@ if (NOT OpenCL_FOUND)
endif (MSVC)
if (NOT LIB_OPENCL)
set (ENABLE_OPENCL OFF)
message ("Could not find OpenCL support from the AMD or Intel SDK (OPENCL_AMSDK directory not found)")
elseif (NOT MSVC)
# Found, set the required include path.
set (OpenCL_INCLUDE_DIRS ${OPENCL_AMDSDK}/include CACHE PATH "AMD OpenCL SDK Header include path")
set (OpenCL_COMPILATION_OPTIONS
-Wno-ignored-attributes
-Wno-deprecated-declarations
CACHE STRING "AMD OpenCL SDK Compilation Option Requirements")
message ("OpenCL support found in the AMD or Intel SDK (OPENCL_AMSDK directory variable)")
endif()
message ("OpenCL support found in the AMD or Intel SDK (OPENCL_AMSDK directory variable)")
endif ()

if (PACK_DEBIAN)
Expand Down

0 comments on commit 1e3ef19

Please sign in to comment.