-
Notifications
You must be signed in to change notification settings - Fork 9
120 lines (115 loc) · 3.92 KB
/
tests-windows.yaml
File metadata and controls
120 lines (115 loc) · 3.92 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
# Copyright (C) The DDC development team, see COPYRIGHT.md file
#
# SPDX-License-Identifier: MIT
---
name: Tests on Windows
# yamllint disable-line rule:truthy
on:
pull_request:
paths:
- '.github/workflows/tests-windows.yaml'
- '**.cpp'
- '**.hpp'
- '**.hpp.in'
- 'CMakeLists.txt'
- '**/CMakeLists.txt'
- '**.cmake'
- '**.cmake.in'
- 'docker/**'
- 'vendor/**'
push:
branches:
- main
paths:
- '.github/workflows/tests-windows.yaml'
- '**.cpp'
- '**.hpp'
- '**.hpp.in'
- 'CMakeLists.txt'
- '**/CMakeLists.txt'
- '**.cmake'
- '**.cmake.in'
- 'docker/**'
- 'vendor/**'
concurrency:
group: ${{github.workflow}}-${{github.ref == github.ref_protected && github.run_id || github.event.pull_request.number || github.ref}}
cancel-in-progress: true
permissions:
contents: read
jobs:
test-windows:
if: github.ref_name != 'main'
strategy:
fail-fast: false
matrix:
cxx_version: ['20', '23']
config: ['Release']
os: [windows-2022, windows-2025]
runs-on: ${{matrix.os}}
env:
Kokkos_ROOT: ${{github.workspace}}/opt/kokkos
GTest_ROOT: ${{github.workspace}}/opt/gtest
CMAKE_BUILD_PARALLEL_LEVEL: 4
steps:
- name: Checkout built branch
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: google/googletest
ref: v1.17.0
path: googletest
- name: Install Google test
shell: bash
run: |
cmake \
-D CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded \
-B build \
-S googletest
cmake --build build --config ${{matrix.config}}
cmake --install build --config ${{matrix.config}} --prefix $GTest_ROOT
rm -rf build
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
repository: kokkos/kokkos
ref: 5.0.2
path: kokkos
- name: Install Kokkos
shell: bash
run: |
cmake \
-D CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded \
-D Kokkos_ENABLE_DEPRECATED_CODE_4=OFF \
-D Kokkos_ENABLE_DEPRECATION_WARNINGS=OFF \
-D Kokkos_ENABLE_SERIAL=ON \
-B build \
-S kokkos
cmake --build build --config ${{matrix.config}}
cmake --install build --config ${{matrix.config}} --prefix $Kokkos_ROOT
rm -rf build
- name: Build DDC
shell: bash
run: |
cmake \
-D CMAKE_CXX_STANDARD=${{matrix.cxx_version}} \
-D CMAKE_MSVC_RUNTIME_LIBRARY=MultiThreaded \
-D DDC_GTest_DEPENDENCY_POLICY=INSTALLED \
-D DDC_Kokkos_DEPENDENCY_POLICY=INSTALLED \
-D DDC_BUILD_KERNELS_FFT=OFF \
-D DDC_BUILD_KERNELS_SPLINES=OFF \
-D DDC_BUILD_PDI_WRAPPER=OFF \
-B build
cmake --build build --config ${{matrix.config}}
ctest --test-dir build --build-config ${{matrix.config}} --output-on-failure --timeout 10 --output-junit tests.xml
- name: Publish Test Report
uses: mikepenz/action-junit-report@bccf2e31636835cf0874589931c4116687171386 # v6.4.0
if: ( success() || failure() ) # always run even if the previous step fails
with:
annotate_only: true # forked repo cannot write to checks so just do annotations
report_paths: '${{github.workspace}}/build/tests.xml'
- name: Run examples
shell: bash
run: |
./build/examples/${{matrix.config}}/game_of_life.exe
./build/examples/${{matrix.config}}/heat_equation.exe
./build/examples/${{matrix.config}}/non_uniform_heat_equation.exe
./build/examples/${{matrix.config}}/uniform_heat_equation.exe