Skip to content

Commit

Permalink
Tracking ci.yml changes from master.
Browse files Browse the repository at this point in the history
  • Loading branch information
Ralf W. Grosse-Kunstleve committed Jun 22, 2024
1 parent d958b78 commit 67d6788
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 55 deletions.
56 changes: 27 additions & 29 deletions .github/workflows/ci_sh_def.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ jobs:
matrix:
runs-on: [ubuntu-20.04, windows-2022, macos-13]
python:
- '3.6'
- '3.8'
- '3.9'
- '3.12'
- '3.13'
Expand All @@ -61,16 +61,17 @@ jobs:
include:
# Just add a key
- runs-on: ubuntu-20.04
python: '3.6'
python: '3.8'
args: >
-DPYBIND11_FINDPYTHON=ON
-DCMAKE_CXX_FLAGS="-D_=1"
exercise_D_: 1
- runs-on: ubuntu-20.04
python: 'pypy-3.8'
args: >
-DPYBIND11_FINDPYTHON=ON
- runs-on: windows-2019
python: '3.6'
python: '3.8'
args: >
-DPYBIND11_FINDPYTHON=ON
# Inject a couple Windows 2019 runs
Expand All @@ -95,7 +96,7 @@ jobs:

- name: Setup Boost (Linux)
# Can't use boost + define _
if: runner.os == 'Linux' && matrix.python != '3.6'
if: runner.os == 'Linux' && matrix.exercise_D_ != 1
run: sudo apt-get install libboost-dev

- name: Setup Boost (macOS)
Expand Down Expand Up @@ -147,9 +148,7 @@ jobs:
run: cmake --build . --target pytest -j 2

- name: C++11 tests
# TODO: Figure out how to load the DLL on Python 3.8+
if: "!(runner.os == 'Windows' && (matrix.python == 3.8 || matrix.python == 3.9 || matrix.python == '3.10' || matrix.python == '3.11' || matrix.python == 'pypy-3.8'))"
run: cmake --build . --target cpptest -j 2
run: cmake --build . --target cpptest -j 2

- name: Interface test C++11
run: cmake --build . --target test_cmake_build
Expand Down Expand Up @@ -179,8 +178,6 @@ jobs:
run: cmake --build build2 --target pytest

- name: C++ tests
# TODO: Figure out how to load the DLL on Python 3.8+
if: "!(runner.os == 'Windows' && (matrix.python == 3.8 || matrix.python == 3.9 || matrix.python == '3.10' || matrix.python == '3.11' || matrix.python == 'pypy-3.8'))"
run: cmake --build build2 --target cpptest

# Third build - C++17 mode with unstable ABI
Expand Down Expand Up @@ -682,15 +679,13 @@ jobs:
cmake --build build-17 --target test_cmake_build
# Testing on CentOS (manylinux uses a centos base, and this is an easy way
# to get GCC 4.8, which is the manylinux1 compiler).
# Testing on CentOS (manylinux uses a centos base).
centos:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
container:
- "centos:7" # GCC 4.8
- "almalinux:8"
- "almalinux:9"

Expand All @@ -700,18 +695,13 @@ jobs:
steps:
- name: Latest actions/checkout
uses: actions/checkout@v4
if: matrix.container != 'centos:7'

- name: Pin actions/checkout as required for centos:7
uses: actions/checkout@v3
if: matrix.container == 'centos:7'
- name: Add Python 3.8
if: matrix.container == 'almalinux:8'
run: dnf update -y && dnf install -y python38-devel gcc-c++ make git

- name: Add Python 3 (RHEL 7)
if: matrix.container == 'centos:7'
run: yum update -y && yum install -y python3-devel gcc-c++ make git

- name: Add Python 3 (RHEL 8+)
if: matrix.container != 'centos:7'
- name: Add Python 3 (default)
if: matrix.container != 'almalinux:8'
run: dnf update -y && dnf install -y python3-devel gcc-c++ make git

- name: Update pip
Expand Down Expand Up @@ -836,17 +826,25 @@ jobs:
fail-fast: false
matrix:
python:
- 3.6
- 3.7
- 3.8
- 3.9
- '3.7'
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'

include:
- python: 3.9
- python: '3.12'
args: -DCMAKE_CXX_STANDARD=20
- python: 3.8
- python: '3.11'
args: -DCMAKE_CXX_STANDARD=20
- python: '3.10'
args: -DCMAKE_CXX_STANDARD=20
- python: '3.9'
args: -DCMAKE_CXX_STANDARD=20
- python: '3.8'
args: -DCMAKE_CXX_STANDARD=17
- python: 3.7
- python: '3.7'
args: -DCMAKE_CXX_STANDARD=14


Expand Down
52 changes: 26 additions & 26 deletions .github/workflows/ci_sh_def.yml.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
--- ci.yml 2024-06-19 10:06:18.454361731 -0700
+++ ci_sh_def.yml 2024-06-19 10:07:59.514269934 -0700
--- ci.yml 2024-06-21 22:56:01.205982412 -0700
+++ ci_sh_def.yml 2024-06-21 22:57:45.189902320 -0700
@@ -1,4 +1,16 @@
-name: CI
+# PLEASE KEEP THIS GROUP OF FILES IN SYNC AT ALL TIMES:
Expand Down Expand Up @@ -27,55 +27,55 @@
cancel-in-progress: true

env:
@@ -125,6 +137,7 @@
@@ -126,6 +138,7 @@
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_STANDARD=11
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT ${{runner.os == 'Windows' && '/GR /EHsc' || ''}}"
${{ matrix.args }}

- name: Build C++11
@@ -156,6 +169,7 @@
@@ -155,6 +168,7 @@
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_STANDARD=17
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT ${{runner.os == 'Windows' && '/GR /EHsc' || ''}}"
${{ matrix.args }}

