-
Notifications
You must be signed in to change notification settings - Fork 3
192 lines (175 loc) · 6.22 KB
/
builds.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
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
# This file is part of covfie, a part of the ACTS project
#
# Copyright (c) 2022 CERN
#
# This Source Code Form is subject to the terms of the Mozilla Public License,
# v. 2.0. If a copy of the MPL was not distributed with this file, You can
# obtain one at http://mozilla.org/MPL/2.0/.
name: Build Tests
on: [ push, pull_request ]
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
linux-core:
strategy:
matrix:
BUILD:
- "Release"
- "Debug"
CXX_STANDARD:
- 20
COMPILER:
- NAME: "gcc"
CXX: "g++"
- NAME: "clang"
CXX: "clang++"
name: "Linux/Core/${{ matrix.BUILD }}/${{ matrix.COMPILER.NAME }}/C++${{ matrix.CXX_STANDARD }}"
runs-on: "ubuntu-latest"
container: ubuntu:24.04
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: apt-get update && apt-get -y install
libboost-filesystem-dev
libboost-program-options-dev
libboost-log-dev
wget
cmake
libbenchmark-dev
g++
clang
- name: Install Google Test
run: |
wget https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz
tar -xzvf v1.14.0.tar.gz
cmake -S googletest-1.14.0 -B gtest_build -DBUILD_GMOCK=Off -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/.prefixes/gtest/
cmake --build gtest_build
cmake --install gtest_build
- name: Configure
run: cmake
-DCMAKE_CXX_COMPILER=$(which ${{ matrix.COMPILER.CXX }})
-DCMAKE_BUILD_TYPE=${{ matrix.BUILD }}
-DCOVFIE_REQUIRE_CXX20=${{ matrix.CXX_STANDARD == 20 && 'On' || 'Off' }}
-DCOVFIE_FAIL_ON_WARNINGS=TRUE
-DCOVFIE_BUILD_TESTS=On
-DCOVFIE_BUILD_EXAMPLES=On
-DCOVFIE_BUILD_BENCHMARKS=On
-DCOVFIE_TEST_HEADERS=On
-DCMAKE_CXX_STANDARD=${{ matrix.CXX_STANDARD }}
-DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/.prefixes/gtest/"
-S $GITHUB_WORKSPACE
-B build
- name: Build
run: cmake --build build
- name: Core tests
run: build/tests/core/test_core
- name: CPU tests
run: build/tests/cpu/test_cpu
linux-cuda:
strategy:
matrix:
BUILD:
- "Release"
- "Debug"
CXX_STANDARD:
- 20
COMPILER:
- NAME: "gcc"
CXX: "g++"
CUDA_COMPILER:
- NAME: "nvcc"
CUDACC: "nvcc"
name: "Linux/CUDA/${{ matrix.BUILD }}/${{ matrix.COMPILER.NAME }}+${{ matrix.CUDA_COMPILER.NAME }}/C++${{ matrix.CXX_STANDARD }}"
runs-on: "ubuntu-latest"
container: ubuntu:24.04
steps:
- uses: actions/checkout@v3
- name: Install dependencies
run: apt-get update && apt-get -y install
libboost-filesystem-dev
libboost-program-options-dev
libboost-log-dev
wget
cmake
libbenchmark-dev
g++-10
clang
nvidia-cuda-toolkit
- name: Install Google Test
run: |
wget https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz
tar -xzvf v1.14.0.tar.gz
cmake -S googletest-1.14.0 -B gtest_build -DBUILD_GMOCK=Off -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/.prefixes/gtest/
cmake --build gtest_build
cmake --install gtest_build
- name: Configure
run: cmake
-DCMAKE_BUILD_TYPE=${{ matrix.BUILD }}
-DCMAKE_CUDA_ARCHITECTURES=52
-DCMAKE_CUDA_HOST_COMPILER=$(which g++-10)
-DCOVFIE_FAIL_ON_WARNINGS=TRUE
-DCOVFIE_BUILD_TESTS=On
-DCOVFIE_BUILD_EXAMPLES=On
-DCOVFIE_BUILD_BENCHMARKS=On
-DCOVFIE_PLATFORM_CUDA=On
-DCOVFIE_PLATFORM_CPU=On
-DCOVFIE_TEST_HEADERS=On
-DCMAKE_CXX_STANDARD=${{ matrix.CXX_STANDARD }}
-DCMAKE_PREFIX_PATH="$GITHUB_WORKSPACE/.prefixes/gtest/"
-S $GITHUB_WORKSPACE
-B build
- name: Build
run: cmake --build build
- name: Core tests
run: build/tests/core/test_core
windows-core:
strategy:
matrix:
BUILD:
- "Release"
- "Debug"
CXX_STANDARD:
- 20
name: "Windows/Core/${{ matrix.BUILD }}/MSVC/C++${{ matrix.CXX_STANDARD }}"
runs-on: "windows-latest"
steps:
- uses: actions/checkout@v3
- name: Install Google Test
run: |
Invoke-WebRequest -Uri "https://github.com/google/googletest/archive/refs/tags/v1.14.0.tar.gz" -OutFile "gtest.tar.gz"
tar -xf gtest.tar.gz
cmake -S .\googletest-1.14.0 -B .\gtest_build -Dgtest_force_shared_crt=On -DBUILD_GMOCK=Off
cmake --build .\gtest_build --config ${{ matrix.BUILD }}
cmake --install .\gtest_build --config ${{ matrix.BUILD }} --prefix ${{ github.workspace }}\.prefix
- name: Install Google Benchmark
run: |
Invoke-WebRequest -Uri "https://github.com/google/benchmark/archive/refs/tags/v1.8.3.tar.gz" -OutFile "gbench.tar.gz"
tar -xf gbench.tar.gz
cmake -S .\benchmark-1.8.3 -B .\gbench_build -DCMAKE_PREFIX_PATH=${{ github.workspace }}\.prefix -DBENCHMARK_ENABLE_TESTING=Off
cmake --build .\gbench_build --config ${{ matrix.BUILD }}
cmake --install .\gbench_build --config ${{ matrix.BUILD }} --prefix ${{ github.workspace }}\.prefix
- name: Install Boost
run: |
Invoke-WebRequest -Uri "https://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_1_83_0.tar.gz" -OutFile "boost.tar.gz"
tar -xf boost.tar.gz
cd boost_1_83_0
.\bootstrap.bat
.\b2 install --with-log --with-program_options --prefix="${{ github.workspace }}\.prefix"
- name: Configure
run: cmake
-DCOVFIE_FAIL_ON_WARNINGS=TRUE
-DCOVFIE_BUILD_TESTS=On
-DCOVFIE_BUILD_EXAMPLES=On
-DCOVFIE_BUILD_BENCHMARKS=On
-DCOVFIE_PLATFORM_CPU=On
-DCOVFIE_QUIET=On
-DCOVFIE_TEST_HEADERS=On
-DCMAKE_CXX_STANDARD=${{ matrix.CXX_STANDARD }}
-DCMAKE_PREFIX_PATH="${{ github.workspace }}\.prefix"
-S ${{ github.workspace }}
-B build
- name: Build
run: cmake --build build --config ${{ matrix.BUILD }}
- name: Core tests
run: .\build\tests\core\${{ matrix.BUILD}}\test_core.exe