Skip to content
Merged
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
27 changes: 2 additions & 25 deletions .github/workflows/CodeQL.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@ jobs:
catch2 \
mesa-vulkan-drivers \
libhidapi-dev \
ccache
ccache \
libfftw3-dev

- name: Load Vulkan SDK Repo (Ubuntu 22.04)
run: |
Expand All @@ -68,30 +69,6 @@ jobs:
sudo apt update
sudo apt install vulkan-sdk

- name: Cache FFTS
uses: actions/cache@v4
with:
path: ~/ffts
key: ${{ runner.os }}-ubuntu-22.04-ffts

- name: Clone and Build FFTS Library
run: |
if [[ ! -d ~/ffts ]]; then
cd
git clone https://github.com/anthonix/ffts.git
cd ffts
mkdir build
cd build
cmake \
-DENABLE_SHARED=ON \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-GNinja \
..
ninja
fi
cd ~/ffts/build
sudo ninja install

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
Expand Down
30 changes: 2 additions & 28 deletions .github/workflows/build-arch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ jobs:
ccache \
ninja \
vulkan-swrast \
lsb-release
lsb-release \
fftw

- name: Install Docs Dependencies
if: ${{ matrix.docs }}
Expand Down Expand Up @@ -110,33 +111,6 @@ jobs:
curl -LO https://sdk.lunarg.com/sdk/download/${{ env.SDK_VERSION_STANDALONE }}/linux/vulkansdk-linux-x86_64-${{ env.SDK_VERSION_STANDALONE }}.tar.xz
tar xf vulkansdk-linux-x86_64-${{ env.SDK_VERSION_STANDALONE }}.tar.xz

- name: Cache FFTS
uses: actions/cache@v4
with:
path: ~/ffts
key: ${{ runner.os }}-${{ matrix.os.container }}-ffts

- name: Clone and Build FFTS Library
run: |
[[ ${{ matrix.docs }} = 'false' ]] && export CMAKE_C_COMPILER_LAUNCHER=ccache && export CMAKE_CXX_COMPILER_LAUNCHER=ccache
if [[ ! -d ~/ffts ]]; then
export CC=/usr/bin/gcc-14
export CXX=/usr/bin/g++-14
cd
git clone https://github.com/anthonix/ffts.git
cd ffts
mkdir build
cd build
cmake \
-DENABLE_SHARED=ON \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-GNinja \
..
ninja
fi
cd ~/ffts/build
ninja install

- name: Configure
run: |
[[ (${{matrix.sdk_type }} = 'standalone') ]] && source $HOME/VulkanSDK/${{ env.SDK_VERSION_STANDALONE }}/setup-env.sh
Expand Down
28 changes: 2 additions & 26 deletions .github/workflows/build-debian.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ jobs:
glslang-tools \
spirv-tools \
glslc \
lsb-release
lsb-release \
libfftw3-dev

- name: Install Docs Dependencies
if: ${{ matrix.docs }}
Expand Down Expand Up @@ -113,31 +114,6 @@ jobs:
curl -LO https://sdk.lunarg.com/sdk/download/${{ env.SDK_VERSION_STANDALONE }}/linux/vulkansdk-linux-x86_64-${{ env.SDK_VERSION_STANDALONE }}.tar.xz
tar xf vulkansdk-linux-x86_64-${{ env.SDK_VERSION_STANDALONE }}.tar.xz

- name: Cache FFTS
uses: actions/cache@v4
with:
path: ~/ffts
key: ${{ runner.os }}-${{ matrix.os.container }}-ffts

- name: Clone and Build FFTS Library
run: |
[[ ${{ matrix.docs }} = 'false' ]] && export CMAKE_C_COMPILER_LAUNCHER=ccache && export CMAKE_CXX_COMPILER_LAUNCHER=ccache
if [[ ! -d ~/ffts ]]; then
cd
git clone https://github.com/anthonix/ffts.git
cd ffts
mkdir build
cd build
cmake \
-DENABLE_SHARED=ON \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-GNinja \
..
ninja
fi
cd ~/ffts/build
ninja install

- name: Configure
run: |
[[ (${{matrix.sdk_type }} = 'standalone') ]] && source $HOME/VulkanSDK/${{ env.SDK_VERSION_STANDALONE }}/setup-env.sh
Expand Down
28 changes: 2 additions & 26 deletions .github/workflows/build-fedora.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ jobs:
fedora-packager \
rpmdevtools \
mesa-vulkan-drivers \
lsb-release
lsb-release \
fftw3-devel

