Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
43bff70
fixes #83 - code updates to support clang compilation / cleaned up so…
robambalu Mar 3, 2024
1cf02a7
fixes #83 - merged main
robambalu Mar 15, 2024
2ecd364
fixes #132 - last checkpoint, code should be good, build needs some work
robambalu Mar 18, 2024
7170f72
fixes #132 - final touches, all tests pass. Note this had to comment…
robambalu Mar 18, 2024
3137e13
fixes #132 - attempt to kick off macos build
robambalu Mar 18, 2024
1217e14
unset CC in mac cibuildwheel setup
ngoldbaum Mar 19, 2024
795dce7
Add support for mac conda builds
ngoldbaum Mar 19, 2024
6bdee37
Update docs for mac builds
ngoldbaum Mar 19, 2024
c2d9f38
attempt to fix macos-12 conda build
ngoldbaum Mar 19, 2024
07ce7cb
one more try for intel mac support
ngoldbaum Mar 19, 2024
69e05fd
reduce length of timeout for test_threaded_run
ngoldbaum Mar 19, 2024
7bd2aca
make this test more meaningful now that it has a shorter timeout
ngoldbaum Mar 19, 2024
9d0c75b
CMakeLists.txt - attempt tp align RPATH on linux, drop ../lib
robambalu Mar 21, 2024
cbf58e3
fixes #132 - merge main / fix conflicts
robambalu Mar 25, 2024
4211e06
#132 temporarily add some debug logging to threaded engine to try to …
robambalu Mar 25, 2024
c755181
#132 fix lint for test logging
robambalu Mar 26, 2024
e0aa7ed
#132 enable stdout logging for tests, revert test_engine back to old …
robambalu Mar 26, 2024
92320ea
#132 - next atempt
robambalu Mar 26, 2024
f33e8cc
#132 - next attempt
robambalu Mar 26, 2024
d87deda
#132 - next attempt
robambalu Mar 26, 2024
1014537
fixes #132 - Fix race condition exposed in macos build where push eve…
robambalu Mar 27, 2024
6f8b9fa
fixes #132 - undo intrusive LFQueue changes ( for now ), simplify the…
robambalu Mar 27, 2024
232f71f
fixes #132 - fix comment typo
robambalu Mar 27, 2024
baae54b
clean up ci/cd code and ensure mac tests run
timkpaine Mar 27, 2024
26b3ab1
Merge pull request #168 from Point72/tkp/clang_support_plus_tests
timkpaine Mar 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 33 additions & 35 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -233,12 +233,15 @@ jobs:
# avoid unnecessary use of mac resources
- is-full-run: false
os: macos-12

- is-full-run: false
os: macos-14
python-version: "3.8"

- is-full-run: false
os: macos-14
python-version: "3.9"

- is-full-run: false
os: macos-14
python-version: "3.10"
Expand Down Expand Up @@ -284,7 +287,7 @@ jobs:
run: make dist-py-cibw
env:
CIBW_BUILD: "${{ matrix.cibuildwheel }}-macos*"
CIBW_ENVIRONMENT_MACOS: CC="/usr/local/bin/gcc-13" CXX="/usr/local/bin/g++-13" CCACHE_DIR="/Users/runner/work/csp/csp/.ccache" VCPKG_DEFAULT_BINARY_CACHE="${{ env.VCPKG_DEFAULT_BINARY_CACHE }}" VCPKG_DOWNLOADS="${{ env.VCPKG_DOWNLOADS }}"
CIBW_ENVIRONMENT_MACOS: CCACHE_DIR="/Users/runner/work/csp/csp/.ccache" VCPKG_DEFAULT_BINARY_CACHE="${{ env.VCPKG_DEFAULT_BINARY_CACHE }}" VCPKG_DOWNLOADS="${{ env.VCPKG_DOWNLOADS }}"
CIBW_ARCHS_MACOS: x86_64
CIBW_BUILD_VERBOSITY: 3
if: ${{ matrix.os == 'macos-12' }}
Expand All @@ -293,7 +296,7 @@ jobs:
run: make dist-py-cibw
env:
CIBW_BUILD: "${{ matrix.cibuildwheel }}-macos*"
CIBW_ENVIRONMENT_MACOS: PATH="/opt/homebrew/opt/bison/bin/:$PATH" CC="/opt/homebrew/bin/gcc-13" CXX="/opt/homebrew/bin/g++-13" LDFLAGS="-Wl,-ld_classic" CCACHE_DIR="/Users/runner/work/csp/csp/.ccache" VCPKG_DEFAULT_BINARY_CACHE="${{ env.VCPKG_DEFAULT_BINARY_CACHE }}" VCPKG_DOWNLOADS="${{ env.VCPKG_DOWNLOADS }}"
CIBW_ENVIRONMENT_MACOS: CCACHE_DIR="/Users/runner/work/csp/csp/.ccache" VCPKG_DEFAULT_BINARY_CACHE="${{ env.VCPKG_DEFAULT_BINARY_CACHE }}" VCPKG_DOWNLOADS="${{ env.VCPKG_DOWNLOADS }}"
CIBW_ARCHS_MACOS: arm64
CIBW_BUILD_VERBOSITY: 3
if: ${{ matrix.os == 'macos-14' }}
Expand All @@ -308,11 +311,11 @@ jobs:
CIBW_ENVIRONMENT_WINDOWS: TODO="todo"
if: ${{ matrix.os == 'windows-2022' }}

