CI/CircleCI: Expose binaries built on Circle CI as docker images in the Circle CI artifacts

This commit is contained in:
Giacomo Pozzoni authored and Ovahlord committed 2021-03-11 10:53:51 +01:00
1 parent b9c72c3c7f
commit 3cc50b98a6
4 files changed
+96 -3

No files matched your search

+9 -2
View File
@@ -81,17 +81,24 @@ static int CreateChildProcess(T waiter, std::string const& executable,
executable.c_str(), boost::algorithm::join(argsVector, " ").c_str());
}
// prepare file with only read permission (boost process opens with read_write)
std::shared_ptr<FILE> inputFile(!input.empty() ? fopen(input.c_str(), "rb") : nullptr, [](FILE* ptr)
{
if (ptr != nullptr)
fclose(ptr);
});
// Start the child process
child c = [&]()
{
if (!input.empty())
if (inputFile)
{
// With binding stdin
return child{
exe = boost::filesystem::absolute(executable).string(),
args = argsVector,
env = environment(boost::this_process::environment()),
std_in = input,
std_in = inputFile.get(),
std_out = outStream,
std_err = errStream
};