-
Notifications
You must be signed in to change notification settings - Fork 79
57 lines (54 loc) · 1.81 KB
/
cmake_ci.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
name: cmake ci linux macos windows
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_cmake_matrix.py)
echo "matrix=$MATRIX" >> $GITHUB_OUTPUT
cmake-ci:
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.toolchain }}
vcvarsall: ${{ contains(matrix.os, 'windows') }}
cmake: true
ninja: true
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: Configure Cmake
run: |
cmake -S . -B ./build -G Ninja -DCMAKE_BUILD_TYPE:STRING=${{matrix.build_type}} -DFINUFFT_ARCH_FLAGS=${{ matrix.arch_flags }} -DFINUFFT_BUILD_TESTS=ON -DFINUFFT_STATIC_LINKING=${{matrix.finufft_static_linking}} -DFINUFFT_USE_DUCC0=${{ matrix.ducc_fft }}
- name: Build
run: |
cmake --build ./build --config ${{matrix.build_type}}
- name: Test
working-directory: ./build
run: |
ctest -C ${{matrix.build_type}}