-
Notifications
You must be signed in to change notification settings - Fork 139
60 lines (54 loc) · 1.76 KB
/
Copy pathbandicoot-test.yml
File metadata and controls
60 lines (54 loc) · 1.76 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
name: Build and Test
on: [push, pull_request]
jobs:
build:
name: ${{ matrix.config.name }}
runs-on: ${{ matrix.config.os }}
outputs:
tag: ${{ steps.git.outputs.tag }}
strategy:
fail-fast: false
matrix:
config:
- { name: 'CUDA', os: self-hosted}
- { name: 'OpenCL', os: self-hosted}
- { name: 'CPU', os: self-hosted}
steps:
- uses: actions/checkout@v4
- name: Install Dependencies
run: |
cd ../
rm -rf bandicoot-code
git clone --depth 1 --branch 2.1.1 https://gitlab.com/bandicoot-lib/bandicoot-code.git
cd bandicoot-code/
mkdir build/
cd build/
if [[ "${{ matrix.config.name }}" == "CUDA" ]]; then
echo "Installing Bandicoot CUDA"
cmake -DFIND_CUDA=ON -DFIND_OPENCL=OFF -DBUILD_TESTS=OFF ../
make
elif [[ "${{ matrix.config.name }}" == "OpenCL" ]]; then
echo "Installing Bandicoot OpenCL"
cmake -DFIND_CUDA=OFF -DFIND_OPENCL=ON -DBUILD_TESTS=OFF ../
make
fi
- name: Build ensmallen
run: |
mkdir build
cd build/
if [[ "${{ matrix.config.name }}" == "CPU" ]]; then
cmake -DUSE_BANDICOOT=OFF ..
else
cmake -DBANDICOOT_INCLUDE_DIR=../../bandicoot-code/include/ ..
fi
make ensmallen_tests
- name: Test ensmallen
run: |
cd build/
if [[ "${{ matrix.config.name }}" == "CUDA" ]]; then
COOT_DEFAULT_BACKEND=CUDA_BACKEND ./ensmallen_tests
elif [[ "${{ matrix.config.name }}" == "OpenCL" ]]; then
COOT_DEFAULT_BACKEND=CL_BACKEND ./ensmallen_tests
else
./ensmallen_tests
fi