-
Notifications
You must be signed in to change notification settings - Fork 81
63 lines (61 loc) · 1.92 KB
/
python_cmake.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
name: Test python skbuild with CMake
on: [push, pull_request]
jobs:
prepare:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.generate_matrix.outputs.matrix }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Generate matrix
id: generate_matrix
run: |
echo "MACOSX_DEPLOYMENT_TARGET=11.0" >> $GITHUB_ENV
MATRIX=$(python3 ${{ github.workspace }}/.github/workflows/generate_matrix.py)
echo "matrix=$MATRIX" >> $GITHUB_OUTPUT
build:
name: Build with Pip
runs-on: ${{ matrix.os }}
needs: prepare
strategy:
fail-fast: false
matrix: ${{ fromJSON(needs.prepare.outputs.matrix) }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Cpp
uses: aminya/setup-cpp@v1
with:
compiler: ${{ matrix.compiler }}
vcvarsall: ${{ contains(matrix.os, 'windows') }}
cmake: false
ninja: false
vcpkg: false
cppcheck: false
clangtidy: false
- name: Set min macOS version and install fftw
if: runner.os == 'macOS'
run: |
brew install fftw
- name: Install fftw
if: runner.os == 'linux'
run: |
sudo apt update
sudo apt install -y libfftw3-dev
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install pytest
run: |
python3 -m pip install --upgrade pip
python3 -m pip install pytest
- name: Set compiler flags
run: |
echo CMAKE_ARGS="-DFINUFFT_ARCH_FLAGS=${{ matrix.arch_flags }}" >> $GITHUB_ENV
shell: bash
- name: Build
run: python3 -m pip install ${{ github.workspace }}/python/finufft --verbose
- name: Test
run: python3 -m pytest ${{ github.workspace }}/python/finufft/test