Skip to content

Commit f2e244c

Browse files
committed
WIP: Migrate to FFTW from FFTS inside unit tests
1 parent 7ce3ba3 commit f2e244c

14 files changed

Lines changed: 55 additions & 210 deletions

.github/workflows/CodeQL.yml

Lines changed: 2 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,8 @@ jobs:
5959
catch2 \
6060
mesa-vulkan-drivers \
6161
libhidapi-dev \
62-
ccache
62+
ccache \
63+
libfftw3-dev
6364
6465
- name: Load Vulkan SDK Repo (Ubuntu 22.04)
6566
run: |
@@ -68,30 +69,6 @@ jobs:
6869
sudo apt update
6970
sudo apt install vulkan-sdk
7071
71-
- name: Cache FFTS
72-
uses: actions/cache@v4
73-
with:
74-
path: ~/ffts
75-
key: ${{ runner.os }}-ubuntu-22.04-ffts
76-
77-
- name: Clone and Build FFTS Library
78-
run: |
79-
if [[ ! -d ~/ffts ]]; then
80-
cd
81-
git clone https://github.com/anthonix/ffts.git
82-
cd ffts
83-
mkdir build
84-
cd build
85-
cmake \
86-
-DENABLE_SHARED=ON \
87-
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
88-
-GNinja \
89-
..
90-
ninja
91-
fi
92-
cd ~/ffts/build
93-
sudo ninja install
94-
9572
# Initializes the CodeQL tools for scanning.
9673
- name: Initialize CodeQL
9774
uses: github/codeql-action/init@v3

.github/workflows/build-arch.yml

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ jobs:
5454
hidapi \
5555
ccache \
5656
ninja \
57-
vulkan-swrast
57+
vulkan-swrast \
58+
fftw
5859
5960
- name: Install Docs Dependencies
6061
if: ${{ matrix.docs }}
@@ -109,33 +110,6 @@ jobs:
109110
curl -LO https://sdk.lunarg.com/sdk/download/${{ env.SDK_VERSION_STANDALONE }}/linux/vulkansdk-linux-x86_64-${{ env.SDK_VERSION_STANDALONE }}.tar.xz
110111
tar xf vulkansdk-linux-x86_64-${{ env.SDK_VERSION_STANDALONE }}.tar.xz
111112
112-
- name: Cache FFTS
113-
uses: actions/cache@v4
114-
with:
115-
path: ~/ffts
116-
key: ${{ runner.os }}-${{ matrix.os.container }}-ffts
117-
118-
- name: Clone and Build FFTS Library
119-
run: |
120-
[[ ${{ matrix.docs }} = 'false' ]] && export CMAKE_C_COMPILER_LAUNCHER=ccache && export CMAKE_CXX_COMPILER_LAUNCHER=ccache
121-
if [[ ! -d ~/ffts ]]; then
122-
export CC=/usr/bin/gcc-14
123-
export CXX=/usr/bin/g++-14
124-
cd
125-
git clone https://github.com/anthonix/ffts.git
126-
cd ffts
127-
mkdir build
128-
cd build
129-
cmake \
130-
-DENABLE_SHARED=ON \
131-
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
132-
-GNinja \
133-
..
134-
ninja
135-
fi
136-
cd ~/ffts/build
137-
ninja install
138-
139113
- name: Configure
140114
run: |
141115
[[ (${{matrix.sdk_type }} = 'standalone') ]] && source $HOME/VulkanSDK/${{ env.SDK_VERSION_STANDALONE }}/setup-env.sh

.github/workflows/build-debian.yml

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@ jobs:
6666
glslang-dev \
6767
glslang-tools \
6868
spirv-tools \
69-
glslc
69+
glslc \
70+
libfftw3-dev
7071
7172
- name: Install Docs Dependencies
7273
if: ${{ matrix.docs }}
@@ -112,31 +113,6 @@ jobs:
112113
curl -LO https://sdk.lunarg.com/sdk/download/${{ env.SDK_VERSION_STANDALONE }}/linux/vulkansdk-linux-x86_64-${{ env.SDK_VERSION_STANDALONE }}.tar.xz
113114
tar xf vulkansdk-linux-x86_64-${{ env.SDK_VERSION_STANDALONE }}.tar.xz
114115
115-
- name: Cache FFTS
116-
uses: actions/cache@v4
117-
with:
118-
path: ~/ffts
119-
key: ${{ runner.os }}-${{ matrix.os.container }}-ffts
120-
121-
- name: Clone and Build FFTS Library
122-
run: |
123-
[[ ${{ matrix.docs }} = 'false' ]] && export CMAKE_C_COMPILER_LAUNCHER=ccache && export CMAKE_CXX_COMPILER_LAUNCHER=ccache
124-
if [[ ! -d ~/ffts ]]; then
125-
cd
126-
git clone https://github.com/anthonix/ffts.git
127-
cd ffts
128-
mkdir build
129-
cd build
130-
cmake \
131-
-DENABLE_SHARED=ON \
132-
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
133-
-GNinja \
134-
..
135-
ninja
136-
fi
137-
cd ~/ffts/build
138-
ninja install
139-
140116
- name: Configure
141117
run: |
142118
[[ (${{matrix.sdk_type }} = 'standalone') ]] && source $HOME/VulkanSDK/${{ env.SDK_VERSION_STANDALONE }}/setup-env.sh

