Skip to content

Commit d011a7e

Browse files
committed
Add python312.yml
``` ../../meson.build:85:2: ERROR: Problem encountered: Your Python version is too new. SciPy 1.9 supports Python 3.8-3.11; if you are trying to build from source for the most recent SciPy version you may hit this error as well. Please build from the `main` branch on GitHub instead. ```
1 parent 9ffaeaa commit d011a7e

File tree

1 file changed

+131
-0
lines changed

1 file changed

+131
-0
lines changed

.github/workflows/python312.yml

Lines changed: 131 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,131 @@
1+
name: Python312
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
7+
concurrency:
8+
group: python312-${{ github.ref }}
9+
cancel-in-progress: false
10+
11+
env:
12+
PYTEST_TIMEOUT: 300
13+
14+
jobs:
15+
standard:
16+
name: "🐍 3.12 latest • ubuntu-latest • x64"
17+
runs-on: ubuntu-latest
18+
# if: "contains(github.event.pull_request.labels.*.name, 'python dev')"
19+
20+
steps:
21+
- name: Show env
22+
run: env
23+
24+
- uses: actions/checkout@v3
25+
26+
- name: Setup Python 3.12
27+
uses: actions/setup-python@v4
28+
with:
29+
python-version: "3.12-dev"
30+
31+
- name: Setup Boost
32+
run: sudo apt-get install libboost-dev
33+
34+
- name: Update CMake
35+
uses: jwlawson/[email protected]
36+
37+
- name: Run pip installs
38+
run: |
39+
python -m pip install --upgrade pip
40+
python -m pip install --prefer-binary -r tests/requirements.txt
41+
python -m pip install --prefer-binary numpy
42+
# python -m pip install --prefer-binary scipy
43+
44+
- name: Show platform info
45+
run: python -m platform
46+
47+
- name: Show CMake version
48+
run: cmake --version
49+
50+
# FIRST BUILD
51+
- name: Configure C++11
52+
run: >
53+
cmake -S . -B build11
54+
-DCMAKE_VERBOSE_MAKEFILE=ON
55+
-DPYBIND11_WERROR=ON
56+
-DDOWNLOAD_CATCH=ON
57+
-DDOWNLOAD_EIGEN=ON
58+
-DCMAKE_CXX_STANDARD=11
59+
-DCMAKE_BUILD_TYPE=Debug
60+
61+
- name: Build C++11
62+
run: cmake --build build11 -j 2
63+
64+
- name: Python tests C++11
65+
run: cmake --build build11 --target pytest -j 2
66+
67+
- name: C++ tests C++11
68+
run: cmake --build build11 --target cpptest -j 2
69+
70+
- name: Interface test C++11
71+
run: cmake --build build11 --target test_cmake_build
72+
73+
- name: Clean directory
74+
run: git clean -fdx
75+
76+
# SECOND BUILD
77+
- name: Configure C++17
78+
run: >
79+
cmake -S . -B build17
80+
-DCMAKE_VERBOSE_MAKEFILE=ON
81+
-DPYBIND11_WERROR=ON
82+
-DDOWNLOAD_CATCH=ON
83+
-DDOWNLOAD_EIGEN=ON
84+
-DCMAKE_CXX_STANDARD=17
85+
-DCMAKE_BUILD_TYPE=Debug
86+
87+
- name: Build C++17
88+
run: cmake --build build17 -j 2
89+
90+
- name: Python tests C++17
91+
run: cmake --build build17 --target pytest
92+
93+
- name: C++ tests C++17
94+
run: cmake --build build17 --target cpptest
95+
96+
- name: Interface test C++17
97+
run: cmake --build build17 --target test_cmake_build
98+
99+
- name: Clean directory
100+
run: git clean -fdx
101+
102+
# THIRD BUILD
103+
- name: Configure C++17 max DPYBIND11_INTERNALS_VERSION
104+
run: >
105+
cmake -S . -B build17max
106+
-DCMAKE_VERBOSE_MAKEFILE=ON
107+
-DPYBIND11_WERROR=ON
108+
-DDOWNLOAD_CATCH=ON
109+
-DDOWNLOAD_EIGEN=ON
110+
-DCMAKE_CXX_STANDARD=17
111+
-DCMAKE_BUILD_TYPE=Debug
112+
-DPYBIND11_INTERNALS_VERSION=10000000
113+
114+
- name: Build C++17 max DPYBIND11_INTERNALS_VERSION
115+
run: cmake --build build17max -j 2
116+
117+
- name: Python tests C++17 max DPYBIND11_INTERNALS_VERSION
118+
run: cmake --build build17max --target pytest
119+
120+
- name: C++ tests C++17 max DPYBIND11_INTERNALS_VERSION
121+
run: cmake --build build17max --target cpptest
122+
123+
- name: Interface test C++17 max DPYBIND11_INTERNALS_VERSION
124+
run: cmake --build build17max --target test_cmake_build
125+
126+
# Ensure the setup_helpers module can build packages using setuptools
127+
- name: Setuptools helpers test
128+
run: pytest tests/extra_setuptools
129+
130+
- name: Clean directory
131+
run: git clean -fdx

0 commit comments

Comments
 (0)