# Check dist files
##########
# Common
- name: Check Wheels
run: make dist-check

# Upload artifacts
- name: Upload Wheel
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -358,15 +361,12 @@ jobs:
- name: Install python dependencies
run: make requirements

# Build SDist
- name: Python SDist Steps
run: make dist-py-sdist

# Check dist files
- name: Check sdist
run: make dist-check

# Upload artifacts
- name: Upload SDist
uses: actions/upload-artifact@v4
with:
Expand Down Expand Up @@ -414,28 +414,26 @@ jobs:
- os: macos-14
python-version: "3.9"

# Exclude windows builds
# windows is slow, so dont build unless its a full run
# - is-full-run: false
# os: windows-2022

# Exclude macOS builds for now
- os: macos-12
# is-full-run: false # FIXME https://github.com/Point72/csp/issues/33

- os: macos-14
# is-full-run: false # FIXME https://github.com/Point72/csp/issues/33
# avoid unnecessary use of mac resources
- is-full-run: false
os: macos-12

# Exclude Python 3.8, 3.10, 3.11 builds
- is-full-run: false
python-version: 3.8
os: macos-14
python-version: "3.8"

- is-full-run: false
python-version: 3.9
os: macos-14
python-version: "3.9"

- is-full-run: false
os: macos-14
python-version: "3.10"


runs-on: ${{ matrix.os }}

steps:
Expand All @@ -452,26 +450,29 @@ jobs:
- name: Install python dependencies
run: make requirements

- name: Download wheel
uses: actions/download-artifact@v4
with:
name: csp-dist-${{ runner.os }}-${{ runner.arch }}-${{ matrix.python-version }}

########
# Linux
- name: Install test dependencies (Linux)
shell: bash
run: sudo apt-get install graphviz
if: ${{ runner.os == 'Linux' }}

- name: Install wheel (Linux)
run: python -m pip install -U *manylinux2014*.whl --target .
if: ${{ runner.os == 'Linux' }}

########
# Macos
- name: Install test dependencies (Mac)
shell: bash
run: brew install graphviz
if: ${{ runner.os == 'macOS' }}

# Download artifact
- name: Download wheel
uses: actions/download-artifact@v4
with:
name: csp-dist-${{ runner.os }}-${{ runner.arch }}-${{ matrix.python-version }}

- name: Install wheel (Linux)
run: python -m pip install -U *manylinux2014*.whl --target .
if: ${{ runner.os == 'Linux' }}

- name: Install wheel (OSX x86)
run: python -m pip install -U *x86*.whl --target .
if: ${{ runner.os == 'macOS' && runner.arch == 'X64' }}
Expand All @@ -480,11 +481,14 @@ jobs:
run: python -m pip install -U *arm64*.whl --target .
if: ${{ runner.os == 'macOS' && runner.arch == 'ARM64' }}

########
# Windows
- name: Install wheel (windows)
run: python -m pip install -U (Get-ChildItem .\*.whl | Select-Object -Expand FullName) --target .
if: ${{ runner.os == 'Windows' }}

# Run tests
##########
# Common
- name: Python Test Steps
run: make test

Expand Down Expand Up @@ -532,25 +536,21 @@ jobs:
with:
cibuildwheel: 'cp39'