.github/workflows/build-fedora.yml

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,8 @@ jobs:
5353
ninja-build \
5454
fedora-packager \
5555
rpmdevtools \
56-
mesa-vulkan-drivers
56+
mesa-vulkan-drivers \
57+
fftw3-devel
5758
5859
- name: Install Docs Dependencies
5960
if: ${{ matrix.docs }}
@@ -110,31 +111,6 @@ jobs:
110111
curl -LO https://sdk.lunarg.com/sdk/download/${{ env.SDK_VERSION_STANDALONE }}/linux/vulkansdk-linux-x86_64-${{ env.SDK_VERSION_STANDALONE }}.tar.xz
111112
tar xf vulkansdk-linux-x86_64-${{ env.SDK_VERSION_STANDALONE }}.tar.xz
112113
113-
- name: Cache FFTS
114-
uses: actions/cache@v4
115-
with:
116-
path: ~/ffts
117-
key: ${{ runner.os }}-${{ matrix.os.container }}-ffts
118-
119-
- name: Clone and Build FFTS Library
120-
run: |
121-
[[ ${{ matrix.docs }} = 'false' ]] && export CMAKE_C_COMPILER_LAUNCHER=ccache && export CMAKE_CXX_COMPILER_LAUNCHER=ccache
122-
if [[ ! -d ~/ffts ]]; then
123-
cd
124-
git clone https://github.com/anthonix/ffts.git
125-
cd ffts
126-
mkdir build
127-
cd build
128-
cmake \
129-
-DENABLE_SHARED=ON \
130-
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
131-
-GNinja \
132-
..
133-
ninja
134-
fi
135-
cd ~/ffts/build
136-
sudo ninja install
137-
138114
- name: Configure
139115
run: |
140116
[[ (${{matrix.sdk_type }} = 'standalone') ]] && source $HOME/VulkanSDK/${{ env.SDK_VERSION_STANDALONE }}/setup-env.sh

.github/workflows/build-macos-arm.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ jobs:
4343
shaderc \
4444
molten-vk \
4545
ninja \
46-
hidapi
46+
hidapi \
47+
fftw
4748
4849
- name: Configure
4950
run: |

.github/workflows/build-macos-intel.yml

Lines changed: 3 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -43,33 +43,8 @@ jobs:
4343
shaderc \
4444
molten-vk \
4545
ninja \
46-
hidapi
47-
48-
- name: Cache FFTS
49-
uses: actions/cache@v4
50-
with:
51-
path: ~/ffts-prefix
52-
key: ${{ runner.os }}-ffts-prefix
53-
54-
55-
- name: Clone and Build FFTS Library
56-
run: |
57-
[[ -d ~/ffts-prefix ]] && exit 0
58-
cd
59-
git clone https://github.com/anthonix/ffts.git
60-
cd ffts
61-
mkdir build
62-
cd build
63-
cmake \
64-
-DENABLE_SHARED=ON \
65-
-DCMAKE_INSTALL_PREFIX=$HOME/ffts-prefix \
66-
-DCMAKE_INSTALL_RPATH=$HOME/ffts-prefix/lib \
67-
-DCMAKE_MACOSX_RPATH=ON \
68-
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
69-
-GNinja \
70-
..
71-
ninja
72-
sudo ninja install
46+
hidapi \
47+
fftw
7348
7449
- name: Configure
7550
run: |
@@ -83,7 +58,7 @@ jobs:
8358
-DCMAKE_BUILD_TYPE=Release \
8459
-DBUILD_DOCS=OFF \
8560
-DBUILD_TESTING=ON \
86-
-DCMAKE_PREFIX_PATH="$(brew --prefix)/opt/libomp;$HOME/ffts-prefix" \
61+
-DCMAKE_PREFIX_PATH="$(brew --prefix)/opt/libomp" \
8762
..
8863
8964
- name: Build

