Compare commits

...

7 Commits

Author SHA1 Message Date
Alexey Rybalchenko
d322d97d4a f 2025-08-26 11:59:20 +02:00
Alexey Rybalchenko
4176376b21 f 2025-08-26 11:56:49 +02:00
Alexey Rybalchenko
75b1208af0 f 2025-08-26 11:12:28 +02:00
Alexey Rybalchenko
e18140e110 f 2025-08-26 11:11:30 +02:00
Alexey Rybalchenko
6f9b72a27f Add test workflow 2025-08-26 11:02:11 +02:00
Dennis Klein
dcea48fcee fix: parse errors
```
/test/memory_resources/_memory_resources.cxx: In member function ‘virtual void {anonymous}::MemoryResources_allocator_Test::TestBody()’:
/test/memory_resources/_memory_resources.cxx:104:12: error: parse error in template argument list
  104 |     config.SetProperty<string>("session", to_string(session));
      |            ^~~~~~~~~~~~~~~~~~~
/test/memory_resources/_memory_resources.cxx:104:31: error: no matching function for call to ‘fair::mq::ProgOptions::SetProperty<<expression error> >(const char [8], std::string)’
  104 |     config.SetProperty<string>("session", to_string(session));
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /home/dklein/projects/FairMQ2/test/memory_resources/_memory_resources.cxx:11:
/fairmq/ProgOptions.h:269:6: note: candidate: ‘template<class T> void fair::mq::ProgOptions::SetProperty(const std::string&, T)’
  269 | void fair::mq::ProgOptions::SetProperty(const std::string& key, T val)
      |      ^~~~
/fairmq/ProgOptions.h:269:6: note:   template argument deduction/substitution failed:
/test/memory_resources/_memory_resources.cxx:104:31: error: template argument 1 is invalid
  104 |     config.SetProperty<string>("session", to_string(session));
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/test/memory_resources/_memory_resources.cxx: In member function ‘virtual void {anonymous}::MemoryResources_getMessage_Test::TestBody()’:
/test/memory_resources/_memory_resources.cxx:132:12: error: parse error in template argument list
  132 |     config.SetProperty<string>("session", to_string(session));
      |            ^~~~~~~~~~~~~~~~~~~
/test/memory_resources/_memory_resources.cxx:132:31: error: no matching function for call to ‘fair::mq::ProgOptions::SetProperty<<expression error> >(const char [8], std::string)’
  132 |     config.SetProperty<string>("session", to_string(session));
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/fairmq/ProgOptions.h:269:6: note: candidate: ‘template<class T> void fair::mq::ProgOptions::SetProperty(const std::string&, T)’
  269 | void fair::mq::ProgOptions::SetProperty(const std::string& key, T val)
      |      ^~~~
/fairmq/ProgOptions.h:269:6: note:   template argument deduction/substitution failed:
/test/memory_resources/_memory_resources.cxx:132:31: error: template argument 1 is invalid
  132 |     config.SetProperty<string>("session", to_string(session));
      |     ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```
2025-06-13 08:17:53 +02:00
Giulio Eulisse
67dcf77a7f De-boostify: use std::pmr from C++17 2025-06-13 08:02:06 +02:00
3 changed files with 75 additions and 4 deletions

70
.github/workflows/test-macos-runner.yml vendored Normal file
View File

@@ -0,0 +1,70 @@
name: Test macOS Self-Hosted Runner
on:
workflow_dispatch:
push:
branches: [ dev, master ]
pull_request:
branches: [ dev, master ]
jobs:
test-runner:
runs-on: [self-hosted, macOS-15]
timeout-minutes: 120
steps:
- name: Setup environment
run: |
echo "Setting up PATH for Homebrew..."
export PATH="/opt/homebrew/bin:/usr/local/bin:$PATH"
echo "PATH=$PATH" >> $GITHUB_ENV
- name: Checkout code
uses: actions/checkout@v4
- name: System information
run: |
echo "Runner information:"
uname -a
sw_vers
echo "CPU info:"
sysctl -n machdep.cpu.brand_string
echo "Memory info:"
system_profiler SPHardwareDataType | grep "Memory:"
echo "Disk space:"
df -h
- name: Check development tools
run: |
echo "Xcode tools version:"
xcode-select -p
clang --version
echo "CMake version:"
cmake --version || echo "CMake not installed"
echo "Git version:"
git --version
echo "Available SDKs:"
xcodebuild -showsdks || echo "Xcode not fully installed"
- name: Test basic compilation
run: |
echo "Testing basic C++ compilation:"
cat > test.cpp << 'EOF'
#include <iostream>
int main() {
std::cout << "Hello from macOS 15 UTM runner!" << std::endl;
return 0;
}
EOF
clang++ -o test_cpp test.cpp
./test_cpp
- name: Check FairMQ dependencies
run: |
echo "Checking potential FairMQ build dependencies:"
brew --version || echo "Homebrew not installed"
pkg-config --version || echo "pkg-config not available"
echo "Looking for common HEP libraries..."
find /usr/local /opt -name "*root*" -type d 2>/dev/null | head -5 || echo "No ROOT installation found"

View File

@@ -17,7 +17,7 @@
#include <boost/container/container_fwd.hpp>
#include <boost/container/flat_map.hpp>
#include <boost/container/pmr/memory_resource.hpp>
#include <memory_resource>
#include <cstring>
#include <fairmq/Message.h>
#include <stdexcept>
@@ -27,7 +27,7 @@ namespace fair::mq {
class TransportFactory;
using byte = unsigned char;
namespace pmr = boost::container::pmr;
namespace pmr = std::pmr;
/// All FairMQ related memory resources need to inherit from this interface
/// class for the

View File

@@ -16,6 +16,7 @@
#include <gtest/gtest.h>
#include <cstring>
#include <string>
#include <vector>
namespace
@@ -101,7 +102,7 @@ TEST(MemoryResources, allocator)
size_t session{tools::UuidHash()};
ProgOptions config;
config.SetProperty<string>("session", to_string(session));
config.SetProperty<std::string>("session", to_string(session));
FactoryType factoryZMQ = TransportFactory::CreateTransportFactory("zeromq", fair::mq::tools::Uuid(), &config);
@@ -129,7 +130,7 @@ TEST(MemoryResources, getMessage)
size_t session{tools::UuidHash()};
ProgOptions config;
config.SetProperty<string>("session", to_string(session));
config.SetProperty<std::string>("session", to_string(session));
config.SetProperty<bool>("shm-monitor", true);
FactoryType factoryZMQ = TransportFactory::CreateTransportFactory("zeromq", fair::mq::tools::Uuid(), &config);