-
Notifications
You must be signed in to change notification settings - Fork 0
228 lines (213 loc) · 9.78 KB
/
Copy pathtest.yml
File metadata and controls
228 lines (213 loc) · 9.78 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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
name: Run tests
description: Build and test.
on:
push:
branches:
- main
pull_request:
branches:
- main
schedule:
# At 06:00 on Sunday.
- cron: '0 6 * * 0'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
permissions:
contents: read
packages: read
env:
REGISTRY: ghcr.io
jobs:
build-images:
uses: ./.github/workflows/build.images.yml
secrets: inherit
permissions:
contents: read
packages: write
pull-requests: read
format:
uses: ./.github/workflows/format.yml
build-and-test-smoke:
needs: [build-images]
runs-on: ubuntu-latest
strategy:
matrix:
include:
- {compiler: {family: gnu, version: 14}, cmake_build_type: Debug}
container:
image: ${{ needs.build-images.outputs.CI_IMAGE }}:${{ matrix.compiler.family }}-${{ matrix.compiler.version }}-${{ matrix.cmake_build_type }}
steps:
- uses: actions/checkout@v7
with:
submodules: true
- uses: actions/cache@v6
with:
path: ${{ github.workspace }}/.ccache
key: ccache-${{ runner.os }}-${{ matrix.compiler.family }}-${{ matrix.compiler.version }}-${{ github.ref }}-${{ github.sha }}
restore-keys: |
ccache-${{ runner.os }}-${{ matrix.compiler.family }}-${{ matrix.compiler.version }}-${{ github.ref }}-
ccache-${{ runner.os }}-${{ matrix.compiler.family }}-${{ matrix.compiler.version }}-
- run : |
ccache --set-config=max_size=100M
ccache --set-config=compression=true
ccache --set-config=base_dir=$GITHUB_WORKSPACE
ccache --set-config=cache_dir=$GITHUB_WORKSPACE/.ccache
- run: ccache --verbose --show-stats
- run: cmake -S . --preset=${{ matrix.compiler.family }} -DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type }}
- run: cmake --build --preset=${{ matrix.compiler.family }} -j4
- run: ctest --preset=${{ matrix.compiler.family }}
- run: bash tests/install_test.sh ${{ matrix.compiler.family }} ${{ matrix.compiler.family }}
build-and-test:
needs: [build-images, format, build-and-test-smoke]
runs-on: ${{ matrix.runs-on && fromJSON(matrix.runs-on) || 'ubuntu-latest' }}
strategy:
fail-fast: false
matrix:
include:
- kokkos_backends: [Threads]
compiler:
family: gnu
version: 14
- {kokkos_backends: [OpenMP], compiler: {family: gnu, version: 14}, cmake_build_type: Debug}
- {kokkos_backends: [OpenMP], compiler: {family: gnu, version: 14}, cmake_build_type: Release}
- {kokkos_backends: [OpenMP], compiler: {family: gnu, version: 15}, cxxstd: "23"}
- {kokkos_backends: [OpenMP], compiler: {family: gnu, version: 14}, cxxflags: "-fsanitize=address"}
- {kokkos_backends: [OpenMP], compiler: {family: gnu, version: 14}, cxxflags: "-fsanitize=leak"}
- {kokkos_backends: [OpenMP], compiler: {family: gnu, version: 14}, cxxflags: "-fsanitize=thread -Wno-error=tsan", env: {OMP_NUM_THREADS: 1}}
- {kokkos_backends: [OpenMP], compiler: {family: clang, version: 22}, cxxstd: "20", extra_type_checking: true}
- {kokkos_backends: [OpenMP], compiler: {family: clang, version: 22}, cxxstd: "23"}
- {kokkos_backends: [OpenMP], compiler: {family: clang, version: 22}, cxxstd: "20", cmake_build_type: Debug}
- kokkos_backends: [HPX]
compiler:
family: gnu
version: 14
- {kokkos_backends: [HPX], compiler: {family: clang, version: 22}}
- {kokkos_backends: [HPX], compiler: {family: clang, version: 22}, cxxflags: "-fsanitize=address"}
- {kokkos_backends: [HPX], compiler: {family: clang, version: 22}, cxxflags: "-fsanitize=leak"}
- kokkos_backends: [OpenMP, Cuda]
compiler:
family: clang
version: 21
runs-on : "['self-hosted', 'linux', 'docker', 'amd64', 'volta70', 'gpu:0']"
tag_suffix : -volta70
- kokkos_backends: [OpenMP, Cuda]
compiler:
family: clang
version: 22
runs-on : "['self-hosted', 'linux', 'docker', 'amd64', 'blackwell120', 'gpu:0']"
tag_suffix : -blackwell120
- kokkos_backends: [HPX, Cuda]
compiler:
family: clang
version: 22
runs-on : "['self-hosted', 'linux', 'docker', 'amd64', 'blackwell120', 'gpu:0']"
tag_suffix : -blackwell120
extra_type_checking: true
- kokkos_backends: [OpenMP, HIP]
compiler:
family: rocm
version: 7.0.2
runs-on : "['self-hosted', 'linux', 'docker', 'amd64', 'amd_gfx1201', 'gpu:0']"
docker_run_args: --device /dev/kfd --device /dev/dri
tag_suffix : -zen5-amd_gfx1201
- kokkos_backends: [OpenMP, SYCL]
compiler:
family: intel
version: '2025.2'
runs-on: "['self-hosted', 'linux', 'docker', 'amd64', 'volta70', 'gpu:0']"
tag_suffix: -volta70
- kokkos_backends: [OpenMP]
compiler:
family: clang
version: 22
runs-on: "['ubuntu-24.04-arm']"
tag_suffix: -arm64
container:
image: ${{ needs.build-images.outputs.CI_IMAGE }}:${{ matrix.compiler.family }}-${{ matrix.compiler.version }}-${{ matrix.kokkos_backends && format('{0}-', join(matrix.kokkos_backends, '-')) || '' }}${{ matrix.cmake_build_type || 'Release' }}${{ matrix.tag_suffix }}
# The 'options' field cannot be empty. Provide '--annotation' to ensure that if 'docker_run_args' is empty, the workflow is still valid.
options: "--annotation ref=${{ github.ref }} ${{ matrix.docker_run_args }}"
env: ${{ matrix.env || fromJSON('{}') }}
steps:
- uses: actions/checkout@v7
with:
submodules: true
- name: Compute a key that uniquely identifies the current job, given the matrix.
run: |
UNIQUE_JOB_KEY=${{ runner.os }}-${{ matrix.compiler.family }}-${{ matrix.compiler.version }}-${{ matrix.cmake_build_type || 'Release' }}-${{ matrix.cxxstd || 20 }}-${{ join(matrix.kokkos_backends, '-') }}-${{ runner.arch }}
echo "This job is identified by '${UNIQUE_JOB_KEY}'."
echo "UNIQUE_JOB_KEY=${UNIQUE_JOB_KEY}" >> $GITHUB_ENV
- if: runner.environment == 'github-hosted'
uses: actions/cache@v6
with:
path: ${{ github.workspace }}/.ccache
key: ccache-${{ env.UNIQUE_JOB_KEY }}-${{ github.ref }}-${{ github.sha }}
restore-keys: |
ccache-${{ env.UNIQUE_JOB_KEY }}-${{ github.ref }}-
ccache-${{ env.UNIQUE_JOB_KEY }}-
- if: runner.environment == 'github-hosted'
run : |
ccache --set-config=max_size=100M
ccache --set-config=compression=true
ccache --set-config=base_dir=$GITHUB_WORKSPACE
ccache --set-config=cache_dir=$GITHUB_WORKSPACE/.ccache
- run: ccache --verbose --show-stats
- run: |
cmake -S . --preset=${{ matrix.compiler.family }}-${{ join(matrix.kokkos_backends, '-') }} \
-DCMAKE_CXX_FLAGS="${{ matrix.cxxflags }}" \
-DCMAKE_BUILD_TYPE=${{ matrix.cmake_build_type || 'Release' }} \
-DKokkosExecution_ENABLE_EXTRA_TYPE_CHECKING=${{ matrix.extra_type_checking && 'ON' || 'OFF' }} \
-DCMAKE_CXX_STANDARD=${{ matrix.cxxstd || 20 }}
- run: |
cmake --build --preset=${{ matrix.compiler.family }}-${{ join(matrix.kokkos_backends, '-') }} -j4
- run: |
ctest --preset=${{ matrix.compiler.family }}-${{ join(matrix.kokkos_backends, '-') }}
- name: CTest output artifact exists.
if: always()
run: |
test -f build-with-${{ matrix.compiler.family }}-${{ join(matrix.kokkos_backends, '-') }}/Testing/Temporary/LastTest.log
- name: CTest output artifact upload.
if: always()
uses: actions/upload-artifact@v7
with:
name: ${{ env.UNIQUE_JOB_KEY }}-${{ job.check_run_id }}
retention-days: 1
path: |
build-with-${{ matrix.compiler.family }}-${{ join(matrix.kokkos_backends, '-') }}/Testing/Temporary/LastTest.log
- run: |
bash tests/install_test.sh ${{ matrix.compiler.family }} ${{ matrix.compiler.family }}-${{ join(matrix.kokkos_backends, '-') }}
documentation:
needs: [build-images, format]
runs-on: [self-hosted, linux, docker, amd64]
container:
image: ${{ needs.build-images.outputs.CI_IMAGE }}:gnu-14-OpenMP-Release
steps:
- uses: actions/checkout@v7
with:
submodules: true
- run: |
cmake -S . --preset=gnu-OpenMP -DKokkosExecution_ENABLE_DOCS=ON
- run: |
cmake --build --preset=gnu-OpenMP -j4 --target=docs
- uses: actions/upload-pages-artifact@v5
with:
path: build-with-gnu-OpenMP/docs/html
# The deploy job is heavily inspired from https://github.com/actions/deploy-pages.
deploy:
# The deployment only happens if the library can be built and the documentation generated.
needs: [build-and-test-smoke, build-and-test, documentation]
runs-on: ubuntu-latest
# The deployment only happens for 'main' branch.
if: ${{ ! failure() && ! cancelled() && github.ref == 'refs/heads/main' }}
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment.
permissions:
pages: write
id-token: write
# Deploy to the github-pages environment.
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Deploy to GitHub Pages.
id : deployment
uses: actions/deploy-pages@v5