-
-
Notifications
You must be signed in to change notification settings - Fork 201
93 lines (72 loc) · 2.56 KB
/
build_and_test.yml
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
name: CLBlast build
on:
pull_request: {}
push:
branches: ['master']
jobs:
build_and_test_linux_and_macos:
strategy:
matrix:
config: [
{os: ubuntu-latest, c_compiler: gcc, cpp_compiler: g++},
{os: ubuntu-latest, c_compiler: clang, cpp_compiler: clang++},
{os: macos-13, c_compiler: clang, cpp_compiler: clang++},
]
runs-on: ${{ matrix.config.os }}
steps:
- uses: actions/checkout@v3
- name: Install requirements for Ubuntu
run: |
sudo apt-get update
sudo apt-get install -yq ninja-build ocl-icd-opencl-dev opencl-c-headers libopenblas-dev --no-install-recommends
if: ${{ matrix.config.os == 'ubuntu-latest' }}
- name: Install requirements for macOS
run: brew install ninja
if: ${{ matrix.config.os == 'macos-13' }}
- name: Run CMake
run: |
export CC=${{ matrix.config.c_compiler }}
export CXX=${{ matrix.config.cpp_compiler }}
cmake -S . -B build -G Ninja -DTESTS=ON -DCLIENTS=ON -DSAMPLES=ON
- name: Compile the code
run: cmake --build build
- name: Get the diagnostics info
run: ./build/clblast_test_diagnostics
if: ${{ matrix.config.os == 'macos-13' }}
- name: Run an example client
run: ./build/clblast_client_xgemm
if: ${{ matrix.config.os == 'macos-13' }}
- name: Run an example sample program
run: ./build/clblast_sample_dgemv_c
if: ${{ matrix.config.os == 'macos-13' }}
- name: Run an example tuner
run: ./build/clblast_tuner_xdot
if: ${{ matrix.config.os == 'macos-13' }}
- name: Run the unittests
run: ctest --test-dir build
if: ${{ matrix.config.os == 'macos-13' }}
build_windows:
strategy:
matrix:
config: [
{os: windows-2019, arch: x64},
]
runs-on: ${{ matrix.config.os }}
steps:
- uses: actions/checkout@v3
- name: Set up MSVC
uses: ilammy/msvc-dev-cmd@v1
- name: Install OpenBLAS
run: |
mkdir openblas
cd openblas
C:\msys64\usr\bin\wget.exe https://github.com/xianyi/OpenBLAS/releases/download/v0.3.23/OpenBLAS-0.3.23-x64.zip
7z x OpenBLAS-0.3.23-x64.zip
pwd
ls
- name: Install OpenCL
run: vcpkg.exe --triplet=${{ matrix.config.arch }}-windows install opencl
- name: Run CMake
run: cmake -S . -B build -DTESTS=ON -DCLIENTS=ON -DSAMPLES=ON -DOPENCL_ROOT=C:\vcpkg\packages\opencl_x64-windows -DCBLAS_ROOT=${{ github.workspace }}\openblas
- name: Compile the code
run: cmake --build build