Skip to content

Commit 1a8c43a

Browse files
authored
Restore upstream.yml from pybind11 master. (#30130)
This is to remove a git merge stumbling stone. Also remove the now obsolete python312dev.yml.
1 parent 34f869d commit 1a8c43a

File tree

2 files changed

+116
-138
lines changed

2 files changed

+116
-138
lines changed

.github/workflows/python312dev.yml

Lines changed: 0 additions & 138 deletions
This file was deleted.

.github/workflows/upstream.yml

Lines changed: 116 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,116 @@
1+
name: Upstream
2+
3+
on:
4+
workflow_dispatch:
5+
pull_request:
6+
7+
permissions:
8+
contents: read
9+
10+
concurrency:
11+
group: upstream-${{ github.ref }}
12+
cancel-in-progress: true
13+
14+
env:
15+
PIP_BREAK_SYSTEM_PACKAGES: 1
16+
# For cmake:
17+
VERBOSE: 1
18+
19+
jobs:
20+
standard:
21+
name: "🐍 3.13 latest • ubuntu-latest • x64"
22+
runs-on: ubuntu-latest
23+
# Only runs when the 'python dev' label is selected
24+
if: "contains(github.event.pull_request.labels.*.name, 'python dev')"
25+
26+
steps:
27+
- uses: actions/checkout@v4
28+
29+
- name: Setup Python 3.13
30+
uses: actions/setup-python@v5
31+
with:
32+
python-version: "3.13"
33+
allow-prereleases: true
34+
35+
- name: Setup Boost
36+
run: sudo apt-get install libboost-dev
37+
38+
- name: Update CMake
39+
uses: jwlawson/[email protected]
40+
41+
- name: Run pip installs
42+
run: |
43+
python -m pip install --upgrade pip
44+
python -m pip install -r tests/requirements.txt
45+
46+
- name: Show platform info
47+
run: |
48+
python -m platform
49+
cmake --version
50+
pip list
51+
52+
# First build - C++11 mode and inplace
53+
- name: Configure C++11
54+
run: >
55+
cmake -S . -B build11
56+
-DPYBIND11_WERROR=ON
57+
-DDOWNLOAD_CATCH=ON
58+
-DDOWNLOAD_EIGEN=ON
59+
-DCMAKE_CXX_STANDARD=11
60+
-DCMAKE_BUILD_TYPE=Debug
61+
62+
- name: Build C++11
63+
run: cmake --build build11 -j 2
64+
65+
- name: Python tests C++11
66+
run: cmake --build build11 --target pytest -j 2
67+
68+
- name: C++11 tests
69+
run: cmake --build build11 --target cpptest -j 2
70+
71+
- name: Interface test C++11
72+
run: cmake --build build11 --target test_cmake_build
73+
74+
# Second build - C++17 mode and in a build directory
75+
- name: Configure C++17
76+
run: >
77+
cmake -S . -B build17
78+
-DPYBIND11_WERROR=ON
79+
-DDOWNLOAD_CATCH=ON
80+
-DDOWNLOAD_EIGEN=ON
81+
-DCMAKE_CXX_STANDARD=17
82+
83+
- name: Build C++17
84+
run: cmake --build build17 -j 2
85+
86+
- name: Python tests C++17
87+
run: cmake --build build17 --target pytest
88+
89+
- name: C++17 tests
90+
run: cmake --build build17 --target cpptest
91+
92+
# Third build - C++17 mode with unstable ABI
93+
- name: Configure (unstable ABI)
94+
run: >
95+
cmake -S . -B build17max
96+
-DPYBIND11_WERROR=ON
97+
-DDOWNLOAD_CATCH=ON
98+
-DDOWNLOAD_EIGEN=ON
99+
-DCMAKE_CXX_STANDARD=17
100+
-DPYBIND11_INTERNALS_VERSION=10000000
101+
102+
- name: Build (unstable ABI)
103+
run: cmake --build build17max -j 2
104+
105+
- name: Python tests (unstable ABI)
106+
run: cmake --build build17max --target pytest
107+
108+
- name: Interface test (unstable ABI)
109+
run: cmake --build build17max --target test_cmake_build
110+
111+
# This makes sure the setup_helpers module can build packages using
112+
# setuptools
113+
- name: Setuptools helpers test
114+
run: |
115+
pip install setuptools
116+
pytest tests/extra_setuptools

0 commit comments

Comments
 (0)