From bd1398521331479feea2fdf85954a4184ed9d01b Mon Sep 17 00:00:00 2001 From: tnie Date: Tue, 10 Mar 2026 20:46:34 +0800 Subject: [PATCH 1/3] Build on linux --- CMakeLists.txt | 2 +- benchmark/CMakeLists.txt | 2 +- include/fftconv/fftw.hpp | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index de7c983..1d2d969 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,4 +14,4 @@ add_subdirectory(test) add_subdirectory(benchmark) # Build python bindings -add_subdirectory(py) +# add_subdirectory(py) diff --git a/benchmark/CMakeLists.txt b/benchmark/CMakeLists.txt index 5f4d99d..90426eb 100644 --- a/benchmark/CMakeLists.txt +++ b/benchmark/CMakeLists.txt @@ -2,7 +2,7 @@ cmake_minimum_required(VERSION 3.20) project(fftconv C CXX) set(CMAKE_CXX_STANDARD 20) -find_package(BENCHMARK CONFIG REQUIRED) +find_package(benchmark CONFIG REQUIRED) find_package(Armadillo CONFIG REQUIRED) find_package(FFTW3 CONFIG REQUIRED) find_package(FFTW3f CONFIG REQUIRED) diff --git a/include/fftconv/fftw.hpp b/include/fftconv/fftw.hpp index 9ea460a..561d83b 100644 --- a/include/fftconv/fftw.hpp +++ b/include/fftconv/fftw.hpp @@ -8,6 +8,7 @@ A C++ FFTW wrapper #include #include #include +#include #include #include From 43ca7f0bdd66474c65fe1616a4ca8a7825c9ef05 Mon Sep 17 00:00:00 2001 From: tnie Date: Tue, 10 Mar 2026 20:52:37 +0800 Subject: [PATCH 2/3] CI build and test for linux --- .github/workflows/build.yml | 57 +++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 734f133..43f4d28 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -118,3 +118,60 @@ jobs: - name: CTest shell: bash run: ctest --output-on-failure --test-dir build/clang/test/ + + Build-linux: + runs-on: ubuntu-24.04 + steps: + - name: Export GitHub Actions cache environment variables + uses: actions/github-script@v7 + with: + script: | + core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || ''); + core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || ''); + + - uses: actions/checkout@v4 + with: + submodules: true + + - name: Install system dependencies + shell: bash + run: | + sudo apt-get update + sudo apt-get install -y ninja-build pkg-config cmake clang clang-tidy + + - name: Setup VCPKG + shell: bash + run: | + cd ${{ github.workspace }} + git clone https://github.com/microsoft/vcpkg + ${{ github.workspace }}/vcpkg/bootstrap-vcpkg.sh + + - name: Add NuGet sources + shell: bash + env: + gh_packages_secret: ${{ secrets.GH_PACKAGES_TOKEN }} + if: ${{ env.gh_packages_secret != '' }} + run: | + # Use nuget if available (since mono is not pre-installed on ubuntu, vcpkg fetches its own nuget or we can just run it) + `${{ env.VCPKG_EXE }} fetch nuget | tail -n 1` \ + sources add \ + -Source "${{ env.FEED_URL }}" \ + -StorePasswordInClearText \ + -Name GitHubPackages \ + -UserName "${{ env.USERNAME }}" \ + -Password "${{ secrets.GH_PACKAGES_TOKEN }}" + `${{ env.VCPKG_EXE }} fetch nuget | tail -n 1` \ + setapikey "${{ secrets.GH_PACKAGES_TOKEN }}" \ + -Source "${{ env.FEED_URL }}" + + - name: CMake configure + shell: bash + run: cmake --preset clang + + - name: CMake build + shell: bash + run: cmake --build --preset clang-release + + - name: CTest + shell: bash + run: ctest --output-on-failure --test-dir build/clang/test/ From 04cb5f705c998cf0803f1d5dcbd6a1827531beb0 Mon Sep 17 00:00:00 2001 From: tnie Date: Tue, 10 Mar 2026 20:59:26 +0800 Subject: [PATCH 3/3] github action --- .github/workflows/build.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 43f4d28..4e6812f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -137,7 +137,7 @@ jobs: shell: bash run: | sudo apt-get update - sudo apt-get install -y ninja-build pkg-config cmake clang clang-tidy + sudo apt-get install -y mono-devel ninja-build pkg-config cmake clang clang-tidy - name: Setup VCPKG shell: bash @@ -152,15 +152,15 @@ jobs: gh_packages_secret: ${{ secrets.GH_PACKAGES_TOKEN }} if: ${{ env.gh_packages_secret != '' }} run: | - # Use nuget if available (since mono is not pre-installed on ubuntu, vcpkg fetches its own nuget or we can just run it) - `${{ env.VCPKG_EXE }} fetch nuget | tail -n 1` \ + # Use nuget via mono (since mono is not pre-installed on ubuntu, and vcpkg fetches the Windows nuget binary) + mono `${{ env.VCPKG_EXE }} fetch nuget | tail -n 1` \ sources add \ -Source "${{ env.FEED_URL }}" \ -StorePasswordInClearText \ -Name GitHubPackages \ -UserName "${{ env.USERNAME }}" \ -Password "${{ secrets.GH_PACKAGES_TOKEN }}" - `${{ env.VCPKG_EXE }} fetch nuget | tail -n 1` \ + mono `${{ env.VCPKG_EXE }} fetch nuget | tail -n 1` \ setapikey "${{ secrets.GH_PACKAGES_TOKEN }}" \ -Source "${{ env.FEED_URL }}"