-
-
Notifications
You must be signed in to change notification settings - Fork 890
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into CURA-11360_test_wagyu…
…_fix__dont_merge
- Loading branch information
Showing
113 changed files
with
22,873 additions
and
62 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
name: unit-test-post | ||
|
||
on: | ||
workflow_run: | ||
workflows: [ "unit-test" ] | ||
types: [ completed ] | ||
|
||
jobs: | ||
# FIXME: Use `main` instead of `CURA-10831` once merged | ||
publish-test-results: | ||
uses: ultimaker/cura-workflows/.github/workflows/unit-test-post.yml@CURA-10831 | ||
with: | ||
event: ${{ github.event.workflow_run.event }} | ||
conclusion: ${{ github.event.workflow_run.conclusion }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
// Copyright (c) 2023 UltiMaker | ||
// CuraEngine is released under the terms of the AGPLv3 or higher | ||
|
||
#ifndef CURAENGINE_INCLUDE_UTILS_FORMAT_FILESYSTEM_PATH_H | ||
#define CURAENGINE_INCLUDE_UTILS_FORMAT_FILESYSTEM_PATH_H | ||
|
||
#include <cstdlib> | ||
#include <filesystem> | ||
|
||
#include <fmt/core.h> | ||
|
||
namespace fmt | ||
{ | ||
template<> | ||
struct formatter<std::filesystem::path> : formatter<string_view> | ||
{ | ||
static std::string USERNAME; | ||
static constexpr std::string_view OBFUSCATED_STRING = "*******"; | ||
|
||
[[nodiscard]] static std::string anonymizePath(const std::string& path) | ||
{ | ||
std::string anonymized_path = path; | ||
size_t pos = anonymized_path.find(USERNAME); | ||
while (pos != std::string::npos) | ||
{ | ||
anonymized_path.replace(pos, USERNAME.size(), OBFUSCATED_STRING); | ||
pos = anonymized_path.find(USERNAME, pos + OBFUSCATED_STRING.size()); | ||
} | ||
return anonymized_path; | ||
} | ||
|
||
template<typename FormatContext> | ||
auto format(const std::filesystem::path& path, FormatContext& ctx) | ||
{ | ||
return formatter<string_view>::format(anonymizePath(path.generic_string()), ctx); | ||
} | ||
}; | ||
|
||
#ifdef _WIN32 | ||
std::string fmt::formatter<std::filesystem::path>::USERNAME = std::getenv("USERNAME") != nullptr ? std::getenv("USERNAME") : ""; | ||
#else | ||
std::string fmt::formatter<std::filesystem::path>::USERNAME = std::getenv("USER") != nullptr ? std::getenv("USER") : ""; | ||
#endif | ||
|
||
} // namespace fmt | ||
|
||
#endif // CURAENGINE_INCLUDE_UTILS_FORMAT_FILESYSTEM_PATH_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.