- name: Build
@@ -177,6 +191,7 @@
@@ -174,6 +188,7 @@
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_STANDARD=17
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT ${{runner.os == 'Windows' && '/GR /EHsc' || ''}}"
-DPYBIND11_INTERNALS_VERSION=10000000
${{ matrix.args }}

@@ -220,6 +235,7 @@
@@ -217,6 +232,7 @@
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DPython_ROOT_DIR=.venv
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"

- name: Build C++11
run: cmake --build build -j2
@@ -293,6 +309,7 @@
@@ -290,6 +306,7 @@
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_STANDARD=17
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"

- name: Build
run: cmake --build build -j 2
@@ -361,6 +378,7 @@
@@ -358,6 +375,7 @@
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DCMAKE_CXX_STANDARD=${{ matrix.std }}
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")

- name: Build
@@ -390,7 +408,7 @@
@@ -387,7 +405,7 @@
run: apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y cmake git python3-dev python3-pytest python3-numpy

- name: Configure
Expand All @@ -84,7 +84,7 @@

- name: Build
run: cmake --build build -j2 --verbose
@@ -478,7 +496,7 @@
@@ -475,7 +493,7 @@
cmake -S . -B build -DDOWNLOAD_CATCH=ON \
-DCMAKE_CXX_STANDARD=17 \
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") \
Expand All @@ -93,127 +93,127 @@
-DPYBIND11_TEST_FILTER="test_smart_ptr.cpp"

- name: Build
@@ -532,6 +550,7 @@
@@ -529,6 +547,7 @@
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DCMAKE_CXX_STANDARD=${{ matrix.std }}
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")

- name: Build
@@ -554,6 +573,7 @@
@@ -551,6 +570,7 @@
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DCMAKE_CXX_STANDARD=${{ matrix.std }}
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
"-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp"

@@ -603,6 +623,7 @@
@@ -600,6 +620,7 @@
-DDOWNLOAD_CATCH=ON \
-DDOWNLOAD_EIGEN=OFF \
-DCMAKE_CXX_STANDARD=11 \
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" \
-DCMAKE_CXX_COMPILER=$(which icpc) \
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")

@@ -635,6 +656,7 @@
@@ -632,6 +653,7 @@
-DDOWNLOAD_CATCH=ON \
-DDOWNLOAD_EIGEN=OFF \
-DCMAKE_CXX_STANDARD=17 \
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT" \
-DCMAKE_CXX_COMPILER=$(which icpc) \
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")

@@ -713,6 +735,7 @@
@@ -703,6 +725,7 @@
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_STANDARD=11
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")

- name: Build
@@ -763,6 +786,7 @@
@@ -753,6 +776,7 @@
cmake ../pybind11-tests
-DDOWNLOAD_CATCH=ON
-DPYBIND11_WERROR=ON
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
working-directory: /build-tests

@@ -858,6 +882,7 @@
@@ -856,6 +880,7 @@
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
+ -DCMAKE_CXX_FLAGS="/GR /EHsc /DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
${{ matrix.args }}
- name: Build C++11
run: cmake --build build -j 2
@@ -912,6 +937,7 @@
@@ -910,6 +935,7 @@
-DPYBIND11_WERROR=ON
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
+ -DCMAKE_CXX_FLAGS="/GR /EHsc /DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
${{ matrix.args }}
- name: Build C++11
run: cmake --build build --config Debug -j 2
@@ -954,6 +980,7 @@
@@ -952,6 +978,7 @@
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_STANDARD=20
+ -DCMAKE_CXX_FLAGS="/GR /EHsc /DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"

- name: Build C++20
run: cmake --build build -j 2
@@ -974,6 +1001,7 @@
@@ -972,6 +999,7 @@
-DDOWNLOAD_CATCH=ON
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_STANDARD=20
+ -DCMAKE_CXX_FLAGS="/GR /EHsc /DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
"-DPYBIND11_TEST_OVERRIDE=test_call_policies.cpp;test_gil_scoped.cpp;test_thread.cpp"

- name: Build C++20 - Exercise cmake -DPYBIND11_TEST_OVERRIDE
@@ -1026,6 +1054,7 @@
@@ -1024,6 +1052,7 @@
run: >-
cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=11 -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON
-DPYTHON_EXECUTABLE=$(python -c "import sys; print(sys.executable)")
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
-S . -B build

- name: Build C++11
@@ -1047,6 +1076,7 @@
@@ -1045,6 +1074,7 @@
run: >-
cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=14 -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON
-DPYTHON_EXECUTABLE=$(python -c "import sys; print(sys.executable)")
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
-S . -B build2

- name: Build C++14
@@ -1068,6 +1098,7 @@
@@ -1066,6 +1096,7 @@
run: >-
cmake -G "MinGW Makefiles" -DCMAKE_CXX_STANDARD=17 -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON
-DPYTHON_EXECUTABLE=$(python -c "import sys; print(sys.executable)")
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
-S . -B build3

- name: Build C++17
@@ -1135,6 +1166,7 @@
@@ -1133,6 +1164,7 @@
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_CXX_STANDARD=17
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"

- name: Build
run: cmake --build . -j 2
@@ -1200,6 +1232,7 @@
@@ -1198,6 +1230,7 @@
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_CXX_STANDARD=17
+ -DCMAKE_CXX_FLAGS="-DPYBIND11_USE_SMART_HOLDER_AS_DEFAULT"
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")

- name: Build
@@ -1223,6 +1256,7 @@
@@ -1221,6 +1254,7 @@
-DDOWNLOAD_EIGEN=ON
-DCMAKE_CXX_COMPILER=clang++
-DCMAKE_CXX_STANDARD=17
Expand Down

0 comments on commit 67d6788

Please sign in to comment.