# Python
- name: Install python dependencies
run: make requirements

# Download sdist
- uses: actions/download-artifact@v4
with:
name: csp-sdist
path: dist/

# Install sdist
- name: Install sdist
run: python -m pip install -U -vvv dist/csp*.tar.gz --target .
env:
CCACHE_DIR: /home/runner/work/csp/csp/.ccache
VCPKG_DEFAULT_BINARY_CACHE: /home/runner/vcpkg_cache
VCPKG_DOWNLOADS: /home/runner/vcpkg_download_cache

# Test sdist
- name: Run tests against from-scratch sdist build
run: make test
env:
Expand Down Expand Up @@ -606,7 +606,6 @@ jobs:
shell: bash
run: sudo apt-get install graphviz

# Download artifact
- name: Download wheel
uses: actions/download-artifact@v4
with:
Expand All @@ -618,7 +617,6 @@ jobs:
- name: Install package - ${{ matrix.package }}
run: python -m pip install -U "${{ matrix.package }}"

# Run tests
- name: Python Test Steps
run: make test TEST_ARGS="-k TestDBReader"
if: ${{ contains( 'sqlalchemy', matrix.package )}}
Expand Down
18 changes: 13 additions & 5 deletions .github/workflows/conda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,21 @@ permissions:

jobs:
build:
runs-on: ubuntu-22.04
strategy:
matrix:
os:
- ubuntu-22.04
- macos-14
- macos-12
runs-on: ${{ matrix.os }}
steps:
- name: Checkout
uses: actions/checkout@v4

- uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: '1.5.7-0'
environment-file: conda/dev-environment-linux.yml
environment-file: conda/dev-environment-unix.yml
init-shell: >-
bash
cache-environment: true
Expand All @@ -48,14 +54,16 @@ jobs:
with:
cibuildwheel: 'cp311'

- name: Python Lint Steps (Linux)
- name: Python Lint Steps
run: make lint
shell: micromamba-shell {0}

- name: Python Build Steps (Linux)
- name: Python Build Steps
run: make build-conda
shell: micromamba-shell {0}

- name: Python Test Steps (Linux)
- name: Python Test Steps
run: make test
shell: micromamba-shell {0}


15 changes: 8 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -144,19 +144,16 @@ endif()
# RPath #
#########
if(MACOS)
set(CMAKE_INSTALL_RPATH "@loader_path/:@loader_path/../lib")
set(CMAKE_INSTALL_RPATH "@loader_path/")
elseif(LINUX)
set(CMAKE_INSTALL_RPATH "\$ORIGIN:\$ORIGIN/../lib")
set(CMAKE_INSTALL_RPATH "\$ORIGIN")
endif()

###################################################################################################################################################
# Flags #
#########
# Compiler version flags
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")
endif()

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++17")

# Optimization Flags
if(WIN32)
Expand Down Expand Up @@ -204,9 +201,13 @@ else()
-Wall \
-Wno-deprecated-declarations \
-Wno-deprecated \
-Wno-maybe-uninitialized \
")
add_definitions(-DNDEBUG)
if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU")
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} \
-Wno-maybe-uninitialized \
")
endif()
endif()
endif()

Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ clean: ## clean the repository
.PHONY: dependencies-mac dependencies-debian dependencies-fedora dependencies-vcpkg dependencies-win

dependencies-mac: ## install dependencies for mac
HOMEBREW_NO_AUTO_UPDATE=1 brew install bison cmake flex make ninja # gcc@13
HOMEBREW_NO_AUTO_UPDATE=1 brew install bison cmake flex make ninja
brew unlink bison flex && brew link --force bison flex

dependencies-debian: ## install dependencies for linux
Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion cpp/csp/adapters/parquet/ArrowSingleColumnArrayBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ class PrimitiveTypedArrayBuilder : public BaseTypedArrayBuilder<ValueType, Arrow
protected:
void pushValueToArray()
{
this -> m_builderPtr -> Append( *this -> m_value );
[[maybe_unused]] auto status = this -> m_builderPtr -> Append( *this -> m_value );
}
};

Expand Down
2 changes: 2 additions & 0 deletions cpp/csp/adapters/parquet/ParquetOutputAdapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ class ParquetOutputHandler
{
}

virtual ~ParquetOutputHandler() {}

