123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846 |
- name: CI
- on:
- workflow_dispatch:
- pull_request:
- push:
- branches:
- - master
- - stable
- - v*
- 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:
- runs-on: [ubuntu-latest, windows-latest, macos-latest]
- python:
- - 2.7
- - 3.5
- - 3.6
- - 3.9
- - 3.10-dev
- - pypy2
- - pypy3
- # Items in here will either be added to the build matrix (if not
- # present), or add new keys to an existing matrix element if all the
- # existing keys match.
- #
- # We support three optional keys: args (both build), args1 (first
- # build), and args2 (second build).
- include:
- # Just add a key
- - runs-on: ubuntu-latest
- python: 3.6
- args: >
- -DPYBIND11_FINDPYTHON=ON
- - runs-on: windows-latest
- python: 3.6
- args: >
- -DPYBIND11_FINDPYTHON=ON
- # These items will be removed from the build matrix, keys must match.
- exclude:
- # Currently 32bit only, and we build 64bit
- - runs-on: windows-latest
- python: pypy2
- - runs-on: windows-latest
- python: pypy3
- # TODO: PyPy2 7.3.3 segfaults, while 7.3.2 was fine.
- - runs-on: ubuntu-latest
- python: pypy2
- name: "🐍 ${{ matrix.python }} • ${{ matrix.runs-on }} • x64 ${{ matrix.args }}"
- runs-on: ${{ matrix.runs-on }}
- steps:
- - uses: actions/checkout@v2
- - name: Setup Python ${{ matrix.python }}
- uses: actions/setup-python@v2
- with:
- python-version: ${{ matrix.python }}
- - name: Setup Boost (Windows / Linux latest)
- shell: bash
- run: echo "BOOST_ROOT=$BOOST_ROOT_1_72_0" >> $GITHUB_ENV
- - name: Update CMake
- uses: jwlawson/actions-setup-cmake@v1.8
- - name: Cache wheels
- if: runner.os == 'macOS'
- uses: actions/cache@v2
- with:
- # This path is specific to macOS - we really only need it for PyPy NumPy wheels
- # See https://github.com/actions/cache/blob/master/examples.md#python---pip
- # for ways to do this more generally
- path: ~/Library/Caches/pip
- # Look to see if there is a cache hit for the corresponding requirements file
- key: ${{ runner.os }}-pip-${{ matrix.python }}-x64-${{ hashFiles('tests/requirements.txt') }}
- - name: Prepare env
- run: python -m pip install -r tests/requirements.txt --prefer-binary
- - name: Setup annotations on Linux
- if: runner.os == 'Linux'
- run: python -m pip install pytest-github-actions-annotate-failures
- # First build - C++11 mode and inplace
- - name: Configure C++11 ${{ matrix.args }}
- run: >
- cmake -S . -B .
- -DPYBIND11_WERROR=ON
- -DDOWNLOAD_CATCH=ON
- -DDOWNLOAD_EIGEN=ON
- -DCMAKE_CXX_STANDARD=11
- ${{ matrix.args }}
- - name: Build C++11
- run: cmake --build . -j 2
- - name: Python tests C++11
- 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-dev'))"
- run: cmake --build . --target cpptest -j 2
- - name: Interface test C++11
- run: cmake --build . --target test_cmake_build
- - name: Clean directory
- run: git clean -fdx
- # Second build - C++17 mode and in a build directory
- - name: Configure ${{ matrix.args2 }}
- run: >
- cmake -S . -B build2
- -DPYBIND11_WERROR=ON
- -DDOWNLOAD_CATCH=ON
- -DDOWNLOAD_EIGEN=ON
- -DCMAKE_CXX_STANDARD=17
- ${{ matrix.args }}
- ${{ matrix.args2 }}
- - name: Build
- run: cmake --build build2 -j 2
- - name: Python tests
- 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-dev'))"
- run: cmake --build build2 --target cpptest
- - name: Interface test
- run: cmake --build build2 --target test_cmake_build
- # Eventually Microsoft might have an action for setting up
- # MSVC, but for now, this action works:
- - name: Prepare compiler environment for Windows 🐍 2.7
- if: matrix.python == 2.7 && runner.os == 'Windows'
- uses: ilammy/msvc-dev-cmd@v1
- with:
- arch: x64
- # This makes two environment variables available in the following step(s)
- - name: Set Windows 🐍 2.7 environment variables
- if: matrix.python == 2.7 && runner.os == 'Windows'
- shell: bash
- run: |
- echo "DISTUTILS_USE_SDK=1" >> $GITHUB_ENV
- echo "MSSdk=1" >> $GITHUB_ENV
- # This makes sure the setup_helpers module can build packages using
- # setuptools
- - name: Setuptools helpers test
- run: pytest tests/extra_setuptools
- deadsnakes:
- strategy:
- fail-fast: false
- matrix:
- include:
- - python-version: 3.9
- python-debug: true
- valgrind: true
- - python-version: 3.10-dev
- python-debug: false
- name: "🐍 ${{ matrix.python-version }}${{ matrix.python-debug && '-dbg' || '' }} (deadsnakes)${{ matrix.valgrind && ' • Valgrind' || '' }} • x64"
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - name: Setup Python ${{ matrix.python-version }} (deadsnakes)
- uses: deadsnakes/action@v2.1.1
- with:
- python-version: ${{ matrix.python-version }}
- debug: ${{ matrix.python-debug }}
- - name: Update CMake
- uses: jwlawson/actions-setup-cmake@v1.8
- - name: Valgrind cache
- if: matrix.valgrind
- uses: actions/cache@v2
- id: cache-valgrind
- with:
- path: valgrind
- key: 3.16.1 # Valgrind version
- - name: Compile Valgrind
- if: matrix.valgrind && steps.cache-valgrind.outputs.cache-hit != 'true'
- run: |
- VALGRIND_VERSION=3.16.1
- curl https://sourceware.org/pub/valgrind/valgrind-$VALGRIND_VERSION.tar.bz2 -o - | tar xj
- mv valgrind-$VALGRIND_VERSION valgrind
- cd valgrind
- ./configure
- make -j 2 > /dev/null
- - name: Install Valgrind
- if: matrix.valgrind
- working-directory: valgrind
- run: |
- sudo make install
- sudo apt-get update
- sudo apt-get install libc6-dbg # Needed by Valgrind
- - name: Prepare env
- run: python -m pip install -r tests/requirements.txt --prefer-binary
- - name: Configure
- run: >
- cmake -S . -B build
- -DCMAKE_BUILD_TYPE=Debug
- -DPYBIND11_WERROR=ON
- -DDOWNLOAD_CATCH=ON
- -DDOWNLOAD_EIGEN=ON
- -DCMAKE_CXX_STANDARD=17
- - name: Build
- run: cmake --build build -j 2
- - name: Python tests
- run: cmake --build build --target pytest
- - name: C++ tests
- run: cmake --build build --target cpptest
- - name: Run Valgrind on Python tests
- if: matrix.valgrind
- run: cmake --build build --target memcheck
- # Testing on clang using the excellent silkeh clang docker images
- clang:
- runs-on: ubuntu-latest
- strategy:
- fail-fast: false
- matrix:
- clang:
- - 3.6
- - 3.7
- - 3.9
- - 7
- - 9
- - dev
- std:
- - 11
- include:
- - clang: 5
- std: 14
- - clang: 10
- std: 20
- - clang: 10
- std: 17
- name: "🐍 3 • Clang ${{ matrix.clang }} • C++${{ matrix.std }} • x64"
- container: "silkeh/clang:${{ matrix.clang }}"
- steps:
- - uses: actions/checkout@v2
- - name: Add wget and python3
- run: apt-get update && apt-get install -y python3-dev python3-numpy python3-pytest libeigen3-dev
- - name: Configure
- shell: bash
- run: >
- cmake -S . -B build
- -DPYBIND11_WERROR=ON
- -DDOWNLOAD_CATCH=ON
- -DCMAKE_CXX_STANDARD=${{ matrix.std }}
- -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
- - name: Build
- run: cmake --build build -j 2
- - name: Python tests
- run: cmake --build build --target pytest
- - name: C++ tests
- run: cmake --build build --target cpptest
- - name: Interface test
- run: cmake --build build --target test_cmake_build
- # Testing NVCC; forces sources to behave like .cu files
- cuda:
- runs-on: ubuntu-latest
- name: "🐍 3.8 • CUDA 11 • Ubuntu 20.04"
- container: nvidia/cuda:11.0-devel-ubuntu20.04
- steps:
- - uses: actions/checkout@v2
- # tzdata will try to ask for the timezone, so set the DEBIAN_FRONTEND
- - name: Install 🐍 3
- run: apt-get update && DEBIAN_FRONTEND="noninteractive" apt-get install -y cmake git python3-dev python3-pytest python3-numpy
- - name: Configure
- run: cmake -S . -B build -DPYBIND11_CUDA_TESTS=ON -DPYBIND11_WERROR=ON -DDOWNLOAD_CATCH=ON
- - name: Build
- run: cmake --build build -j2 --verbose
- - name: Python tests
- run: cmake --build build --target pytest
- # TODO: Internal compiler error - report to NVidia
- # # Testing CentOS 8 + PGI compilers
- # centos-nvhpc8:
- # runs-on: ubuntu-latest
- # name: "🐍 3 • CentOS8 / PGI 20.11 • x64"
- # container: centos:8
- #
- # steps:
- # - uses: actions/checkout@v2
- #
- # - name: Add Python 3 and a few requirements
- # run: yum update -y && yum install -y git python3-devel python3-numpy python3-pytest make environment-modules
- #
- # - name: Install CMake with pip
- # run: |
- # python3 -m pip install --upgrade pip
- # python3 -m pip install cmake --prefer-binary
- #
- # - name: Install NVidia HPC SDK
- # run: >
- # yum -y install
- # https://developer.download.nvidia.com/hpc-sdk/20.11/nvhpc-20-11-20.11-1.x86_64.rpm
- # https://developer.download.nvidia.com/hpc-sdk/20.11/nvhpc-2020-20.11-1.x86_64.rpm
- #
- # - name: Configure
- # shell: bash
- # run: |
- # source /etc/profile.d/modules.sh
- # module load /opt/nvidia/hpc_sdk/modulefiles/nvhpc/20.11
- # cmake -S . -B build -DDOWNLOAD_CATCH=ON -DCMAKE_CXX_STANDARD=14 -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
- #
- # - name: Build
- # run: cmake --build build -j 2 --verbose
- #
- # - name: Python tests
- # run: cmake --build build --target pytest
- #
- # - name: C++ tests
- # run: cmake --build build --target cpptest
- #
- # - name: Interface test
- # run: cmake --build build --target test_cmake_build
- # Testing on CentOS 7 + PGI compilers, which seems to require more workarounds
- centos-nvhpc7:
- runs-on: ubuntu-latest
- name: "🐍 3 • CentOS7 / PGI 20.9 • x64"
- container: centos:7
- steps:
- - uses: actions/checkout@v2
- - name: Add Python 3 and a few requirements
- run: yum update -y && yum install -y epel-release && yum install -y git python3-devel make environment-modules cmake3
- - name: Install NVidia HPC SDK
- run: yum -y install https://developer.download.nvidia.com/hpc-sdk/20.9/nvhpc-20-9-20.9-1.x86_64.rpm https://developer.download.nvidia.com/hpc-sdk/20.9/nvhpc-2020-20.9-1.x86_64.rpm
- # On CentOS 7, we have to filter a few tests (compiler internal error)
- # and allow deeper templete recursion (not needed on CentOS 8 with a newer
- # standard library). On some systems, you many need further workarounds:
- # https://github.com/pybind/pybind11/pull/2475
- - name: Configure
- shell: bash
- run: |
- source /etc/profile.d/modules.sh
- module load /opt/nvidia/hpc_sdk/modulefiles/nvhpc/20.9
- cmake3 -S . -B build -DDOWNLOAD_CATCH=ON \
- -DCMAKE_CXX_STANDARD=11 \
- -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") \
- -DCMAKE_CXX_FLAGS="-Wc,--pending_instantiations=0" \
- -DPYBIND11_TEST_FILTER="test_smart_ptr.cpp;test_virtual_functions.cpp"
- # Building before installing Pip should produce a warning but not an error
- - name: Build
- run: cmake3 --build build -j 2 --verbose
- - name: Install CMake with pip
- run: |
- python3 -m pip install --upgrade pip
- python3 -m pip install pytest
- - name: Python tests
- run: cmake3 --build build --target pytest
- - name: C++ tests
- run: cmake3 --build build --target cpptest
- - name: Interface test
- run: cmake3 --build build --target test_cmake_build
- # Testing on GCC using the GCC docker images (only recent images supported)
- gcc:
- runs-on: ubuntu-latest
- strategy:
- fail-fast: false
- matrix:
- gcc:
- - 7
- - latest
- std:
- - 11
- include:
- - gcc: 10
- std: 20
- name: "🐍 3 • GCC ${{ matrix.gcc }} • C++${{ matrix.std }}• x64"
- container: "gcc:${{ matrix.gcc }}"
- steps:
- - uses: actions/checkout@v1
- - name: Add Python 3
- run: apt-get update; apt-get install -y python3-dev python3-numpy python3-pytest python3-pip libeigen3-dev
- - name: Update pip
- run: python3 -m pip install --upgrade pip
- - name: Update CMake
- uses: jwlawson/actions-setup-cmake@v1.8
- - name: Configure
- shell: bash
- run: >
- cmake -S . -B build
- -DPYBIND11_WERROR=ON
- -DDOWNLOAD_CATCH=ON
- -DCMAKE_CXX_STANDARD=${{ matrix.std }}
- -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
- - name: Build
- run: cmake --build build -j 2
- - name: Python tests
- run: cmake --build build --target pytest
- - name: C++ tests
- run: cmake --build build --target cpptest
- - name: Interface test
- run: cmake --build build --target test_cmake_build
- # Testing on ICC using the oneAPI apt repo
- icc:
- runs-on: ubuntu-20.04
- strategy:
- fail-fast: false
- name: "🐍 3 • ICC latest • x64"
- steps:
- - uses: actions/checkout@v2
- - name: Add apt repo
- run: |
- sudo apt-get update
- sudo apt-get install -y wget build-essential pkg-config cmake ca-certificates gnupg
- wget https://apt.repos.intel.com/intel-gpg-keys/GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
- sudo apt-key add GPG-PUB-KEY-INTEL-SW-PRODUCTS-2023.PUB
- echo "deb https://apt.repos.intel.com/oneapi all main" | sudo tee /etc/apt/sources.list.d/oneAPI.list
- - name: Add ICC & Python 3
- run: sudo apt-get update; sudo apt-get install -y intel-oneapi-compiler-dpcpp-cpp-and-cpp-classic cmake python3-dev python3-numpy python3-pytest python3-pip
- - name: Update pip
- run: |
- set +e; source /opt/intel/oneapi/setvars.sh; set -e
- python3 -m pip install --upgrade pip
- - name: Install dependencies
- run: |
- set +e; source /opt/intel/oneapi/setvars.sh; set -e
- python3 -m pip install -r tests/requirements.txt --prefer-binary
- - name: Configure C++11
- run: |
- set +e; source /opt/intel/oneapi/setvars.sh; set -e
- cmake -S . -B build-11 \
- -DPYBIND11_WERROR=ON \
- -DDOWNLOAD_CATCH=ON \
- -DDOWNLOAD_EIGEN=OFF \
- -DCMAKE_CXX_STANDARD=11 \
- -DCMAKE_CXX_COMPILER=$(which icpc) \
- -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
- - name: Build C++11
- run: |
- set +e; source /opt/intel/oneapi/setvars.sh; set -e
- cmake --build build-11 -j 2 -v
- - name: Python tests C++11
- run: |
- set +e; source /opt/intel/oneapi/setvars.sh; set -e
- sudo service apport stop
- cmake --build build-11 --target check
- - name: C++ tests C++11
- run: |
- set +e; source /opt/intel/oneapi/setvars.sh; set -e
- cmake --build build-11 --target cpptest
- - name: Interface test C++11
- run: |
- set +e; source /opt/intel/oneapi/setvars.sh; set -e
- cmake --build build-11 --target test_cmake_build
- - name: Configure C++17
- run: |
- set +e; source /opt/intel/oneapi/setvars.sh; set -e
- cmake -S . -B build-17 \
- -DPYBIND11_WERROR=ON \
- -DDOWNLOAD_CATCH=ON \
- -DDOWNLOAD_EIGEN=OFF \
- -DCMAKE_CXX_STANDARD=17 \
- -DCMAKE_CXX_COMPILER=$(which icpc) \
- -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
- - name: Build C++17
- run: |
- set +e; source /opt/intel/oneapi/setvars.sh; set -e
- cmake --build build-17 -j 2 -v
- - name: Python tests C++17
- run: |
- set +e; source /opt/intel/oneapi/setvars.sh; set -e
- sudo service apport stop
- cmake --build build-17 --target check
- - name: C++ tests C++17
- run: |
- set +e; source /opt/intel/oneapi/setvars.sh; set -e
- cmake --build build-17 --target cpptest
- - name: Interface test C++17
- run: |
- set +e; source /opt/intel/oneapi/setvars.sh; set -e
- 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).
- centos:
- runs-on: ubuntu-latest
- strategy:
- fail-fast: false
- matrix:
- centos:
- - 7 # GCC 4.8
- - 8
- name: "🐍 3 • CentOS ${{ matrix.centos }} • x64"
- container: "centos:${{ matrix.centos }}"
- steps:
- - uses: actions/checkout@v2
- - name: Add Python 3
- run: yum update -y && yum install -y python3-devel gcc-c++ make git
- - name: Update pip
- run: python3 -m pip install --upgrade pip
- - name: Install dependencies
- run: python3 -m pip install cmake -r tests/requirements.txt --prefer-binary
- - name: Configure
- shell: bash
- run: >
- cmake -S . -B build
- -DPYBIND11_WERROR=ON
- -DDOWNLOAD_CATCH=ON
- -DDOWNLOAD_EIGEN=ON
- -DCMAKE_CXX_STANDARD=11
- -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
- - name: Build
- run: cmake --build build -j 2
- - name: Python tests
- run: cmake --build build --target pytest
- - name: C++ tests
- run: cmake --build build --target cpptest
- - name: Interface test
- run: cmake --build build --target test_cmake_build
- # This tests an "install" with the CMake tools
- install-classic:
- name: "🐍 3.5 • Debian • x86 • Install"
- runs-on: ubuntu-latest
- container: i386/debian:stretch
- steps:
- - uses: actions/checkout@v1
- - name: Install requirements
- run: |
- apt-get update
- apt-get install -y git make cmake g++ libeigen3-dev python3-dev python3-pip
- pip3 install "pytest==3.1.*"
- - name: Configure for install
- run: >
- cmake .
- -DPYBIND11_INSTALL=1 -DPYBIND11_TEST=0
- -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
- - name: Make and install
- run: make install
- - name: Copy tests to new directory
- run: cp -a tests /pybind11-tests
- - name: Make a new test directory
- run: mkdir /build-tests
- - name: Configure tests
- run: >
- cmake ../pybind11-tests
- -DDOWNLOAD_CATCH=ON
- -DPYBIND11_WERROR=ON
- -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
- working-directory: /build-tests
- - name: Run tests
- run: make pytest -j 2
- working-directory: /build-tests
- # This verifies that the documentation is not horribly broken, and does a
- # basic sanity check on the SDist.
- doxygen:
- name: "Documentation build test"
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v2
- - uses: actions/setup-python@v2
- - name: Install Doxygen
- run: sudo apt-get install -y doxygen librsvg2-bin # Changed to rsvg-convert in 20.04
- - name: Install docs & setup requirements
- run: python3 -m pip install -r docs/requirements.txt
- - name: Build docs
- run: python3 -m sphinx -W -b html docs docs/.build
- - name: Make SDist
- run: python3 setup.py sdist
- - run: git status --ignored
- - name: Check local include dir
- run: >
- ls pybind11;
- python3 -c "import pybind11, pathlib; assert (a := pybind11.get_include()) == (b := str(pathlib.Path('include').resolve())), f'{a} != {b}'"
- - name: Compare Dists (headers only)
- working-directory: include
- run: |
- python3 -m pip install --user -U ../dist/*
- installed=$(python3 -c "import pybind11; print(pybind11.get_include() + '/pybind11')")
- diff -rq $installed ./pybind11
- win32:
- strategy:
- fail-fast: false
- matrix:
- python:
- - 3.5
- - 3.6
- - 3.7
- - 3.8
- - 3.9
- - pypy3
- # TODO: fix hang on pypy2
- include:
- - python: 3.9
- args: -DCMAKE_CXX_STANDARD=20 -DDOWNLOAD_EIGEN=OFF
- - python: 3.8
- args: -DCMAKE_CXX_STANDARD=17
- name: "🐍 ${{ matrix.python }} • MSVC 2019 • x86 ${{ matrix.args }}"
- runs-on: windows-latest
- steps:
- - uses: actions/checkout@v2
- - name: Setup Python ${{ matrix.python }}
- uses: actions/setup-python@v2
- with:
- python-version: ${{ matrix.python }}
- architecture: x86
- - name: Update CMake
- uses: jwlawson/actions-setup-cmake@v1.8
- - name: Prepare MSVC
- uses: ilammy/msvc-dev-cmd@v1
- with:
- arch: x86
- - name: Prepare env
- run: python -m pip install -r tests/requirements.txt --prefer-binary
- # First build - C++11 mode and inplace
- - name: Configure ${{ matrix.args }}
- run: >
- cmake -S . -B build
- -G "Visual Studio 16 2019" -A Win32
- -DPYBIND11_WERROR=ON
- -DDOWNLOAD_CATCH=ON
- -DDOWNLOAD_EIGEN=ON
- ${{ matrix.args }}
- - name: Build C++11
- run: cmake --build build -j 2
- - name: Run tests
- run: cmake --build build -t pytest
- win32-msvc2015:
- name: "🐍 ${{ matrix.python }} • MSVC 2015 • x64"
- runs-on: windows-latest
- strategy:
- fail-fast: false
- matrix:
- python:
- - 2.7
- - 3.6
- - 3.7
- # todo: check/cpptest does not support 3.8+ yet
- steps:
- - uses: actions/checkout@v2
- - name: Setup 🐍 ${{ matrix.python }}
- uses: actions/setup-python@v2
- with:
- python-version: ${{ matrix.python }}
- - name: Update CMake
- uses: jwlawson/actions-setup-cmake@v1.8
- - name: Prepare MSVC
- uses: ilammy/msvc-dev-cmd@v1
- with:
- toolset: 14.0
- - name: Prepare env
- run: python -m pip install -r tests/requirements.txt --prefer-binary
- # First build - C++11 mode and inplace
- - name: Configure
- run: >
- cmake -S . -B build
- -G "Visual Studio 14 2015" -A x64
- -DPYBIND11_WERROR=ON
- -DDOWNLOAD_CATCH=ON
- -DDOWNLOAD_EIGEN=ON
- - name: Build C++14
- run: cmake --build build -j 2
- - name: Run all checks
- run: cmake --build build -t check
- win32-msvc2017:
- name: "🐍 ${{ matrix.python }} • MSVC 2017 • x64"
- runs-on: windows-2016
- strategy:
- fail-fast: false
- matrix:
- python:
- - 2.7
- - 3.5
- - 3.7
- std:
- - 14
- include:
- - python: 2.7
- std: 17
- args: >
- -DCMAKE_CXX_FLAGS="/permissive- /EHsc /GR"
- steps:
- - uses: actions/checkout@v2
- - name: Setup 🐍 ${{ matrix.python }}
- uses: actions/setup-python@v2
- with:
- python-version: ${{ matrix.python }}
- - name: Update CMake
- uses: jwlawson/actions-setup-cmake@v1.8
- - name: Prepare env
- run: python -m pip install -r tests/requirements.txt --prefer-binary
- # First build - C++11 mode and inplace
- - name: Configure
- run: >
- cmake -S . -B build
- -G "Visual Studio 15 2017" -A x64
- -DPYBIND11_WERROR=ON
- -DDOWNLOAD_CATCH=ON
- -DDOWNLOAD_EIGEN=ON
- -DCMAKE_CXX_STANDARD=${{ matrix.std }}
- ${{ matrix.args }}
- - name: Build ${{ matrix.std }}
- run: cmake --build build -j 2
- - name: Run all checks
- run: cmake --build build -t check
|