Skip to content

Make all the regression tests pass on CI #1393

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions .github/workflows/regression-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,12 +27,12 @@ jobs:
include:
- os: ubuntu-24.04
shortosname: ubu-24
compiler: clang++-18
compiler: clang++-19
cxx_std: c++20
stdlib: libstdc++
- os: ubuntu-24.04
shortosname: ubu-24
compiler: clang++-18
compiler: clang++-19
cxx_std: c++23
stdlib: libc++-18-dev
- os: ubuntu-22.04
Expand Down Expand Up @@ -74,12 +74,17 @@ jobs:
- name: Checkout repo
uses: actions/checkout@v4

- name: Prepare compilers
- name: Prepare compilers - macOS
if: matrix.os == 'macos-13'
run: |
sudo xcode-select --switch /Applications/Xcode_14.3.1.app
sudo ln -s "$(brew --prefix llvm@15)/bin/clang" /usr/local/bin/clang++-15

- name: Prepare compilers - Ubuntu 24.04
if: matrix.os == 'ubuntu-24.04'
run: |
sudo sudo apt-get install clang-19

- name: Run regression tests - Linux and macOS version
if: startsWith(matrix.os, 'ubuntu') || startsWith(matrix.os, 'macos')
run: |
Expand Down
6 changes: 6 additions & 0 deletions include/cpp2util.h
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,12 @@
#include <vector>
#endif

// Required for pure Cpp2 tests to pass on MSVC
// #include <cstdlib> causes C2995 of math tempaltes
#ifndef EXIT_FAILURE
#define EXIT_FAILURE 1
#endif

// cpp2util.h uses signed integer types for indices and container sizes
// so disable clang signed-to-unsigned conversion warnings in this header.
#ifdef __clang__
Expand Down
4 changes: 2 additions & 2 deletions regression-tests/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -169,8 +169,8 @@ else
exec_out_dir="$expected_results_dir/clang-12"
elif [[ "$compiler_version" == *"clang version 15.0"* ]]; then
exec_out_dir="$expected_results_dir/clang-15"
elif [[ "$compiler_version" == *"clang version 18.1"* ]]; then
exec_out_dir="$expected_results_dir/clang-18"
elif [[ "$compiler_version" == *"clang version 19.1"* ]]; then
exec_out_dir="$expected_results_dir/clang-19"
elif [[ "$compiler_version" == *"g++-10"* ]]; then
exec_out_dir="$expected_results_dir/gcc-10"
elif [[ "$compiler_version" == *"g++-12"* ||
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
../../../include/cpp2util.h(1235) decltype(auto) cpp2::impl::assert_in_bounds(auto &&, std::source_location) [arg = 5, x:auto = std::vector<int>]: Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4]
../../../include/cpp2util.h(1241) decltype(auto) cpp2::impl::assert_in_bounds(auto &&, std::source_location) [arg = 5, x:auto = std::vector<int>]: Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4]
Original file line number Diff line number Diff line change
@@ -1 +1 @@
../../../include/cpp2util.h(546) : Bounds safety violation
../../../include/cpp2util.h(552) : Bounds safety violation
Original file line number Diff line number Diff line change
@@ -1 +1 @@
../../../include/cpp2util.h(546) : Contract violation: fill: value must contain at least count elements
../../../include/cpp2util.h(552) : Contract violation: fill: value must contain at least count elements
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
sending error to my framework... [dynamic null dereference attempt detected]
from source location: ../../../include/cpp2util.h(1126) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = int *&]
from source location: ../../../include/cpp2util.h(1132) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = int *&]
Original file line number Diff line number Diff line change
@@ -1 +1 @@
../../../include/cpp2util.h(1126) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::expected<int, bool>]: Null safety violation: std::expected has an unexpected value
../../../include/cpp2util.h(1132) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::expected<int, bool>]: Null safety violation: std::expected has an unexpected value
Original file line number Diff line number Diff line change
@@ -1 +1 @@
../../../include/cpp2util.h(1126) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::optional<int>]: Null safety violation: std::optional does not contain a value
../../../include/cpp2util.h(1132) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::optional<int>]: Null safety violation: std::optional does not contain a value
Original file line number Diff line number Diff line change
@@ -1 +1 @@
../../../include/cpp2util.h(1126) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::shared_ptr<int>]: Null safety violation: std::shared_ptr is empty
../../../include/cpp2util.h(1132) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::shared_ptr<int>]: Null safety violation: std::shared_ptr is empty
Original file line number Diff line number Diff line change
@@ -1 +1 @@
../../../include/cpp2util.h(1126) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::unique_ptr<int>]: Null safety violation: std::unique_ptr is empty
../../../include/cpp2util.h(1132) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::unique_ptr<int>]: Null safety violation: std::unique_ptr is empty
Original file line number Diff line number Diff line change
@@ -1 +1 @@
../../../include/cpp2util.h(1235) decltype(auto) cpp2::impl::assert_in_bounds(auto &&, std::source_location) [arg = 5, x:auto = std::vector<int>]: Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4]
../../../include/cpp2util.h(1241) decltype(auto) cpp2::impl::assert_in_bounds(auto &&, std::source_location) [arg = 5, x:auto = std::vector<int>]: Bounds safety violation: out of bounds access attempt detected - attempted access at index 5, [min,max] range is [0,4]
Original file line number Diff line number Diff line change
@@ -1 +1 @@
../../../include/cpp2util.h(546) : Bounds safety violation
../../../include/cpp2util.h(552) : Bounds safety violation
Original file line number Diff line number Diff line change
@@ -1 +1 @@
../../../include/cpp2util.h(546) : Contract violation: fill: value must contain at least count elements
../../../include/cpp2util.h(552) : Contract violation: fill: value must contain at least count elements
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
sending error to my framework... [dynamic null dereference attempt detected]
from source location: ../../../include/cpp2util.h(1126) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = int *&]
from source location: ../../../include/cpp2util.h(1132) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = int *&]
Original file line number Diff line number Diff line change
@@ -1 +1 @@
../../../include/cpp2util.h(1126) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::optional<int>]: Null safety violation: std::optional does not contain a value
../../../include/cpp2util.h(1132) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::optional<int>]: Null safety violation: std::optional does not contain a value
Original file line number Diff line number Diff line change
@@ -1 +1 @@
../../../include/cpp2util.h(1126) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::shared_ptr<int>]: Null safety violation: std::shared_ptr is empty
../../../include/cpp2util.h(1132) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::shared_ptr<int>]: Null safety violation: std::shared_ptr is empty
Original file line number Diff line number Diff line change
@@ -1 +1 @@
../../../include/cpp2util.h(1126) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::unique_ptr<int>]: Null safety violation: std::unique_ptr is empty
../../../include/cpp2util.h(1132) decltype(auto) cpp2::impl::assert_not_null(auto &&, std::source_location) [arg:auto = std::unique_ptr<int>]: Null safety violation: std::unique_ptr is empty
Loading