uint32_t getChunkSize() const;

virtual uint32_t getNumColumns() = 0;
Expand Down
2 changes: 1 addition & 1 deletion cpp/csp/adapters/parquet/ParquetReader.h
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,7 @@ class SingleTableParquetReader : public ParquetReader
const std::optional<utils::Symbol> &symbol, const DialectGenericListReaderInterface::Ptr &listReaderInterface ) override
{
ParquetReader::addListSubscriber( column, inputAdapter, symbol, listReaderInterface);
m_columnSubscriptionContainer.m_listColumnSubscriptions[column].push_back(ListColumnSubscriberInfo{inputAdapter, symbol, listReaderInterface});
m_columnSubscriptionContainer.m_listColumnSubscriptions[column].push_back(ListColumnSubscriberInfo{{inputAdapter, symbol}, listReaderInterface});
}

protected:
Expand Down
5 changes: 2 additions & 3 deletions cpp/csp/adapters/parquet/ParquetReaderColumnAdapter.h
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class MissingColumnAdapter : public ParquetColumnAdapter

bool isMissingColumn() const override{ return true; }

virtual CspTypePtr getNativeCspType() const
virtual CspTypePtr getNativeCspType() const override
{
CSP_THROW( csp::RuntimeException, "Trying to get native type of a missing column " << getColumnName() );
}
Expand Down Expand Up @@ -190,8 +190,7 @@ template< typename ValueType, typename ArrowArrayType >
class NativeTypeColumnAdapter : public BaseTypedColumnAdapter<ValueType, ArrowArrayType>
{
public:
using BASE = BaseTypedColumnAdapter<ValueType, ArrowArrayType>;
using BASE::BaseTypedColumnAdapter;
using BaseTypedColumnAdapter<ValueType, ArrowArrayType>::BaseTypedColumnAdapter;
virtual CspTypePtr getNativeCspType() const override {return CspType::fromCType<ValueType>::type();}

protected:
Expand Down
2 changes: 1 addition & 1 deletion cpp/csp/adapters/utils/JSONMessageWriter.h
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ class JSONMessageWriter : public MessageWriter
}

private:
void processTickImpl( const OutputDataMapper & dataMapper, const TimeSeriesProvider * sourcets )
void processTickImpl( const OutputDataMapper & dataMapper, const TimeSeriesProvider * sourcets ) override
{
dataMapper.apply( *this, sourcets );
}
Expand Down
2 changes: 2 additions & 0 deletions cpp/csp/adapters/utils/MessageStructConverter.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ class MessageStructConverter
{
public:
MessageStructConverter( const CspTypePtr & type, const Dictionary & properties );
virtual ~MessageStructConverter() {}

virtual csp::StructPtr asStruct( void * bytes, size_t size ) = 0;

virtual MsgProtocol protocol() const = 0;
Expand Down
8 changes: 4 additions & 4 deletions cpp/csp/core/QueueWaiter.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ class QueueWaiter
std::unique_lock<std::mutex> lock( m_lock );
bool rv = false;
if( !m_eventsPending && maxWaitTime.asNanoseconds() > 0 )
{
rv = ( m_condition.wait_for( lock, std::chrono::nanoseconds( maxWaitTime.asNanoseconds() ) ) == std::cv_status::no_timeout );
}
m_eventsPending = false;
rv = m_condition.wait_for( lock, std::chrono::nanoseconds( maxWaitTime.asNanoseconds() ), [this]() { return m_eventsPending; } );

if( rv )
m_eventsPending = false;
return rv;
}

Expand Down
2 changes: 1 addition & 1 deletion cpp/csp/cppnodes/statsimpl.h
Original file line number Diff line number Diff line change
Expand Up @@ -1163,7 +1163,7 @@ class Quantile
int ft = floor( target );
int ct = ceil( target );

double qtl;
double qtl = 0.0;
#ifndef __clang__
switch ( m_interpolation )
{
Expand Down
2 changes: 1 addition & 1 deletion cpp/csp/engine/ConstInputAdapter.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#ifndef _IN_CSP_ENGINE_ALARMINPUTADAPTER_H
#ifndef _IN_CSP_ENGINE_CONSTINPUTADAPTER_H
#define _IN_CSP_ENGINE_CONSTINPUTADAPTER_H

#include <csp/engine/InputAdapter.h>
Expand Down
Loading