Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
5e4a2a2
Add simple python build action
felixdollack May 15, 2026
91395c9
Add libs folder to include dirs for access to header files
felixdollack May 15, 2026
0105c78
Add missing includes cassert and cstring
felixdollack May 15, 2026
f4cbb21
Make matplotlib import optional (fastlib/fCWT#70)
felixdollack May 15, 2026
efbf036
Add missing plot argument (fastlib/fCWT#80)
felixdollack May 15, 2026
f476b81
Fix unix compile arguments
felixdollack May 15, 2026
0429bb8
Remove unused imports
felixdollack May 15, 2026
9991d49
Fix expected argument from int to string
felixdollack May 15, 2026
5b8db1d
Add omp, copy libraries and format
felixdollack May 15, 2026
6de9d29
Fix unix rpaths, directories and links
felixdollack May 15, 2026
e1eced2
Add diagnostics and second lib copy path
felixdollack May 15, 2026
b3993ba
Remove linux and windows diagnostics and force macOs to not build uni…
felixdollack May 15, 2026
ce5e1e0
Check archflag and file to see if we are still making universl2 binaries
felixdollack May 15, 2026
29521bc
Pass omp library directly
felixdollack May 15, 2026
5300aad
Remove diagnostic output
felixdollack May 15, 2026
c9ecb1b
Add cpp library workflow
felixdollack May 15, 2026
f0bafd9
Merge "test" with build and fail if exampel binary is missing
felixdollack May 15, 2026
ed9a3ff
Copy libraries on linux to build folder if needed
felixdollack May 15, 2026
e6d9f65
Only run python workflow on certain file changes
felixdollack May 15, 2026
0cd15c2
Remove commented build steps
felixdollack May 15, 2026
f4e73a8
Enable avx compile flag only on x86 targets
felixdollack May 15, 2026
79916f9
Fix homebrew paths depending on architecture
felixdollack May 15, 2026
597c90a
Expand to build dynamic/static libraries and with benchmark functiona…
felixdollack May 15, 2026
9970974
Link to homebrews libomp
felixdollack May 15, 2026
7357396
Add python build flag
felixdollack May 15, 2026
6de58e1
Make wavelib optional
felixdollack May 15, 2026
a308eaa
Install wavelib as dependency
felixdollack May 15, 2026
ebfae46
Add missing import
felixdollack May 15, 2026
3cbaa0c
Add missing import
felixdollack May 15, 2026
117889f
Fix copying wavelib only if it exists
felixdollack May 15, 2026
167dab9
Modify benchmark to skip sleep when running in CI
felixdollack May 15, 2026
5368692
Add benchmark step
felixdollack May 15, 2026
7be9ff1
Split benchmark from CI
felixdollack May 15, 2026
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
90 changes: 90 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: Build C++ Library

on:
push:
pull_request:

jobs:
build-cpp:
name: Build C++ Library
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, windows-2025-vs2026, macos-26-intel, macos-26]
build-shared-libs: ['ON', 'OFF']
include:
- os: ubuntu-24.04
cmake-flags: "-DCMAKE_BUILD_TYPE=Release"
- os: windows-2025-vs2026
cmake-flags: "-DCMAKE_BUILD_TYPE=Release"
- os: macos-26-intel
cmake-flags: "-DCMAKE_BUILD_TYPE=Release"
- os: macos-26
cmake-flags: "-DCMAKE_BUILD_TYPE=Release"

steps:
- uses: actions/checkout@v6

- name: Install dependencies (Ubuntu)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y cmake build-essential libomp-dev

- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew install cmake libomp

- name: Install dependencies (Windows)
if: runner.os == 'Windows'
run: |
choco install cmake --installargs 'ADD_CMAKE_TO_PATH=System'
shell: powershell

- name: Create build directory
run: mkdir -p build

- name: Configure CMake (Unix)
if: runner.os != 'Windows'
run: cmake -B build ${{ matrix.cmake-flags }} -DBUILD_SHARED_LIBS=${{ matrix.build-shared-libs }} -DBUILD_BENCHMARK=OFF

- name: Configure CMake (Windows)
if: runner.os == 'Windows'
run: cmake -B build -A x64 ${{ matrix.cmake-flags }} -DBUILD_SHARED_LIBS=${{ matrix.build-shared-libs }} -DBUILD_BENCHMARK=OFF
shell: cmd

- name: Build C++ Library
run: cmake --build build --config Release

- name: Upload C++ build artifacts
uses: actions/upload-artifact@v7
with:
name: cpp-build-${{ matrix.os }}-shared-${{ matrix.build-shared-libs }}
path: build/
retention-days: 3

- name: Check example executable exists
if: runner.os != 'Windows'
run: |
if [ -f build/fCWT_example ]; then
echo "C++ example built successfully"
./build/fCWT_example
else
echo "Warning: fCWT_example not found"
exit 1
fi
shell: bash

- name: Check example executable exists (Windows)
if: runner.os == 'Windows'
run: |
if (Test-Path "build\Release\fCWT_example.exe") {
Write-Host "C++ example built successfully"
& "build\Release\fCWT_example.exe"
} else {
Write-Warning "fCWT_example.exe not found"
exit 1
}
shell: powershell
76 changes: 76 additions & 0 deletions .github/workflows/build_python_library.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Build Python Libraries

on:
push:
paths:
- 'src/**'
- 'libs/**'
- 'tests/**'
- 'setup.py'
- 'pyproject.toml'
- '.github/workflows/build_python_library.yml'
pull_request:
paths:
- 'src/**'
- 'libs/**'
- 'tests/**'
- 'setup.py'
- 'pyproject.toml'
- '.github/workflows/build_python_library.yml'

jobs:
build-python:
name: Build Python Library
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, windows-2025-vs2026, macos-26-intel, macos-26]
python-version: ['3.11', '3.14']

