Skip to content

Commit d1cc632

Browse files
committed
Bring back python312.yml as upstream.yml
1 parent 0aac514 commit d1cc632

File tree

1 file changed

+74
-44
lines changed

1 file changed

+74
-44
lines changed

.github/workflows/upstream.yml

Lines changed: 74 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
name: Upstream
32

43
on:
@@ -7,106 +6,137 @@ on:
76

87
concurrency:
98
group: upstream-${{ github.ref }}
10-
cancel-in-progress: true
9+
cancel-in-progress: false
1110

1211
env:
13-
PIP_ONLY_BINARY: numpy
12+
PYTEST_TIMEOUT: 300
1413

1514
jobs:
1615
standard:
17-
name: "🐍 3.11 latest internals • ubuntu-latest • x64"
16+
name: "🐍 3.12 latest • ubuntu-latest • x64"
1817
runs-on: ubuntu-latest
18+
19+
# Hint: Select the 'python dev' label in the PR web view.
1920
if: "contains(github.event.pull_request.labels.*.name, 'python dev')"
2021

2122
steps:
23+
- name: Show env
24+
run: env
25+
2226
- uses: actions/checkout@v3
2327

24-
- name: Setup Python 3.11
28+
- name: Setup Python 3.12
2529
uses: actions/setup-python@v4
2630
with:
27-
python-version: "3.11-dev"
31+
python-version: "3.12-dev"
2832

29-
- name: Setup Boost (Linux)
30-
if: runner.os == 'Linux'
33+
- name: Setup Boost
3134
run: sudo apt-get install libboost-dev
3235

3336
- name: Update CMake
3437
uses: jwlawson/[email protected]
3538

36-
- name: Prepare env
39+
- name: Run pip installs
3740
run: |
38-
python -m pip install -r tests/requirements.txt
41+
python -m pip install --upgrade pip
42+
python -m pip install --prefer-binary -r tests/requirements.txt
43+
# python -m pip install --prefer-binary numpy # SLOW
44+
# python -m pip install --prefer-binary scipy # FAILED ~Nov 2022
45+
46+
- name: Show platform info
47+
run: python -m platform
3948

40-
- name: Setup annotations on Linux
41-
if: runner.os == 'Linux'
42-
run: python -m pip install pytest-github-actions-annotate-failures
49+
- name: Show CMake version
50+
run: cmake --version
4351

44-
# First build - C++11 mode and inplace
52+
# FIRST BUILD
4553
- name: Configure C++11
4654
run: >
47-
cmake -S . -B .
55+
cmake -S . -B build11
56+
-DCMAKE_VERBOSE_MAKEFILE=ON
4857
-DPYBIND11_WERROR=ON
4958
-DDOWNLOAD_CATCH=ON
5059
-DDOWNLOAD_EIGEN=ON
5160
-DCMAKE_CXX_STANDARD=11
61+
-DCMAKE_BUILD_TYPE=Debug
5262
5363
- name: Build C++11
54-
run: cmake --build . -j 2
64+
run: cmake --build build11 -j 2
5565

5666
- name: Python tests C++11
57-
run: cmake --build . --target pytest -j 2
58-
59-
- name: C++11 tests
60-
run: cmake --build . --target cpptest -j 2
67+
run: cmake --build build11 --target pytest -j 2
68+
69+
# python-3.12.0-alpha.1-linux-22.04-x64.tar.gz PASSED
70+
# python-3.12.0-alpha.2-linux-22.04-x64.tar.gz FAILED
71+
# python-3.12.0-alpha.3-linux-22.04-x64.tar.gz FAILED
72+
# free(): invalid pointer
73+
# Custom PyConfig
74+
# /home/runner/work/pybind11/pybind11/tests/test_embed/test_interpreter.cpp:175
75+
# /home/runner/work/pybind11/pybind11/tests/test_embed/test_interpreter.cpp:179: FAILED:
76+
# gdb traceback points here:
77+
# https://github.com/python/cpython/blame/54289f85b2af1ecf046089ddf535dda1bdf6af24/Python/import.c#L524
78+
# - name: C++ tests C++11
79+
# run: cmake --build build11 --target cpptest -j 2
6180

6281
- name: Interface test C++11
63-
run: cmake --build . --target test_cmake_build
82+
run: cmake --build build11 --target test_cmake_build
6483

6584
- name: Clean directory
6685
run: git clean -fdx
6786

68-
# Second build - C++17 mode and in a build directory
87+
# SECOND BUILD
6988
- name: Configure C++17
7089
run: >
71-
cmake -S . -B build2
90+
cmake -S . -B build17
91+
-DCMAKE_VERBOSE_MAKEFILE=ON
7292
-DPYBIND11_WERROR=ON
7393
-DDOWNLOAD_CATCH=ON
7494
-DDOWNLOAD_EIGEN=ON
7595
-DCMAKE_CXX_STANDARD=17
76-
${{ matrix.args }}
77-
${{ matrix.args2 }}
96+
-DCMAKE_BUILD_TYPE=Debug
97+
98+
- name: Build C++17
99+
run: cmake --build build17 -j 2
78100

79-
- name: Build
80-
run: cmake --build build2 -j 2
101+
- name: Python tests C++17
102+
run: cmake --build build17 --target pytest
81103

82-
- name: Python tests
83-
run: cmake --build build2 --target pytest
104+
# - name: C++ tests C++17
105+
# run: cmake --build build17 --target cpptest
84106

85-
- name: C++ tests
86-
run: cmake --build build2 --target cpptest
107+
- name: Interface test C++17
108+
run: cmake --build build17 --target test_cmake_build
87109

88-
# Third build - C++17 mode with unstable ABI
89-
- name: Configure (unstable ABI)
110+
- name: Clean directory
111+
run: git clean -fdx
112+
113+
# THIRD BUILD
114+
- name: Configure C++17 max DPYBIND11_INTERNALS_VERSION
90115
run: >
91-
cmake -S . -B build3
116+
cmake -S . -B build17max
117+
-DCMAKE_VERBOSE_MAKEFILE=ON
92118
-DPYBIND11_WERROR=ON
93119
-DDOWNLOAD_CATCH=ON
94120
-DDOWNLOAD_EIGEN=ON
95121
-DCMAKE_CXX_STANDARD=17
122+
-DCMAKE_BUILD_TYPE=Debug
96123
-DPYBIND11_INTERNALS_VERSION=10000000
97-
"-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp"
98-
${{ matrix.args }}
99124
100-
- name: Build (unstable ABI)
101-
run: cmake --build build3 -j 2
125+
- name: Build C++17 max DPYBIND11_INTERNALS_VERSION
126+
run: cmake --build build17max -j 2
127+
128+
- name: Python tests C++17 max DPYBIND11_INTERNALS_VERSION
129+
run: cmake --build build17max --target pytest
102130

103-
- name: Python tests (unstable ABI)
104-
run: cmake --build build3 --target pytest
131+
# - name: C++ tests C++17 max DPYBIND11_INTERNALS_VERSION
132+
# run: cmake --build build17max --target cpptest
105133

106-
- name: Interface test
107-
run: cmake --build build3 --target test_cmake_build
134+
- name: Interface test C++17 max DPYBIND11_INTERNALS_VERSION
135+
run: cmake --build build17max --target test_cmake_build
108136

109-
# This makes sure the setup_helpers module can build packages using
110-
# setuptools
137+
# Ensure the setup_helpers module can build packages using setuptools
111138
- name: Setuptools helpers test
112139
run: pytest tests/extra_setuptools
140+
141+
- name: Clean directory
142+
run: git clean -fdx

0 commit comments

Comments
 (0)