Skip to content

Commit

Permalink
CI fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
EduMenges committed Aug 27, 2024
1 parent a8ea817 commit aeebacb
Show file tree
Hide file tree
Showing 7 changed files with 34 additions and 26 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -528,6 +528,11 @@ jobs:
path: 'SuperGenius'
submodules: "recursive"

- name: Install Ninja
run: |
brew install ccache ninja
echo "CMAKE_GENERATOR=Ninja" >> $GITHUB_ENV
- name: Install bindgen
run: cargo install cbindgen

Expand Down Expand Up @@ -557,7 +562,7 @@ jobs:

- name: Thirdparty Compile
working-directory: ${{github.workspace}}/thirdparty/build/iOS/Release
run: make -j8
run: cmake --build . -j --config Release

- name: Create Build Directory
run: cmake -E make_directory ${{github.workspace}}/SuperGenius/build/iOS/Release
Expand All @@ -568,7 +573,7 @@ jobs:

- name: Compile
working-directory: ${{github.workspace}}/SuperGenius/build/iOS/Release
run: make -j8
run: cmake --build . -j --config Release

- name: Install
working-directory: ${{github.workspace}}/SuperGenius/build/iOS/Release
Expand Down
5 changes: 1 addition & 4 deletions build/iOS/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
cmake_minimum_required(VERSION 3.15)
cmake_minimum_required(VERSION 3.22)

if(POLICY CMP0025)
# NEW: report OS X version of Clang as "AppleClang"
Expand Down Expand Up @@ -49,9 +49,6 @@ set(THREADS_PREFER_PTHREAD_FLAG ON)
set(FORCE_MULTILE ON)
set(MULTIPLE_OPTION "-Xlink=-force:multiple")

# Set extra compiler flags
set(EXTRA_CXX_FLAGS -std=c++17)

# Set custom subfolder for ABI
set(ABI_SUBFOLDER_NAME "/aarch64")

Expand Down
5 changes: 3 additions & 2 deletions src/base/blob.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,9 @@ namespace sgns::base {
* @brief constructor enabling initializer list
* @param l initializer list
*/
explicit Blob(const std::array<byte_t, size_> &l) {
std::copy(l.begin(), l.end(), this->begin());
explicit constexpr Blob( const std::array<byte_t, size_> &l )
{
std::copy( l.begin(), l.end(), this->begin() );
}

/**
Expand Down
9 changes: 4 additions & 5 deletions src/primitives/common.hpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@


#ifndef SUPERGENIUS_SRC_PRIMITIVES_COMMON_HPP
#define SUPERGENIUS_SRC_PRIMITIVES_COMMON_HPP

Expand All @@ -19,10 +17,11 @@ namespace sgns::primitives {
// (BlockInfo, Prevote, Precommit, PrimaryPropose)
template <typename Tag>
struct BlockInfoT : public boost::equality_comparable<BlockInfoT<Tag>> {
BlockInfoT() = default;
constexpr BlockInfoT() = default;

BlockInfoT(const BlockNumber &n, const BlockHash &h)
: block_number(n), block_hash(h) {}
constexpr BlockInfoT( BlockNumber n, BlockHash h ) : block_number( n ), block_hash( h )
{
}

BlockNumber block_number{};
BlockHash block_hash;
Expand Down
29 changes: 17 additions & 12 deletions src/processing/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -57,18 +57,23 @@ target_include_directories(processing_service

if(APPLE)
set(XCFRAMEWORK_PATH "${_THIRDPARTY_BUILD_DIR}/moltenvk/build/lib/MoltenVK.xcframework")
target_link_libraries(processing_service PRIVATE
"-framework CoreFoundation"
"-framework CoreGraphics"
"-framework CoreServices"
"-framework IOKit"
"-framework IOSurface"
"-framework Metal"
"-framework QuartzCore"
"-framework AppKit"
# ${XCFRAMEWORK_PATH}
"-framework Foundation"
)
target_link_libraries(processing_service PRIVATE
"-framework CoreFoundation"
"-framework CoreGraphics"
"-framework CoreServices"
"-framework IOKit"
"-framework IOSurface"
"-framework Metal"
"-framework QuartzCore"

# ${XCFRAMEWORK_PATH}
"-framework Foundation"
)

if(CMAKE_SYSTEM_NAME STREQUAL "Darwin")
target_link_libraries(processing_service PRIVATE
"-framework AppKit")
endif()
endif()

target_link_libraries(processing_service PRIVATE
Expand Down
2 changes: 1 addition & 1 deletion src/verification/authority/impl/schedule_node.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace sgns::authority {
std::shared_ptr<ScheduleNode> makeDescendant(
const primitives::BlockInfo &block, bool finalized = false);

const primitives::BlockInfo block;
const primitives::BlockInfo block{};
std::weak_ptr<ScheduleNode> parent;
std::vector<std::shared_ptr<ScheduleNode>> descendants;

Expand Down
1 change: 1 addition & 0 deletions src/verification/finality/voter_set.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
#define SUPERGENIUS_SRC_VERIFICATION_FINALITY_VOTER_SET_HPP

#include <boost/optional.hpp>
#include <unordered_map>

#include "verification/finality/common.hpp"

Expand Down

0 comments on commit aeebacb

Please sign in to comment.