Files
kissfft/.github/workflows/build.yaml
2025-11-28 20:29:11 +01:00

92 lines
2.2 KiB
YAML

name: Build
on:
push:
pull_request:
jobs:
build-linux:
name: "Linux"
runs-on: ubuntu-24.04
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
submodules: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install deps
run: |
sudo apt-get update
sudo apt-get install -y \
libfftw3-dev \
libpng-dev \
gcc-14 \
g++-14
- name: Use GCC 14 to avoid a bug in tests with old gcc - https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79700
run: |
echo "CC=gcc-14" >> $GITHUB_ENV
echo "CXX=g++-14" >> $GITHUB_ENV
- name: Install NumPy
run: |
python -m pip install --upgrade pip
python -m pip install --only-binary=:all: numpy
- name: Run tests
run: make testall
build-windows:
name: "Windows (MSVC)"
runs-on: windows-2022
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
submodules: true
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.13'
- name: Install NumPy
run: |
python -m pip install --upgrade pip
python -m pip install --only-binary=:all: numpy
- name: Set up MSVC dev command prompt (x64)
uses: ilammy/msvc-dev-cmd@v1
with:
arch: x64
- name: Install C/C++ deps via vcpkg
run: |
C:\vcpkg\vcpkg.exe install fftw3:x64-windows libpng:x64-windows
- name: Install pkg-config
run: choco install -y pkgconfiglite
- name: Configure (CMake, MSVC)
run: >
cmake -S . -B build
-G "Visual Studio 17 2022"
-A x64
-DCMAKE_TOOLCHAIN_FILE=C:\vcpkg\scripts\buildsystems\vcpkg.cmake
-DCMAKE_BUILD_TYPE=Release
-DKISSFFT_TEST=OFF
-DKISSFFT_TOOLS=OFF
- name: Build
run: cmake --build build --config Release --parallel
#- name: Test
# working-directory: build
# run: ctest -C Release --output-on-failure