-
Notifications
You must be signed in to change notification settings - Fork 1
150 lines (139 loc) · 4.33 KB
/
test.yml
File metadata and controls
150 lines (139 loc) · 4.33 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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# SPDX-FileCopyrightText: 2025 SeisSol Group
#
# SPDX-License-Identifier: BSD-3-Clause
# SPDX-LicenseComments: Full text under /LICENSE and /LICENSES/
#
# SPDX-FileContributor: Author lists in /AUTHORS and /CITATION.cff
name: build-device
on:
- push
jobs:
device-build-test:
name: device-build-test
runs-on: ${{ matrix.setup.runner }}
container:
image: ${{ matrix.setup.container }}
options: ${{ matrix.setup.container-options || ' ' }}
strategy:
fail-fast: false
matrix:
arch:
- hsw
build_type:
- Release
- Debug
setup:
- arch: sm_86
backend: cuda
cc: gcc-13
cxx: g++-13
fc: gfortran-13
container: seissol/gha-gpu-nv:davschneller-ci-merge
runner: self-hosted
container-options: --runtime=nvidia --gpus=all
pythonbreak: true
test: true
- arch: sm_86
backend: acpp
cc: gcc-13
cxx: g++-13
fc: gfortran-13
container: seissol/gha-gpu-nv:davschneller-ci-merge
runner: self-hosted
container-options: --runtime=nvidia --gpus=all
pythonbreak: true
test: true
- arch: sm_86
backend: cuda
cc: clang-18
cxx: clang++-18
fc: gfortran-13 # TODO?
container: seissol/gha-gpu-nv:davschneller-ci-merge
runner: self-hosted
container-options: --runtime=nvidia --gpus=all
pythonbreak: true
test: true
- arch: sm_86
backend: cuda
cc: nvc
cxx: nvc++
fc: nvfortran
container: seissol/gha-gpu-nvhpc:davschneller-ci-merge
runner: self-hosted
container-options: --runtime=nvidia --gpus=all
pythonbreak: true
test: true
- arch: gfx906
backend: hip
cc: gcc-13
cxx: g++-13
fc: gfortran-13
container: seissol/gha-gpu-amd:davschneller-ci-merge
runner: ubuntu-24.04
pythonbreak: true
test: false
- arch: gfx906
backend: acpp
cc: gcc-13
cxx: g++-13
fc: gfortran-13
container: seissol/gha-gpu-amd:davschneller-ci-merge
runner: ubuntu-24.04
pythonbreak: true
test: false
- arch: gfx906
backend: hip
cc: clang-18
cxx: clang++-18
fc: gfortran-13 # TODO?
container: seissol/gha-gpu-amd:davschneller-ci-merge
runner: ubuntu-24.04
pythonbreak: true
test: false
- arch: skl
backend: oneapi
cc: icx
cxx: icpx
fc: ifx
container: seissol/gha-gpu-intel:davschneller-gpu-image
container-options: --device /dev/dri
runner: self-hosted
pythonbreak: false
test: true
steps:
- name: install-gtest
run: |
git clone --depth 1 --branch release-1.11.0 https://github.com/google/googletest
mkdir -p googletest/build && cd googletest/build
cmake .. -GNinja -DBUILD_GTEST=ON -DBUILD_GMOCK=ON -Dgtest_disable_pthreads=ON -DBUILD_SHARED_LIBS=ON
ninja install
cd ../..
- name: checkout-device
uses: actions/checkout@v6
with:
submodules: recursive
- id: build
name: build-device
run: |
cd tests
mkdir build && cd build
# TODO: change to `-Wall -Werror` at some point
EXTRA_FLAGS="-Wall"
export CFLAGS="${EXTRA_FLAGS} ${CFLAGS}"
export CXXFLAGS="${EXTRA_FLAGS} ${CXXFLAGS}"
export FFLAGS="${EXTRA_FLAGS} ${FFLAGS}"
export CC=${{matrix.setup.cc}}
export CXX=${{matrix.setup.cxx}}
export FC=${{matrix.setup.fc}}
cmake .. -GNinja \
-DDEVICE_BACKEND=${{matrix.setup.backend}} \
-DSM=${{matrix.setup.arch}} \
-DCMAKE_BUILD_TYPE=${{matrix.build_type}}
ninja
- id: test
name: test-device
if: ${{matrix.setup.test}}
run: |
cd tests
cd build
./tests