steps:
- uses: actions/checkout@v6

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}

- name: Install dependencies (Ubuntu)
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y build-essential libomp-dev

- name: Install dependencies (macOS)
if: runner.os == 'macOS'
run: |
brew install libomp

- name: Set macOS architecture flags
if: runner.os == 'macOS'
run: |
echo "ARCHFLAGS=-arch $(uname -m)" >> "$GITHUB_ENV"

- name: Install Python build dependencies
run: |
python -m pip install --upgrade pip setuptools wheel numpy

- name: Install package
run: pip install -e .

- name: Install test dependencies
run: pip install pytest

- name: Run tests
run: pytest tests/test_fcwt.py -v

- name: Upload Python build artifacts
uses: actions/upload-artifact@v7
if: always()
with:
name: python-build-${{ matrix.os }}-py${{ matrix.python-version }}
path: |
build/
src/
retention-days: 3
137 changes: 137 additions & 0 deletions .github/workflows/run_benchmark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
name: Benchmark C++ Library

on:
workflow_dispatch:
inputs:
samples:
description: "Number of samples"
required: true
default: "100000"
threads:
description: "Number of threads"
required: true
default: "8"
optimization:
description: "FFTW optimization mode"
required: true
default: "estimate"
type: choice
options:
- estimate
- measure
- patient
- exhaustive
install-wavelib:
description: "Build and install Wavelib before running optional comparison"
required: true
default: false
type: boolean
run-rwave:
description: "Run RWave comparison benchmark"
required: true
default: false
type: boolean
smoke:
description: "Use one run and no sleep for a quick benchmark smoke test"
required: true
default: false
type: boolean

jobs:
benchmark:
name: Benchmark C++ Library
runs-on: ubuntu-24.04

steps:
- uses: actions/checkout@v6

- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y cmake build-essential libomp-dev

- name: Build and install Wavelib
if: inputs.install-wavelib
run: |
git clone https://github.com/rafat/wavelib.git /tmp/wavelib
cmake -S /tmp/wavelib -B /tmp/wavelib/build -DCMAKE_BUILD_TYPE=Release
cmake --build /tmp/wavelib/build --config Release
sudo cmake --install /tmp/wavelib/build --prefix /usr/local

- name: Configure benchmark build
run: cmake -B build -DCMAKE_BUILD_TYPE=Release -DBUILD_BENCHMARK=ON

- name: Build benchmark
run: cmake --build build --config Release --target fCWT_benchmark

- name: Capture benchmark system specs
run: |
{
echo "Benchmark system specs"
echo "======================"
echo "Date: $(date -u +'%Y-%m-%dT%H:%M:%SZ')"
echo "Runner: $RUNNER_NAME"
echo "Runner OS: $RUNNER_OS"
echo "Runner arch: $RUNNER_ARCH"
echo
echo "OS release"
echo "----------"
cat /etc/os-release
echo
echo "Kernel"
echo "------"
uname -a
echo
echo "CPU"
echo "---"
lscpu
echo
echo "Memory"
echo "------"
free -h
echo
echo "Compiler"
echo "--------"
c++ --version
echo
echo "CMake"
echo "-----"
cmake --version
} > benchmark-spec.txt

- name: Run FFTW optimization
if: ${{ !inputs.smoke }}
run: ./build/fCWT_benchmark -fcwtoptimize "${{ inputs.samples }}" "${{ inputs.threads }}" "-${{ inputs.optimization }}"

- name: Run fCWT benchmark
run: |
if [ "${{ inputs.smoke }}" = "true" ]; then
export FCWT_BENCHMARK_RUNS=1
export FCWT_BENCHMARK_SLEEP_US=0
fi
./build/fCWT_benchmark -fcwt "${{ inputs.samples }}" "${{ inputs.threads }}" | tee benchmark-fcwt.txt

- name: Run RWave benchmark
if: inputs.run-rwave
run: |
if [ "${{ inputs.smoke }}" = "true" ]; then
export FCWT_BENCHMARK_RUNS=1
export FCWT_BENCHMARK_SLEEP_US=0
fi
./build/fCWT_benchmark -rwave "${{ inputs.samples }}" "${{ inputs.threads }}" | tee benchmark-rwave.txt

- name: Run Wavelib benchmark
if: inputs.install-wavelib
run: |
if [ "${{ inputs.smoke }}" = "true" ]; then
export FCWT_BENCHMARK_RUNS=1
export FCWT_BENCHMARK_SLEEP_US=0
fi
./build/fCWT_benchmark -wavelib "${{ inputs.samples }}" "${{ inputs.threads }}" | tee benchmark-wavelib.txt

- name: Upload benchmark output
uses: actions/upload-artifact@v7
with:
name: benchmark-results
path: benchmark-*.txt
retention-days: 3
Loading