2020-07-22 14:24:11 +00:00
|
|
|
name: CI
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- stable
|
|
|
|
- v*
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
standard:
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
2020-07-26 22:17:11 +00:00
|
|
|
runs-on: [ubuntu-latest, windows-latest, macos-latest]
|
2020-07-26 22:42:53 +00:00
|
|
|
arch: [x64]
|
|
|
|
max-cxx-std: [17]
|
2020-07-22 14:24:11 +00:00
|
|
|
python:
|
|
|
|
- 2.7
|
|
|
|
- 3.5
|
|
|
|
- 3.8
|
|
|
|
- 3.9-dev
|
|
|
|
- pypy2
|
|
|
|
- pypy3
|
|
|
|
|
|
|
|
include:
|
2020-07-26 22:17:11 +00:00
|
|
|
- runs-on: ubuntu-latest
|
2020-07-22 14:24:11 +00:00
|
|
|
python: 3.6
|
2020-07-26 22:42:53 +00:00
|
|
|
arch: x64
|
|
|
|
max-cxx-std: 17
|
2020-07-26 22:17:11 +00:00
|
|
|
- runs-on: macos-latest
|
|
|
|
python: 3.7
|
2020-07-26 22:42:53 +00:00
|
|
|
arch: x64
|
|
|
|
max-cxx-std: 17
|
2020-07-26 22:17:11 +00:00
|
|
|
- runs-on: windows-2016
|
2020-07-22 14:24:11 +00:00
|
|
|
python: 3.7
|
2020-07-26 22:42:53 +00:00
|
|
|
arch: x86
|
|
|
|
max-cxx-std: 14
|
2020-07-22 14:24:11 +00:00
|
|
|
|
|
|
|
exclude:
|
|
|
|
# Currently 32bit only, and we build 64bit
|
2020-07-26 22:17:11 +00:00
|
|
|
- runs-on: windows-latest
|
2020-07-22 14:24:11 +00:00
|
|
|
python: pypy2
|
2020-07-26 22:42:53 +00:00
|
|
|
arch: x64
|
|
|
|
max-cxx-std: 17
|
2020-07-26 22:17:11 +00:00
|
|
|
- runs-on: windows-latest
|
2020-07-22 14:24:11 +00:00
|
|
|
python: pypy3
|
2020-07-26 22:42:53 +00:00
|
|
|
arch: x64
|
|
|
|
max-cxx-std: 17
|
2020-07-22 14:24:11 +00:00
|
|
|
|
|
|
|
# Currently can't build due to warning, fixed in CPython > 3.9b5
|
2020-07-26 22:17:11 +00:00
|
|
|
- runs-on: macos-latest
|
2020-07-22 14:24:11 +00:00
|
|
|
python: 3.9-dev
|
2020-07-26 22:42:53 +00:00
|
|
|
arch: x64
|
|
|
|
max-cxx-std: 17
|
2020-07-22 14:24:11 +00:00
|
|
|
|
|
|
|
# Currently broken on embed_test
|
2020-07-26 22:17:11 +00:00
|
|
|
- runs-on: windows-latest
|
2020-07-22 14:24:11 +00:00
|
|
|
python: 3.8
|
2020-07-26 22:42:53 +00:00
|
|
|
arch: x64
|
|
|
|
max-cxx-std: 17
|
2020-07-26 22:17:11 +00:00
|
|
|
- runs-on: windows-latest
|
2020-07-22 14:24:11 +00:00
|
|
|
python: 3.9-dev
|
2020-07-26 22:42:53 +00:00
|
|
|
arch: x64
|
|
|
|
max-cxx-std: 17
|
2020-07-22 14:24:11 +00:00
|
|
|
|
2020-07-26 22:42:53 +00:00
|
|
|
name: "🐍 ${{ matrix.python }} • ${{ matrix.runs-on }} • ${{ matrix.arch }}"
|
2020-07-26 22:17:11 +00:00
|
|
|
runs-on: ${{ matrix.runs-on }}
|
2020-07-22 14:24:11 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Setup Python ${{ matrix.python }}
|
|
|
|
uses: actions/setup-python@v2
|
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python }}
|
2020-07-26 22:42:53 +00:00
|
|
|
architecture: ${{ matrix.arch }}
|
2020-07-22 14:24:11 +00:00
|
|
|
|
2020-07-24 15:45:22 +00:00
|
|
|
- name: Cache wheels
|
|
|
|
if: startsWith(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
|
2020-07-27 00:25:21 +00:00
|
|
|
key: ${{ runner.os }}-pip-${{ matrix.python }}-${{ matrix.arch }}-${{ hashFiles('tests/requirements.txt') }}
|
2020-07-24 15:45:22 +00:00
|
|
|
|
2020-07-22 14:24:11 +00:00
|
|
|
- name: Prepare env
|
|
|
|
run: python -m pip install -r tests/requirements.txt
|
|
|
|
|
2020-07-24 00:30:47 +00:00
|
|
|
- name: Configure C++11
|
2020-07-22 14:24:11 +00:00
|
|
|
shell: bash
|
|
|
|
run: >
|
|
|
|
cmake -S . -B build
|
|
|
|
-DPYBIND11_WERROR=ON
|
|
|
|
-DDOWNLOAD_CATCH=ON
|
2020-07-26 17:44:10 +00:00
|
|
|
-DDOWNLOAD_EIGEN=ON
|
2020-07-24 00:30:47 +00:00
|
|
|
-DCMAKE_CXX_STANDARD=11
|
|
|
|
-DPYTHON_EXECUTABLE=$(python -c "import sys; print(sys.executable)")
|
|
|
|
|
|
|
|
- name: Build C++11
|
|
|
|
run: cmake --build build -j 2
|
|
|
|
|
|
|
|
- name: Python tests C++11
|
2020-07-30 20:04:26 +00:00
|
|
|
run: cmake --build build --target pytest -j 2
|
2020-07-24 00:30:47 +00:00
|
|
|
|
|
|
|
- name: C++11 tests
|
2020-07-30 20:04:26 +00:00
|
|
|
run: cmake --build build --target cpptest -j 2
|
2020-07-24 00:30:47 +00:00
|
|
|
|
|
|
|
- name: Interface test C++11
|
|
|
|
run: cmake --build build --target test_cmake_build
|
|
|
|
|
2020-07-26 22:42:53 +00:00
|
|
|
- name: Configure C++${{ matrix.max-cxx-std }}
|
2020-07-24 00:30:47 +00:00
|
|
|
shell: bash
|
|
|
|
run: >
|
2020-07-26 22:42:53 +00:00
|
|
|
cmake -S . -B build2
|
2020-07-30 00:10:38 +00:00
|
|
|
-DPYBIND11_WERROR=ON
|
2020-07-24 00:30:47 +00:00
|
|
|
-DDOWNLOAD_CATCH=ON
|
2020-07-26 17:44:10 +00:00
|
|
|
-DDOWNLOAD_EIGEN=ON
|
2020-07-26 22:42:53 +00:00
|
|
|
-DCMAKE_CXX_STANDARD=${{ matrix.max-cxx-std }}
|
2020-07-22 14:24:11 +00:00
|
|
|
-DPYTHON_EXECUTABLE=$(python -c "import sys; print(sys.executable)")
|
|
|
|
|
2020-07-26 22:42:53 +00:00
|
|
|
- name: Build C++${{ matrix.max-cxx-std }}
|
2020-07-30 20:04:26 +00:00
|
|
|
run: cmake --build build2 -j 2
|
2020-07-24 00:30:47 +00:00
|
|
|
|
2020-07-26 22:42:53 +00:00
|
|
|
- name: Python tests C++${{ matrix.max-cxx-std }}
|
|
|
|
run: cmake --build build2 --target pytest
|
2020-07-24 00:30:47 +00:00
|
|
|
|
2020-07-26 22:42:53 +00:00
|
|
|
- name: C++${{ matrix.max-cxx-std }} tests
|
|
|
|
run: cmake --build build2 --target cpptest
|
2020-07-24 00:30:47 +00:00
|
|
|
|
2020-07-26 22:42:53 +00:00
|
|
|
- name: Interface test C++${{ matrix.max-cxx-std }}
|
|
|
|
run: cmake --build build2 --target test_cmake_build
|
2020-07-24 00:30:47 +00:00
|
|
|
|
|
|
|
clang:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
clang:
|
|
|
|
- 3.6
|
|
|
|
- 3.7
|
|
|
|
- 3.9
|
|
|
|
- 5
|
|
|
|
- 7
|
|
|
|
- 9
|
|
|
|
- dev
|
|
|
|
|
2020-07-26 22:42:53 +00:00
|
|
|
name: "🐍 3 • Clang ${{ matrix.clang }} • x64"
|
2020-07-24 00:30:47 +00:00
|
|
|
container: "silkeh/clang:${{ matrix.clang }}"
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Add wget and python3
|
2020-07-26 17:44:10 +00:00
|
|
|
run: apt-get update && apt-get install -y python3-dev python3-numpy python3-pytest libeigen3-dev
|
2020-07-24 00:30:47 +00:00
|
|
|
|
|
|
|
- name: Configure
|
|
|
|
shell: bash
|
|
|
|
run: >
|
|
|
|
cmake -S . -B build
|
|
|
|
-DPYBIND11_WERROR=ON
|
|
|
|
-DDOWNLOAD_CATCH=ON
|
|
|
|
-DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)")
|
|
|
|
|
2020-07-22 14:24:11 +00:00
|
|
|
- name: Build
|
|
|
|
run: cmake --build build -j 2
|
|
|
|
|
|
|
|
- name: Python tests
|
2020-07-24 00:30:47 +00:00
|
|
|
run: cmake --build build --target pytest
|
2020-07-22 14:24:11 +00:00
|
|
|
|
|
|
|
- name: C++ tests
|
2020-07-24 00:30:47 +00:00
|
|
|
run: cmake --build build --target cpptest
|
2020-07-22 14:24:11 +00:00
|
|
|
|
|
|
|
- name: Interface test
|
|
|
|
run: cmake --build build --target test_cmake_build
|
2020-07-26 17:54:11 +00:00
|
|
|
|
|
|
|
gcc:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
gcc:
|
|
|
|
- 7
|
|
|
|
- latest
|
|
|
|
|
2020-07-26 22:42:53 +00:00
|
|
|
name: "🐍 3 • GCC ${{ matrix.gcc }} • x64"
|
2020-07-26 17:54:11 +00:00
|
|
|
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: Setup CMake 3.18
|
|
|
|
uses: jwlawson/actions-setup-cmake@v1.3
|
|
|
|
with:
|
|
|
|
cmake-version: 3.18
|
|
|
|
|
|
|
|
- name: Configure
|
|
|
|
shell: bash
|
|
|
|
run: >
|
|
|
|
cmake -S . -B build
|
|
|
|
-DPYBIND11_WERROR=ON
|
|
|
|
-DDOWNLOAD_CATCH=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
|
|
|
|
|
|
|
|
centos:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
centos:
|
|
|
|
- 7 # GCC 4.8
|
|
|
|
- 8
|
|
|
|
|
2020-07-26 22:42:53 +00:00
|
|
|
name: "🐍 3 • CentOS ${{ matrix.centos }} • x64"
|
2020-07-26 17:54:11 +00:00
|
|
|
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
|
|
|
|
|
|
|
|
- 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
|
2020-07-26 18:15:20 +00:00
|
|
|
|
|
|
|
install-classic:
|
2020-07-26 22:42:53 +00:00
|
|
|
name: "🐍 3.5 • Debian • x86 • Install"
|
2020-07-26 18:15:20 +00:00
|
|
|
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 python3-pytest
|
|
|
|
|
|
|
|
- name: Configure for install
|
|
|
|
run: cmake -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") -DPYBIND11_INSTALL=1 -DPYBIND11_TEST=0 .
|
|
|
|
|
|
|
|
- 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 -DPYTHON_EXECUTABLE=$(python3 -c "import sys; print(sys.executable)") ../pybind11-tests -DPYBIND11_WERROR=ON
|
|
|
|
working-directory: /build-tests
|
|
|
|
|
|
|
|
- name: Run tests
|
|
|
|
run: make pytest -j 2
|
|
|
|
working-directory: /build-tests
|
2020-07-26 18:37:39 +00:00
|
|
|
|
|
|
|
|
|
|
|
doxygen:
|
2020-07-26 22:17:11 +00:00
|
|
|
name: "Documentation build test"
|
2020-07-26 18:37:39 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
container: alpine:3.12
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v2
|
|
|
|
|
|
|
|
- name: Install requirements
|
|
|
|
run: apk add doxygen python3-dev
|
|
|
|
|
|
|
|
- name: Ensure pip
|
|
|
|
run: python3 -m ensurepip
|
|
|
|
|
|
|
|
- name: Install python docs requirements
|
|
|
|
run: python3 -m pip install "sphinx<3" sphinx_rtd_theme breathe==4.13.1 pytest setuptools
|
|
|
|
|
|
|
|
- name: Build docs
|
|
|
|
run: python3 -m sphinx -W -b html docs docs/.build
|
|
|
|
|
|
|
|
- name: Make SDist
|
|
|
|
run: python3 setup.py sdist
|
|
|
|
|
|
|
|
- name: Compare Dists (headers only)
|
|
|
|
run: |
|
|
|
|
python3 -m pip install --user -U ./dist/*
|
|
|
|
installed=$(python3 -c "import pybind11; print(pybind11.get_include(True) + '/pybind11')")
|
|
|
|
diff -rq $installed ./include/pybind11
|