- name: Install Docs Dependencies
if: ${{ matrix.docs }}
Expand Down Expand Up @@ -111,31 +112,6 @@ jobs:
curl -LO https://sdk.lunarg.com/sdk/download/${{ env.SDK_VERSION_STANDALONE }}/linux/vulkansdk-linux-x86_64-${{ env.SDK_VERSION_STANDALONE }}.tar.xz
tar xf vulkansdk-linux-x86_64-${{ env.SDK_VERSION_STANDALONE }}.tar.xz

- name: Cache FFTS
uses: actions/cache@v4
with:
path: ~/ffts
key: ${{ runner.os }}-${{ matrix.os.container }}-ffts

- name: Clone and Build FFTS Library
run: |
[[ ${{ matrix.docs }} = 'false' ]] && export CMAKE_C_COMPILER_LAUNCHER=ccache && export CMAKE_CXX_COMPILER_LAUNCHER=ccache
if [[ ! -d ~/ffts ]]; then
cd
git clone https://github.com/anthonix/ffts.git
cd ffts
mkdir build
cd build
cmake \
-DENABLE_SHARED=ON \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-GNinja \
..
ninja
fi
cd ~/ffts/build
sudo ninja install

- name: Configure
run: |
[[ (${{matrix.sdk_type }} = 'standalone') ]] && source $HOME/VulkanSDK/${{ env.SDK_VERSION_STANDALONE }}/setup-env.sh
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/build-macos-arm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ jobs:
shaderc \
molten-vk \
ninja \
hidapi
hidapi \
fftw

- name: Configure
run: |
Expand Down
31 changes: 3 additions & 28 deletions .github/workflows/build-macos-intel.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,33 +43,8 @@ jobs:
shaderc \
molten-vk \
ninja \
hidapi

- name: Cache FFTS
uses: actions/cache@v4
with:
path: ~/ffts-prefix
key: ${{ runner.os }}-ffts-prefix


- name: Clone and Build FFTS Library
run: |
[[ -d ~/ffts-prefix ]] && exit 0
cd
git clone https://github.com/anthonix/ffts.git
cd ffts
mkdir build
cd build
cmake \
-DENABLE_SHARED=ON \
-DCMAKE_INSTALL_PREFIX=$HOME/ffts-prefix \
-DCMAKE_INSTALL_RPATH=$HOME/ffts-prefix/lib \
-DCMAKE_MACOSX_RPATH=ON \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-GNinja \
..
ninja
sudo ninja install
hidapi \
fftw

- name: Configure
run: |
Expand All @@ -83,7 +58,7 @@ jobs:
-DCMAKE_BUILD_TYPE=Release \
-DBUILD_DOCS=OFF \
-DBUILD_TESTING=ON \
-DCMAKE_PREFIX_PATH="$(brew --prefix)/opt/libomp;$HOME/ffts-prefix" \
-DCMAKE_PREFIX_PATH="$(brew --prefix)/opt/libomp" \
..

- name: Build
Expand Down
28 changes: 2 additions & 26 deletions .github/workflows/build-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,8 @@ jobs:
wget \
xzip \
libhidapi-dev \
ccache
ccache \
libfftw3-dev

- name: Install Docs Dependencies
if: ${{ matrix.docs }}
Expand Down Expand Up @@ -107,31 +108,6 @@ jobs:
curl -LO https://sdk.lunarg.com/sdk/download/${{ env.SDK_VERSION_STANDALONE }}/linux/vulkansdk-linux-x86_64-${{ env.SDK_VERSION_STANDALONE }}.tar.xz
tar xf vulkansdk-linux-x86_64-${{ env.SDK_VERSION_STANDALONE }}.tar.xz

- name: Cache FFTS
uses: actions/cache@v4
with:
path: ~/ffts
key: ${{ runner.os }}-${{ matrix.os }}-ffts

- name: Clone and Build FFTS Library
run: |
[[ ${{ matrix.docs }} = 'false' ]] && export CMAKE_C_COMPILER_LAUNCHER=ccache && export CMAKE_CXX_COMPILER_LAUNCHER=ccache
if [[ ! -d ~/ffts ]]; then
cd
git clone https://github.com/anthonix/ffts.git
cd ffts
mkdir build
cd build
cmake \
-DENABLE_SHARED=ON \
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
-GNinja \
..
ninja
fi
cd ~/ffts/build
sudo ninja install

