Skip to content

Commit

Permalink
Merge #395
Browse files Browse the repository at this point in the history
395: Re-enable release builds on Jenkins r=msimberg a=msimberg

Half-depends on #67 (i.e. should go in afterwards).

Fixes #382.

This may end up increasing the failure rate of #191 to something that is no longer sustainable. With this we also have to be a lot more mindful not to spam `bors try/merge` since the used node hours will at least double. Draft because of the above reasons.

Co-authored-by: Mikael Simberg <mikael.simberg@iki.fi>
  • Loading branch information
bors[bot] and msimberg authored Sep 29, 2022
2 parents c46aed0 + 2e10d0b commit c6d3f1f
Show file tree
Hide file tree
Showing 10 changed files with 77 additions and 4 deletions.
12 changes: 11 additions & 1 deletion .github/bors.toml
Original file line number Diff line number Diff line change
Expand Up @@ -42,17 +42,27 @@ status = [
"ci/circleci: arm64_build",

# Jenkins
"jenkins/cscs-ault/hipcc-release",
"jenkins/cscs-daint/cce-debug",
"jenkins/cscs-daint/cce-release",
"jenkins/cscs-daint/clang-11-debug",
"jenkins/cscs-daint/clang-11-release",
"jenkins/cscs-daint/clang-12-debug",
"jenkins/cscs-daint/clang-12-release",
"jenkins/cscs-daint/clang-13-debug",
"jenkins/cscs-daint/clang-13-release",
"jenkins/cscs-daint/clang-14-cuda-debug",
"jenkins/cscs-daint/clang-14-cuda-release",
"jenkins/cscs-daint/gcc-9-debug",
"jenkins/cscs-daint/gcc-9-release",
"jenkins/cscs-daint/gcc-10-apex-debug",
"jenkins/cscs-daint/gcc-10-apex-release",
"jenkins/cscs-daint/gcc-11-debug",
"jenkins/cscs-daint/gcc-11-release",
"jenkins/cscs-daint/gcc-12-debug",
"jenkins/cscs-daint/gcc-12-release",
"jenkins/cscs-daint/gcc-cuda-debug",
"jenkins/cscs-ault/hipcc-release",
"jenkins/cscs-daint/gcc-cuda-release",
]
required_approvals = 0
delete_merged_branches = true
Expand Down
2 changes: 1 addition & 1 deletion .jenkins/cscs/Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ pipeline {
}
axis {
name 'build_type'
values 'Debug' // 'Release'
values 'Debug', 'Release'
}
}
stages {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ namespace pika::parallel::detail {
Pred&& pred, Proj&& proj)
{
auto end = detail::advance_to_sentinel(first, last);
auto nelem = end - first;
[[maybe_unused]] auto nelem = end - first;

PIKA_ASSERT(0 <= nelem && first <= nth && (nth - first) <= nelem);

Expand Down
10 changes: 9 additions & 1 deletion libs/pika/algorithms/tests/unit/algorithms/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,18 @@ set(tests
uninitialized_moven
uninitialized_value_construct
uninitialized_value_constructn
unique
unique_copy
)

# Cray's clang compiler produces segfaults in release mode on the unique test.
# This seems to be a compiler bug. We disable the test for all non-Debug builds
# with clang.
if(NOT (NOT "${CMAKE_BUILD_TYPE}" STREQUAL "Debug"
AND "${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang")
)
list(APPEND tests unique)
endif()

if(PIKA_WITH_CXX17_STD_EXECUTION_POLICIES)
list(APPEND tests foreach_std_policies)
endif()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,20 @@ void test_shift_left_sent(IteratorTag)
std::begin(c) + ((std::size_t) ARR_SIZE - n - 1), std::begin(d)));

// ensure shift by more than n does not crash
// GCC warns about out-of-bounds reads/writes that would happen if the
// shift implementation would attempt to actually do the shift with n =
// ARR_SIZE + 1. However, that path is not taken for n >= ARR_SIZE so these
// warnings are false positives.
#if defined(PIKA_GCC_VERSION) && PIKA_GCC_VERSION >= 120000
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds"
#pragma GCC diagnostic ignored "-Wstringop-overread"
#endif
pika::ranges::shift_left(std::begin(c),
sentinel<std::size_t>{*std::rbegin(c)}, (std::size_t)(ARR_SIZE + 1));
#if defined(PIKA_GCC_VERSION) && PIKA_GCC_VERSION >= 120000
#pragma GCC diagnostic push
#endif
}

