debug workflow #19
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Windows CPU OpenCL Benchmark | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ main ] | |
| jobs: | |
| benchmark: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Cache vcpkg | |
| uses: actions/cache@v3 | |
| with: | |
| path: C:/vcpkg/installed | |
| key: vcpkg-${{ runner.os }}-${{ hashFiles('vcpkg.json') }} | |
| restore-keys: | | |
| vcpkg-${{ runner.os }}- | |
| - name: Cache CMake build | |
| uses: actions/cache@v3 | |
| with: | |
| path: build | |
| key: cmake-build-${{ runner.os }}-${{ github.sha }} | |
| restore-keys: | | |
| cmake-build-${{ runner.os }}- | |
| - name: Cache Python packages | |
| uses: actions/cache@v3 | |
| with: | |
| path: | | |
| ~/.cache/pip | |
| ~/.virtualenvs | |
| key: python-packages-${{ runner.os }}-${{ hashFiles('**/requirements.txt') }} | |
| restore-keys: | | |
| python-packages-${{ runner.os }}- | |
| - name: Install CMake | |
| run: choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System' -y | |
| - name: Install vcpkg | |
| if: steps.cache-vcpkg.outputs.cache-hit != 'true' | |
| run: | | |
| git clone https://github.com/microsoft/vcpkg.git C:\vcpkg | |
| C:\vcpkg\bootstrap-vcpkg.bat | |
| - name: Install OpenCL via vcpkg | |
| run: C:\vcpkg\vcpkg.exe install opencl:x64-windows | |
| - name: Configure CMake with vcpkg toolchain | |
| run: cmake -S . -B build -G "Visual Studio 17 2022" -A x64 -DCMAKE_TOOLCHAIN_FILE=C:/vcpkg/scripts/buildsystems/vcpkg.cmake | |
| - name: Build Project | |
| run: cmake --build build --config Release | |
| - name: Install Python dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install pyopencl numpy pandas matplotlib | |
| - name: Upload Build Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: windows-cpu-opencl-build | |
| path: build/Release/ |