- name: Configure
run: |
[[ (${{matrix.sdk_type }} = 'standalone') ]] && source $HOME/VulkanSDK/${{ env.SDK_VERSION_STANDALONE }}/setup-env.sh
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
shaderc:p
glslang:p
spirv-tools:p
ffts:p
fftw:p
hidapi:p
libpng:p

Expand Down
13 changes: 0 additions & 13 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -130,12 +130,6 @@ if(WIN32)
add_compile_options(-D_USE_MATH_DEFINES -D_POSIX_THREAD_SAFE_FUNCTIONS)
endif()

# Detect Apple Silicon as FFTS is not available for it
if(APPLE AND CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
add_compile_options(-D_APPLE_SILICON)
set(APPLE_SILICON TRUE)
endif()

# Package detection
find_package(PkgConfig MODULE REQUIRED)

Expand Down Expand Up @@ -282,13 +276,6 @@ add_subdirectory(devdoc)

# Unit tests
if(Git_FOUND AND BUILD_TESTING)
# find ffts, except on Apple Silicon where it's not supported
if(NOT APPLE_SILICON)
# ffts ships a broken pkgconfig file on some platforms so we are not going to use it
find_path(LIBFFTS_INCLUDE_DIRS ffts.h PATH_SUFFIXES ffts REQUIRED)
find_library(LIBFFTS_LIBRARIES NAMES ffts libffts REQUIRED)
endif()

find_package(Catch2 REQUIRED)
include(Catch)
#Catch2 v3.x.y have a breaking change:
Expand Down
2 changes: 1 addition & 1 deletion msys2/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ depends=(
"${MINGW_PACKAGE_PREFIX}-libsigc++"
"${MINGW_PACKAGE_PREFIX}-cairomm"
"${MINGW_PACKAGE_PREFIX}-yaml-cpp"
"${MINGW_PACKAGE_PREFIX}-ffts"
"${MINGW_PACKAGE_PREFIX}-fftw"
"${MINGW_PACKAGE_PREFIX}-vulkan-loader"
"${MINGW_PACKAGE_PREFIX}-glfw"
)
Expand Down
1 change: 0 additions & 1 deletion src/ngscopeclient/wix/license-paths
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
../LICENSE
../../ffts/COPYRIGHT
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure how shall I place the license here for FFTW

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean since it is test-case only, shall it be included?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We actually don't display licenses in the MSI installer (and FFTS isn't shipped in the binary) so that entire file is legacy and can probably be removed but I need to verify. Deleting that line is fine.

/mingw64/share/licenses/atk/COPYING
/mingw64/share/licenses/atkmm/COPYING
/mingw64/share/licenses/binutils/COPYING.LIB
Expand Down
19 changes: 13 additions & 6 deletions tests/Filters/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,26 +3,33 @@ add_executable(Filters

Filter_Add.cpp
Filter_ACRMS.cpp
Filter_DeEmbed.cpp
Filter_EyePattern.cpp
Filter_FIR.cpp
Filter_FFT.cpp
Filter_Subtract.cpp
Filter_Upsample.cpp

FrequencyMeasurement.cpp
)

include_directories(Filters
${LIBFFTS_INCLUDE_DIRS})

target_link_libraries(Filters
scopehal
scopeprotocols
Catch2::Catch2
${LIBFFTS_LIBRARIES}
)

pkg_search_module(FFTW fftw3f IMPORTED_TARGET)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't seen this way of including PkgConfig modules elsewhere in the codebase, is it okay this way?


if (${FFTW_FOUND})
message("Found FFTW3, enabling unit tests which depend on it")
target_link_libraries(Filters PkgConfig::FFTW)
target_sources(Filters PRIVATE
Filter_DeEmbed.cpp
Filter_FFT.cpp
)
else ()
message("Didn't find FFTW3, disabling tests which depend on it")
endif ()

#Needed because Windows does not support RPATH and will otherwise not be able to find DLLs when catch_discover_tests runs the executable
if(WIN32)
add_custom_command(TARGET Filters POST_BUILD
Expand Down
Loading
Loading