Skip to content

Commit a3b21b0

Browse files
authored
Merge pull request #326 from NavalNuclearLab/improved-ci
Improved continuous integration testing
2 parents 59687bf + a7bbc67 commit a3b21b0

5 files changed

Lines changed: 33 additions & 39 deletions

File tree

.github/workflows/ghaction.yml

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
1-
name: stdBLAS
1+
name: build/test
22

33
on: [push, pull_request]
44

5-
env:
6-
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
7-
BUILD_TYPE: RelWithDebInfo
8-
95
jobs:
106
osmatrix:
117
strategy:
8+
# Don't cancel all other builds if one fails
9+
fail-fast: false
1210
matrix:
13-
os: [ubuntu-latest, macos-latest]
11+
# A full list of runners can be found here:
12+
# https://docs.github.com/en/actions/reference/runners/github-hosted-runners
13+
os: [ubuntu-latest, macos-latest, windows-latest]
14+
build-type: [RelWithDebInfo]
15+
cxx-standard: [17,20]
16+
# In theory, we would test on older compilers such as gcc 7.5, clang 9, and vs 2019
17+
# They are not installed on the runners by default, leaving this as a TODO item for now.
1418
runs-on: ${{ matrix.os }}
1519

1620
steps:
@@ -24,38 +28,28 @@ jobs:
2428
run: cmake -E make_directory mdspan-build stdblas-build
2529

2630
- name: Configure mdspan
27-
working-directory: mdspan-build
28-
run: cmake -S $GITHUB_WORKSPACE/mdspan-src -B $GITHUB_WORKSPACE/mdspan-build -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/mdspan-install
31+
run: cmake -S mdspan-src -B mdspan-build -DMDSPAN_CXX_STANDARD=${{matrix.cxx-standard}} -DCMAKE_BUILD_TYPE=${{matrix.build-type}} -DCMAKE_INSTALL_PREFIX=mdspan-install
2932

3033
- name: Build mdspan
31-
working-directory: mdspan-build
32-
run: cmake --build $GITHUB_WORKSPACE/mdspan-build -j 3
34+
run: cmake --build mdspan-build -j 3
3335

3436
- name: Install mdspan
35-
working-directory: mdspan-build
36-
run: cmake --install $GITHUB_WORKSPACE/mdspan-build
37+
run: cmake --install mdspan-build
3738

38-
- name: Check Out
39+
- name: Check Out stdblas
3940
uses: actions/checkout@v4
4041
with:
4142
path: stdblas-src
4243

4344
- name: Configure stdblas
44-
shell: bash
45-
working-directory: stdblas-build
46-
run: cmake -S $GITHUB_WORKSPACE/stdblas-src -B $GITHUB_WORKSPACE/stdblas-build -Dmdspan_DIR=$GITHUB_WORKSPACE/mdspan-install/ -DLINALG_ENABLE_TESTS=On -DLINALG_ENABLE_EXAMPLES=On -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_INSTALL_PREFIX=$GITHUB_WORKSPACE/stdblas-install
45+
run: cmake -S stdblas-src -B stdblas-build -Dmdspan_DIR=mdspan-install -DLINALG_CXX_STANDARD=${{matrix.cxx-standard}} -DLINALG_ENABLE_TESTS=On -DLINALG_ENABLE_EXAMPLES=On -DCMAKE_BUILD_TYPE=${{matrix.build-type}} -DCMAKE_INSTALL_PREFIX=stdblas-install
4746

4847
- name: Build stdblas
49-
working-directory: stdblas-build
50-
shell: bash
51-
run: cmake --build $GITHUB_WORKSPACE/stdblas-build -j 3
48+
run: cmake --build stdblas-build -j 3
5249

5350
- name: Test stdblas
5451
working-directory: stdblas-build
55-
shell: bash
5652
run: ctest --output-on-failure
5753

5854
- name: Install stdblas
59-
working-directory: stdblas-build
60-
shell: bash
61-
run: cmake --install $GITHUB_WORKSPACE/stdblas-build
55+
run: cmake --install stdblas-build

include/experimental/__p1673_bits/linalg_execpolicy_mapper.hpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,11 @@ auto execpolicy_mapper(T) { return impl::inline_exec_t(); }
105105
namespace impl {
106106

107107
// std::remove_cvref_t is a C++20 feature.
108-
template<class T>
109-
using remove_cvref_t =
110108
#ifdef __cpp_lib_remove_cvref
111-
std::remove_cvref_t<T>;
109+
using std::remove_cvref_t;
112110
#else
113-
std::remove_const_t<std::remove_reference_t<decltype(policy)>>;
111+
template<class T>
112+
using remove_cvref_t = std::remove_const_t<std::remove_reference_t<T>>;
114113
#endif
115114

116115
// This function is not to be specialized; that's why

include/experimental/__p1673_bits/proxy_reference.hpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -140,11 +140,7 @@ class proxy_reference : proxy_reference_base {
140140
P1673_PROXY_REFERENCE_ARITHMETIC_OPERATOR( / )
141141

142142
friend auto abs(const derived_type& x) {
143-
if constexpr (std::is_unsigned_v<value_type>) {
144-
return value_type(static_cast<const this_type&>(x));
145-
} else {
146-
return abs(value_type(static_cast<const this_type&>(x)));
147-
}
143+
return impl::abs_if_needed(value_type(static_cast<const this_type&>(x)));
148144
}
149145

150146
friend auto real(const derived_type& x) {

include/experimental/__p1673_bits/transposed.hpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,14 @@ class layout_transpose {
105105
return nested_mapping_.required_span_size();
106106
}
107107

108-
template<class IndexType0, class IndexType1>
109-
requires(std::is_convertible_v<IndexType0, index_type> &&
110-
std::is_convertible_v<IndexType1, index_type>)
108+
MDSPAN_TEMPLATE_REQUIRES(
109+
class IndexType0,
110+
class IndexType1,
111+
/* requires */ (
112+
std::is_convertible_v<IndexType0, index_type> &&
113+
std::is_convertible_v<IndexType1, index_type>
114+
)
115+
)
111116
index_type operator() (IndexType0 i, IndexType1 j) const
112117
{
113118
return nested_mapping_(j, i);

tests/native/transposed.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -200,8 +200,8 @@ namespace {
200200
}
201201
}
202202

203-
template<size_t PaddingValue>
204-
void test_transposed_layout_left_padded(auto runtime_padding_value)
203+
template<size_t PaddingValue, class PaddingValueType>
204+
void test_transposed_layout_left_padded(PaddingValueType runtime_padding_value)
205205
{
206206
auto test_one = [=] (auto in_exts, auto out_exts,
207207
std::vector<char>& fake_storage)
@@ -248,8 +248,8 @@ namespace {
248248
}
249249
}
250250

251-
template<size_t PaddingValue>
252-
void test_transposed_layout_right_padded(auto runtime_padding_value)
251+
template<size_t PaddingValue, class PaddingValueType>
252+
void test_transposed_layout_right_padded(PaddingValueType runtime_padding_value)
253253
{
254254
auto test_one = [=] (auto in_exts, auto out_exts,
255255
std::vector<char>& fake_storage)

0 commit comments

Comments
 (0)