From 4aae46f82fc2a05adff22dd9a566f24b7b860d7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20And=C3=A9n?= Date: Tue, 15 Oct 2024 21:20:11 +0200 Subject: [PATCH] ci: add Python testing to cmake matrix (#519) --- .github/workflows/cmake_ci.yml | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/.github/workflows/cmake_ci.yml b/.github/workflows/cmake_ci.yml index 9b483ecbf..75be3e19f 100644 --- a/.github/workflows/cmake_ci.yml +++ b/.github/workflows/cmake_ci.yml @@ -55,3 +55,33 @@ jobs: working-directory: ./build run: | ctest -C ${{matrix.build_type}} --output-on-failure + + - name: Set up Python + if: matrix.finufft_static_linking + uses: actions/setup-python@v5 + with: + python-version: '3.10' + + - name: Build Python wheels + if: matrix.finufft_static_linking + env: + MACOSX_DEPLOYMENT_TARGET: 13 + shell: bash + run: | + python3 -m pip install \ + --verbose \ + -C cmake.define.CMAKE_BUILD_TYPE=${{ matrix.build_type }} \ + -C cmake.define.FINUFFT_ARCH_FLAGS=${{ matrix.arch_flags }} \ + -C cmake.define.FINUFFT_USE_DUCC0=${{ matrix.ducc_fft }} \ + python/finufft + + - name: Install pytest + if: matrix.finufft_static_linking + run: | + python3 -m pip install --upgrade pip + python3 -m pip install pytest + + - name: Test Python package + if: matrix.finufft_static_linking + run: | + python3 -m pytest python/finufft/test