-
Notifications
You must be signed in to change notification settings - Fork 8
131 lines (125 loc) · 4.4 KB
/
tests-windows.yaml
File metadata and controls
131 lines (125 loc) · 4.4 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
# 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:
id_repo:
runs-on: windows-latest
steps:
- name: Identify repository
id: identify_repo
run: |
echo "in_base_repo=${{(github.event_name == 'push' && github.repository == 'CExA-project/ddc') || github.event.pull_request.head.repo.full_name == 'CExA-project/ddc'}}" >> "$GITHUB_OUTPUT"
outputs: {in_base_repo: '${{steps.identify_repo.outputs.in_base_repo}}'}
test-windows:
if: github.ref_name != 'main'
strategy:
fail-fast: false
matrix:
cxx_version: ['17', '20'] # C++23 does not work
config: ['Release']
runs-on: windows-latest
env:
Kokkos_ROOT: ${{github.workspace}}/opt/kokkos
GTest_ROOT: ${{github.workspace}}/opt/gtest
CMAKE_BUILD_PARALLEL_LEVEL: 4
permissions:
checks: write # Required by mikepenz/action-junit-report
steps:
- name: Checkout built branch
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: google/googletest
ref: v1.16.0
path: googletest
- name: Install Google test
shell: bash
run: |
cmake \
-D CMAKE_CXX_STANDARD=${{matrix.cxx_version}} \
-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@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
repository: kokkos/kokkos
ref: 4.6.00
path: kokkos
- name: Install Kokkos
shell: bash
run: |
cmake \
-D CMAKE_CXX_STANDARD=${{matrix.cxx_version}} \
-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@cf701569b05ccdd861a76b8607a66d76f6fd4857 # v5.5.1
if: ( success() || failure() ) # always run even if the previous step fails
with:
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