mirror of
https://github.com/pybind/pybind11.git
synced 2026-05-05 14:11:43 +00:00
ci: list all jobs explicitly
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
This commit is contained in:
committed by
Henry Schreiner
parent
5dff3354fc
commit
ef2ad42d2d
80
.github/workflows/reusable-standard.yml
vendored
Normal file
80
.github/workflows/reusable-standard.yml
vendored
Normal file
@@ -0,0 +1,80 @@
|
||||
name: Reusable Standard Test
|
||||
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
python-version:
|
||||
required: true
|
||||
type: string
|
||||
cmake-args:
|
||||
required: false
|
||||
type: string
|
||||
default: ''
|
||||
runs-on:
|
||||
required: true
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
standard:
|
||||
name: 🧪
|
||||
runs-on: ${{ inputs.runs-on }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Python ${{ inputs.python-version }}
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ inputs.python-version }}
|
||||
allow-prereleases: true
|
||||
|
||||
- name: Setup Boost (Linux)
|
||||
if: runner.os == 'Linux'
|
||||
run: sudo apt-get install libboost-dev
|
||||
|
||||
- name: Setup Boost (macOS)
|
||||
if: runner.os == 'macOS'
|
||||
run: brew install boost
|
||||
|
||||
- name: Install uv
|
||||
uses: astral-sh/setup-uv@v6
|
||||
with:
|
||||
enable-cache: true
|
||||
|
||||
- name: Prepare env
|
||||
run: uv pip install --python=python --system -r tests/requirements.txt
|
||||
|
||||
- name: Setup annotations on Linux
|
||||
if: runner.os == 'Linux'
|
||||
run: uv pip install --python=python --system pytest-github-actions-annotate-failures
|
||||
|
||||
# TODO Resolve Windows Ninja shared object issue on Python 3.8+
|
||||
- name: Use Ninja except on Windows
|
||||
if: runner.os != 'Windows'
|
||||
run: echo "CMAKE_GENERATOR=Ninja" >> "$GITHUB_ENV"
|
||||
|
||||
- name: Configure
|
||||
run: >
|
||||
cmake -S. -Bbuild -Werror=dev
|
||||
-DPYBIND11_WERROR=ON
|
||||
-DPYBIND11_PYTEST_ARGS=-v
|
||||
-DDOWNLOAD_CATCH=ON
|
||||
-DDOWNLOAD_EIGEN=ON
|
||||
${{ inputs.cmake-args }}
|
||||
|
||||
- name: Build
|
||||
run: cmake --build build
|
||||
|
||||
- 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
|
||||
|
||||
- name: Setuptools helpers test
|
||||
run: |
|
||||
uv pip install --python=python --system setuptools
|
||||
pytest tests/extra_setuptools
|
||||
Reference in New Issue
Block a user