Compare commits

...

2 Commits

Author SHA1 Message Date
Mayukha Vadari
778da954b4 refactor: clean up uses of std::source_location (#6272)
Since the minimum Clang version we support is 16, the checks for version < 15 are no longer necessary. This change therefore removes the macros checking if the clang version is < 15 and simplifies uses of `std::source_location`.
2026-01-23 14:09:00 -05:00
Bart
0586b5678e ci: Pass missing sanitizers input to actions (#6266)
The `upload-conan-deps` workflow that's triggered on push is supposed to upload the Conan dependencies to our remote, so future PR commits can pull those dependencies from the remote. However, as the `sanitize` argument is missing, it was building different dependencies than what the PRs are building for the asan/tsan/ubsan job, so the latter would not find anything in the remote that they could use. This change sets the missing `sanitizers` input variable when running the `build-deps` action. 

Separately, the `setup-conan` action showed the default profile, while we are using the `ci` profile. To ensure the profile is correctly printed when sanitizers are enabled, the environment variable the profile uses is set before calling the action.
2026-01-23 06:40:55 -05:00
5 changed files with 13 additions and 21 deletions

View File

@@ -31,7 +31,7 @@ runs:
conan config install conan/profiles/ -tf $(conan config home)/profiles/
echo 'Conan profile:'
conan profile show
conan profile show --profile ci
- name: Set up Conan remote
shell: bash

View File

@@ -125,6 +125,8 @@ jobs:
subtract: ${{ inputs.nproc_subtract }}
- name: Setup Conan
env:
SANITIZERS: ${{ inputs.sanitizers }}
uses: ./.github/actions/setup-conan
- name: Build dependencies

View File

@@ -84,6 +84,8 @@ jobs:
subtract: ${{ env.NPROC_SUBTRACT }}
- name: Setup Conan
env:
SANITIZERS: ${{ matrix.sanitizers }}
uses: ./.github/actions/setup-conan
with:
remote_name: ${{ env.CONAN_REMOTE_NAME }}
@@ -98,6 +100,7 @@ jobs:
# Set the verbosity to "quiet" for Windows to avoid an excessive
# amount of logs. For other OSes, the "verbose" logs are more useful.
log_verbosity: ${{ runner.os == 'Windows' && 'quiet' || 'verbose' }}
sanitizers: ${{ matrix.sanitizers }}
- name: Log into Conan remote
if: ${{ github.repository_owner == 'XRPLF' && (github.event_name == 'push' || github.event_name == 'workflow_dispatch') }}

View File

@@ -15,15 +15,8 @@
#include <xrpl/protocol/Units.h>
#include <xrpl/protocol/jss.h>
#include <vector>
#if (defined(__clang_major__) && __clang_major__ < 15)
#include <experimental/source_location>
using source_location = std::experimental::source_location;
#else
#include <source_location>
using std::source_location;
#endif
#include <vector>
namespace xrpl {
namespace test {
@@ -640,7 +633,7 @@ checkMetrics(
std::size_t expectedPerLedger,
std::uint64_t expectedMinFeeLevel = baseFeeLevel.fee(),
std::uint64_t expectedMedFeeLevel = minEscalationFeeLevel.fee(),
source_location const location = source_location::current())
std::source_location const location = std::source_location::current())
{
int line = location.line();
char const* file = location.file_name();

View File

@@ -14,13 +14,7 @@
#include <xrpl/protocol/STXChainBridge.h>
#include <xrpl/protocol/jss.h>
#if (defined(__clang_major__) && __clang_major__ < 15)
#include <experimental/source_location>
using source_location = std::experimental::source_location;
#else
#include <source_location>
using std::source_location;
#endif
namespace xrpl {
namespace test {
@@ -114,7 +108,7 @@ class LedgerEntry_test : public beast::unit_test::suite
Json::Value const& jv,
std::string const& err,
std::string const& msg,
source_location const location = source_location::current())
std::source_location const location = std::source_location::current())
{
if (BEAST_EXPECT(jv.isMember(jss::status)))
BEAST_EXPECTS(
@@ -297,7 +291,7 @@ class LedgerEntry_test : public beast::unit_test::suite
FieldType const typeID,
std::string const& expectedError,
bool required = true,
source_location const location = source_location::current())
std::source_location const location = std::source_location::current())
{
forAllApiVersions([&, this](unsigned apiVersion) {
if (required)
@@ -350,7 +344,7 @@ class LedgerEntry_test : public beast::unit_test::suite
FieldType typeID,
std::string const& expectedError,
bool required = true,
source_location const location = source_location::current())
std::source_location const location = std::source_location::current())
{
forAllApiVersions([&, this](unsigned apiVersion) {
if (required)
@@ -407,7 +401,7 @@ class LedgerEntry_test : public beast::unit_test::suite
runLedgerEntryTest(
test::jtx::Env& env,
Json::StaticString const& parentField,
source_location const location = source_location::current())
std::source_location const location = std::source_location::current())
{
testMalformedField(
env,
@@ -431,7 +425,7 @@ class LedgerEntry_test : public beast::unit_test::suite
test::jtx::Env& env,
Json::StaticString const& parentField,
std::vector<Subfield> const& subfields,
source_location const location = source_location::current())
std::source_location const location = std::source_location::current())
{
testMalformedField(
env,