template <typename ExPolicy, typename IteratorTag>
Expand Down Expand Up @@ -90,8 +102,20 @@ void test_shift_left_sent(ExPolicy policy, IteratorTag)
std::begin(c) + ((std::size_t) ARR_SIZE - n - 1), std::begin(d)));

// ensure shift by more than n does not crash
// GCC warns about out-of-bounds reads/writes that would happen if the
// shift implementation would attempt to actually do the shift with n =
// ARR_SIZE + 1. However, that path is not taken for n >= ARR_SIZE so these
// warnings are false positives.
#if defined(PIKA_GCC_VERSION) && PIKA_GCC_VERSION >= 120000
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds"
#pragma GCC diagnostic ignored "-Wstringop-overread"
#endif
pika::ranges::shift_left(policy, std::begin(c),
sentinel<std::size_t>{*std::rbegin(c)}, (std::size_t)(ARR_SIZE + 1));
#if defined(PIKA_GCC_VERSION) && PIKA_GCC_VERSION >= 120000
#pragma GCC diagnostic pop
#endif
}

template <typename IteratorTag>
Expand Down
4 changes: 4 additions & 0 deletions libs/pika/assertion/tests/unit/assert_fail.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@
// file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)

#include <pika/assert.hpp>
#include <pika/testing.hpp>

#include <string>

[[noreturn]] void assertion_handler(
pika::detail::source_location const&, const char*, std::string const&)
{
PIKA_TEST(true);
std::exit(1);
}

Expand All @@ -20,4 +22,6 @@ int main()
// ctest considers a fatal error, even if WILL_FAIL is set to true.
pika::detail::set_assertion_handler(&assertion_handler);
PIKA_ASSERT(false);

PIKA_TEST(true);
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,15 @@
#if 1 // !defined(PIKA_HAVE_CXX17_MEMORY_RESOURCE)

// fall back to Boost if memory_resource is not supported
#if defined(PIKA_GCC_VERSION) && PIKA_GCC_VERSION >= 120000
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds"
#pragma GCC diagnostic ignored "-Wstringop-overread"
#endif
#include <boost/container/small_vector.hpp>
#if defined(PIKA_GCC_VERSION) && PIKA_GCC_VERSION >= 120000
#pragma GCC diagnostic pop
#endif

namespace pika::detail {

Expand Down
7 changes: 7 additions & 0 deletions libs/pika/memory/include/pika/memory/intrusive_ptr.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,16 @@ namespace pika { namespace memory {
intrusive_ptr_add_ref(px);
}

#if defined(PIKA_GCC_VERSION) && PIKA_GCC_VERSION >= 120000
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wuse-after-free"
#endif
intrusive_ptr(intrusive_ptr const& rhs)
: px(rhs.px)
{
#if defined(PIKA_GCC_VERSION) && PIKA_GCC_VERSION >= 120000
#pragma GCC diagnostic pop
#endif
if (px != nullptr)
intrusive_ptr_add_ref(px);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,14 @@ namespace pika {
void async_complete()
{
bool expected = false;
#if defined(PIKA_GCC_VERSION) && PIKA_GCC_VERSION >= 120000
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstringop-overflow"
#endif
if (finished_.compare_exchange_strong(expected, true))
#if defined(PIKA_GCC_VERSION) && PIKA_GCC_VERSION >= 120000
#pragma GCC diagnostic pop
#endif
{
PIKA_INVOKE(visitor(), async_traverse_complete_tag{},
PIKA_MOVE(args_));
Expand Down
5 changes: 5 additions & 0 deletions libs/pika/threading/tests/unit/stack_check.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,12 @@ int pika_main()
std::ptrdiff_t stack_now = std::get<2>(i);
std::cout << "stack remaining 0x" << std::hex << stack_now << "\n";
#if defined(PIKA_HAVE_THREADS_GET_STACK_POINTER)
#if defined(PIKA_DEBUG)
PIKA_TEST_LT(current_stack, stack_now);
#else
// In release builds some stack variables may get optimized away.
PIKA_TEST_LTE(current_stack, stack_now);
#endif
#endif
current_stack = stack_now;
my_stack_info.pop();
Expand Down

0 comments on commit c6d3f1f

Please sign in to comment.