-
Notifications
You must be signed in to change notification settings - Fork 195
70 lines (57 loc) · 1.73 KB
/
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
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Tests
on:
workflow_dispatch:
pull_request:
push:
branches:
- master
- stable
- v*
concurrency:
group: test-${{ github.ref }}
cancel-in-progress: false
jobs:
# This is the "main" test suite, which tests a large number of different
# versions of default compilers and Python versions in GitHub Actions.
standard:
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest', 'windows-2022', 'macos-latest']
python: ['3.8', '3.9', '3.10', '3.11', '3.12.0-rc.1', 'pypy3.9']
exclude:
- os: 'macos-latest'
python: 'pypy3.9'
- os: 'windows-2022'
python: '3.12.0-rc.1'
name: "Python ${{ matrix.python }} / ${{ matrix.os }}"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
with:
submodules: true
- name: Setup Python ${{ matrix.python }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Update CMake
uses: jwlawson/actions-setup-cmake@v1.13
- name: Install Eigen
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get -y install libeigen3-dev
- name: Install PyTest
run: |
python -m pip install pytest pytest-github-actions-annotate-failures
- name: Install NumPy
if: matrix.python != 'pypy3.9' && matrix.python != '3.12.0-rc.1'
run: |
python -m pip install numpy scipy
- name: Configure
run: >
cmake -S . -B build -DNB_TEST_STABLE_ABI=ON -DNB_TEST_SHARED_BUILD="$(python3 -c 'import sys; print(int(sys.version_info.minor>=11))')"
- name: Build C++
run: cmake --build build -j 2
- name: Run tests
run: >
cd build;
python -m pytest