-
Notifications
You must be signed in to change notification settings - Fork 7
123 lines (100 loc) · 3.48 KB
/
ci.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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
name: CI
on: [push, pull_request]
jobs:
#########################
# Build and test with GCC
#########################
build-test-gcc-cpu:
# The type of runner that the job will run on
runs-on: ubuntu-22.04
steps:
# Checks-out your repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC sudo apt-get install -y make g++ libopenblas-dev libscalapack-mpi-dev wget git make cmake
- name: Build
run: |
cd ${GITHUB_WORKSPACE}
mkdir -p build
cd build
cmake .. -DSPLA_BUILD_TESTS=ON
make -j2
- name: Run tests
run: |
export OMPI_MCA_btl_vader_single_copy_mechanism=none
${GITHUB_WORKSPACE}/build/tests/run_tests
- name: Run tests with MPI
run: |
export OMPI_MCA_btl_vader_single_copy_mechanism=none
mpirun -n 2 ${GITHUB_WORKSPACE}/build/tests/run_tests
###########################
# Build and test with clang
###########################
build-test-clang-cpu:
# The type of runner that the job will run on
runs-on: ubuntu-22.04
steps:
# Checks-out your repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v4
- name: Install dependencies
run: |
sudo apt-get update
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC sudo apt-get install -y make clang libopenblas-dev libscalapack-mpi-dev wget git make cmake
- name: Build
run: |
cd ${GITHUB_WORKSPACE}
mkdir -p build
cd build
CXX=clang++ cmake .. -DSPLA_BUILD_TESTS=ON -DSPLA_OMP=OFF
make -j2
- name: Run tests
run: |
export OMPI_MCA_btl_vader_single_copy_mechanism=none
${GITHUB_WORKSPACE}/build/tests/run_tests
- name: Run tests with MPI
run: |
export OMPI_MCA_btl_vader_single_copy_mechanism=none
mpirun -n 2 ${GITHUB_WORKSPACE}/build/tests/run_tests
#################
# Build with CUDA
#################
build-cuda:
runs-on: ubuntu-22.04
container: nvidia/cuda:11.0.3-devel-ubuntu20.04
steps:
# Checks-out your repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v4
- name: Install dependencies
run: |
apt-get update
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y make g++ libopenblas-dev libscalapack-mpi-dev wget git make
cd ${HOME} && wget https://github.com/Kitware/CMake/releases/download/v3.18.0/cmake-3.18.0-Linux-x86_64.tar.gz && tar -xzvf cmake-3.18.0-Linux-x86_64.tar.gz
- name: Build
run: |
cd ${GITHUB_WORKSPACE}
mkdir -p build
cd build
${HOME}/cmake-3.18.0-Linux-x86_64/bin/cmake .. -DSPLA_BUILD_TESTS=ON -DSPLA_GPU_BACKEND=CUDA
make -j2 VERBOSE=1
#################
# Build with ROCm
#################
build-rocm:
runs-on: ubuntu-22.04
container: rocm/dev-ubuntu-22.04:5.6-complete
steps:
# Checks-out your repository under $GITHUB_WORKSPACE
- uses: actions/checkout@v4
- name: Install dependencies
run: |
apt-get update
DEBIAN_FRONTEND=noninteractive TZ=Etc/UTC apt-get install -y make g++ libopenblas-dev libscalapack-mpi-dev wget git make cmake
- name: Build
run: |
cd ${GITHUB_WORKSPACE}
mkdir -p build
cd build
cmake .. -DSPLA_BUILD_TESTS=ON -DSPLA_GPU_BACKEND=ROCM -DCMAKE_PREFIX_PATH="/opt/rocm;/opt/rocm/hip"
make -j2