-
Notifications
You must be signed in to change notification settings - Fork 0
105 lines (85 loc) · 2.85 KB
/
benchmark.yml
File metadata and controls
105 lines (85 loc) · 2.85 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
name: Windows CPU OpenCL Benchmark
on:
workflow_dispatch:
push:
branches: [ main ]
jobs:
windows-build:
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/
linux-benchmark:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt update
sudo apt-get install -y cmake build-essential ocl-icd-opencl-dev pocl-opencl-icd libomp-dev python3-pip
python3 -m pip install --upgrade pip
pip install pyopencl numpy pandas matplotlib
- name: Cache CMake build
uses: actions/cache@v3
with:
path: build
key: linux-cmake-${{ github.sha }}
restore-keys: |
linux-cmake-
- name: Configure project
run: cmake -S . -B build
- name: Build project
run: cmake --build build --config Release
- name: Run Benchmark
run: python3 automation/run_benchmarks.py
- name: Upload Benchmark Results
uses: actions/upload-artifact@v4
with:
name: linux-benchmark-results
path: automation/