Skip to content

Commit

Permalink
ci: fix build call
Browse files Browse the repository at this point in the history
Use -pr instead of -pr:a.
This will use the profile as the host profile(target machine)
instead of using this for both the (the one who) build and the host.
Which SHOULD trigger a mismatch error when the build compiler cannot support the
host compiler.
  • Loading branch information
branylagaffe committed May 2, 2024
1 parent 15e028e commit d3bfcd2
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 11 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/00-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ on:
# schedule:
# # Every Wednesday at midnight
# - cron: '0 0 * * 3'
#
#

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
Expand All @@ -24,8 +25,12 @@ jobs:
build_simulator:
runs-on: ubuntu-latest
name: Build Simulators
env:
CC: gcc-13
CXX: g++-13

strategy:
fail-fast: false
fail-fast: true
matrix:
binaries:
- keenkraken
Expand All @@ -48,5 +53,8 @@ jobs:
- name: Install conan
run: pip install conan

- name: Detect current environmment profile
run: conan profile detect --force

- name: Build
run: conan build . -pr:a target/_profile/${{ matrix.build_type }} -b missing --name=${{ matrix.binaries }} -of ./build
run: conan build . -pr target/_profile/${{ matrix.build_type }} -b missing --name=${{ matrix.binaries }} -of ./build
9 changes: 5 additions & 4 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,11 @@ include_directories(.)
set(CMAKE_CXX_FLAGS "${CMAKE_C_FLAGS} -Wall -Werror -Wno-error=maybe-uninitialized -Wno-error=dangling-pointer -fdiagnostics-color=always")
set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} -O0 -ggdb -g3 -fno-eliminate-unused-debug-symbols -fsanitize=address -fno-omit-frame-pointer -funroll-loops")

# Find boost
set(Boost_USE_DEBUG_LIBS OFF)
find_package(Boost REQUIRED COMPONENTS system iostreams regex serialization)
include_directories(${Boost_INCLUDE_DIRS})

# compile core
file(GLOB_RECURSE CORE_SOURCE ./core/*.cpp)
add_library(core STATIC ${CORE_SOURCE})
Expand All @@ -29,10 +34,6 @@ foreach(COMPONENT ${REQUIRED_COMPONENTS})
target_compile_options(${COMPONENT} PRIVATE)
endforeach()

# Find boost
set(Boost_USE_DEBUG_LIBS OFF)
find_package(Boost REQUIRED COMPONENTS system iostreams regex serialization)

# compile simulators
add_library(${SIMULATOR} SHARED ./target/${SIMULATOR}/wiring.cpp)
target_link_libraries(${SIMULATOR} "-Wl,--whole-archive" core ${REQUIRED_COMPONENTS})
Expand Down
5 changes: 2 additions & 3 deletions components/MultiNic/MultiNicXImpl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,7 @@ bool available(interface::FromNodeN const &, index_t aVC) {
void push(interface::FromNodeN const &, index_t aVC, MemoryTransport &transport) {
// Ensure src port is set correctly.
DBG_Assert(transport[NetworkMessageTag]->src_port == N);
DBG_Assert(transport[NetworkMessageTag]->vc == aVC,
(<< "wrong VC: " << *(transport[NetworkMessageTag])));
DBG_Assert(static_cast<unsigned int>(transport[NetworkMessageTag]->vc) == aVC, (<< "wrong VC: " << *(transport[NetworkMessageTag])));

sendQueue[(N * cfg.VChannels) + aVC].push_back(transport);
currSendCount++;
Expand All @@ -289,4 +288,4 @@ void push(interface::FromNodeN const &, index_t aVC, MemoryTransport &transport)
#undef N
#undef FromNodeN

#endif // BOOST_PP_IS_ITERATING
#endif // BOOST_PP_IS_ITERATING
2 changes: 1 addition & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def layout(self):
cmake_layout(self, build_folder='.', src_folder=self.recipe_folder)

def requirements(self):
self.requires("boost/1.83.0")
self.requires("boost/1.83.0", headers=True, libs=True)

def build_requirements(self):
self.tool_requires("cmake/3.25.3")
Expand Down

0 comments on commit d3bfcd2

Please sign in to comment.