.github/workflows/build-ubuntu.yml

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,8 @@ jobs:
5858
wget \
5959
xzip \
6060
libhidapi-dev \
61-
ccache
61+
ccache \
62+
libfftw3-dev
6263
6364
- name: Install Docs Dependencies
6465
if: ${{ matrix.docs }}
@@ -107,31 +108,6 @@ jobs:
107108
curl -LO https://sdk.lunarg.com/sdk/download/${{ env.SDK_VERSION_STANDALONE }}/linux/vulkansdk-linux-x86_64-${{ env.SDK_VERSION_STANDALONE }}.tar.xz
108109
tar xf vulkansdk-linux-x86_64-${{ env.SDK_VERSION_STANDALONE }}.tar.xz
109110
110-
- name: Cache FFTS
111-
uses: actions/cache@v4
112-
with:
113-
path: ~/ffts
114-
key: ${{ runner.os }}-${{ matrix.os }}-ffts
115-
116-
- name: Clone and Build FFTS Library
117-
run: |
118-
[[ ${{ matrix.docs }} = 'false' ]] && export CMAKE_C_COMPILER_LAUNCHER=ccache && export CMAKE_CXX_COMPILER_LAUNCHER=ccache
119-
if [[ ! -d ~/ffts ]]; then
120-
cd
121-
git clone https://github.com/anthonix/ffts.git
122-
cd ffts
123-
mkdir build
124-
cd build
125-
cmake \
126-
-DENABLE_SHARED=ON \
127-
-DCMAKE_POLICY_VERSION_MINIMUM=3.5 \
128-
-GNinja \
129-
..
130-
ninja
131-
fi
132-
cd ~/ffts/build
133-
sudo ninja install
134-
135111
- name: Configure
136112
run: |
137113
[[ (${{matrix.sdk_type }} = 'standalone') ]] && source $HOME/VulkanSDK/${{ env.SDK_VERSION_STANDALONE }}/setup-env.sh

.github/workflows/build-windows.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ jobs:
4848
shaderc:p
4949
glslang:p
5050
spirv-tools:p
51-
ffts:p
51+
fftw:p
5252
hidapi:p
5353
libpng:p
5454

CMakeLists.txt

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,6 @@ if(WIN32)
130130
add_compile_options(-D_USE_MATH_DEFINES -D_POSIX_THREAD_SAFE_FUNCTIONS)
131131
endif()
132132

133-
# Detect Apple Silicon as FFTS is not available for it
134-
if(APPLE AND CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64")
135-
add_compile_options(-D_APPLE_SILICON)
136-
set(APPLE_SILICON TRUE)
137-
endif()
138-
139133
# Package detection
140134
find_package(PkgConfig MODULE REQUIRED)
141135

@@ -282,13 +276,6 @@ add_subdirectory(devdoc)
282276

283277
# Unit tests
284278
if(Git_FOUND AND BUILD_TESTING)
285-
# find ffts, except on Apple Silicon where it's not supported
286-
if(NOT APPLE_SILICON)
287-
# ffts ships a broken pkgconfig file on some platforms so we are not going to use it
288-
find_path(LIBFFTS_INCLUDE_DIRS ffts.h PATH_SUFFIXES ffts REQUIRED)
289-
find_library(LIBFFTS_LIBRARIES NAMES ffts libffts REQUIRED)
290-
endif()
291-
292279
find_package(Catch2 REQUIRED)
293280
include(Catch)
294281
#Catch2 v3.x.y have a breaking change:

msys2/PKGBUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ depends=(
1414
"${MINGW_PACKAGE_PREFIX}-libsigc++"
1515
"${MINGW_PACKAGE_PREFIX}-cairomm"
1616
"${MINGW_PACKAGE_PREFIX}-yaml-cpp"
17-
"${MINGW_PACKAGE_PREFIX}-ffts"
17+
"${MINGW_PACKAGE_PREFIX}-fftw"
1818
"${MINGW_PACKAGE_PREFIX}-vulkan-loader"
1919
"${MINGW_PACKAGE_PREFIX}-glfw"
2020
)

0 commit comments

Comments
 (0)