Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
61 changes: 61 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
name: Build and Test

on:
pull_request:

jobs:
build:
runs-on: ubuntu-latest

permissions:
contents: read
packages: write

outputs:
image_tag: ${{ steps.meta.outputs.tag }}

steps:
- uses: actions/checkout@v4

- name: Set image tag
id: meta
run: |
REPO=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')
echo "tag=ghcr.io/${REPO}:${{ github.sha }}" >> $GITHUB_OUTPUT

- name: Log into GHCR
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | \
docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Build image
run: |
docker build -t ${{ steps.meta.outputs.tag }} .

- name: Push image
run: |
docker push ${{ steps.meta.outputs.tag }}

test:
runs-on: ubuntu-latest
needs: build

permissions:
contents: read
packages: read

steps:
- name: Log into GHCR
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | \
docker login ghcr.io -u ${{ github.actor }} --password-stdin

- name: Pull image
run: |
docker pull ${{ needs.build.outputs.image_tag }}

- name: Run tests
run: |
docker run --rm ${{ needs.build.outputs.image_tag }} \
ctest --output-on-failure

14 changes: 7 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,18 +95,18 @@ macro(add_cpp_test_labeled test_name source_file labels)
endmacro()

# --- SIMD and helper tests (label: SIMD) ---
add_cpp_test_labeled(SIMDHelperTest test/Helper/C++/simd_helper_test.cpp "SIMD;Helper;Unit")
add_cpp_test_labeled(SimpleMovingAverageSIMDTest test/TimeSeries/SimpleMovingAverage/C++/simple_moving_average_simd_test.cpp "SIMD;TimeSeries;Unit")
add_cpp_test_labeled(RSISIMDTest test/TimeSeries/RSI/C++/rsi_simd_test.cpp "SIMD;TimeSeries;Unit")
add_cpp_test_labeled(EMASIMDTest test/TimeSeries/EMA/C++/ema_simd_test.cpp "SIMD;TimeSeries;Unit")
# add_cpp_test_labeled(SIMDHelperTest test/Helper/C++/simd_helper_test.cpp "SIMD;Helper;Unit")
# add_cpp_test_labeled(SimpleMovingAverageSIMDTest test/TimeSeries/SimpleMovingAverage/C++/simple_moving_average_simd_test.cpp "SIMD;TimeSeries;Unit")
# add_cpp_test_labeled(RSISIMDTest test/TimeSeries/RSI/C++/rsi_simd_test.cpp "SIMD;TimeSeries;Unit")
# add_cpp_test_labeled(EMASIMDTest test/TimeSeries/EMA/C++/ema_simd_test.cpp "SIMD;TimeSeries;Unit")

# --- Core unit tests ---
add_cpp_test_labeled(CompoundInterestTest test/InterestAndAnnuities/compound_interest_test.cpp "InterestAndAnnuities;Unit")
add_cpp_test_labeled(BlackScholesTest test/OptionPricing/black_scholes_test.cpp "OptionPricing;Unit")
add_cpp_test_labeled(BinomialOptionPricingTest test/OptionPricing/binomial_option_pricing_test.cpp "OptionPricing;Unit")
add_cpp_test_labeled(RSITest test/TimeSeries/rsi_test.cpp "TimeSeries;Unit")
add_cpp_test_labeled(RollingStdDevTest test/TimeSeries/rolling_std_dev_test.cpp "TimeSeries;Unit")
add_cpp_test_labeled(BellmanArbitrageTest test/GraphAlgos/bellman_arbitrage_test.cpp "GraphAlgos;Unit")
# add_cpp_test_labeled(RSITest test/TimeSeries/rsi_test.cpp "TimeSeries;Unit")
# add_cpp_test_labeled(RollingStdDevTest test/TimeSeries/rolling_std_dev_test.cpp "TimeSeries;Unit")
# add_cpp_test_labeled(BellmanArbitrageTest test/GraphAlgos/bellman_arbitrage_test.cpp "GraphAlgos;Unit")

# Profiling harness: rolling volatility (scalar path only; SIMD path via Python)
add_executable(RollingVolatilityProfile_harness profiling/harness_rolling_volatility.cpp)
Expand Down
23 changes: 23 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM ubuntu:24.04

ENV DEBIAN_FRONTEND=noninteractive

RUN apt-get update && apt-get install -y \
build-essential \
cmake \
git \
python3 \
python3-pip \
python3-dev \
pybind11-dev

WORKDIR /app
COPY . .

RUN cmake -S . -B build -DCMAKE_BUILD_TYPE=Release \
&& cmake --build build -j$(nproc)

WORKDIR /app/build

CMD ["ctest", "--output-on-failure"]

84 changes: 0 additions & 84 deletions src/cpp/GraphAlgos/bellman_arbitrage.cpp

This file was deleted.