feat: starting serialization #2241
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- master | |
- develop | |
env: | |
FORCE_COLOR: 3 | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
clang-tidy: | |
name: Clang-Tidy | |
runs-on: ubuntu-latest | |
container: silkeh/clang:18-bookworm | |
steps: | |
- name: Install requirements | |
run: apt-get update && apt-get install -y python3-dev python3-pip git | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Install extra requirements | |
run: python3 -m pip install setuptools_scm --break-system-packages | |
- name: Configure | |
run: cmake -S. -Bbuild -DCMAKE_CXX_CLANG_TIDY="$(which clang-tidy);--warnings-as-errors=*" | |
- name: Build | |
run: cmake --build build -j 4 | |
pylint: | |
runs-on: ubuntu-latest | |
name: PyLint | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- name: Run PyLint | |
run: pipx run nox[uv] -s pylint -- --output-format=github | |
cmake: | |
name: CMake 🐍 ${{ matrix.python-version }} | |
runs-on: ubuntu-latest | |
env: | |
PIP_ONLY_BINARY: numpy | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.11", "3.13", "pypy3.10"] | |
include: | |
- python-version: "3.9" | |
cmake-extras: "-DCMAKE_CXX_STANDARD=17" | |
- python-version: "3.13t" | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: true | |
- uses: actions/setup-python@v5 | |
with: | |
python-version: ${{ matrix.python-version }} | |
allow-prereleases: true | |
- uses: rui314/setup-mold@v1 | |
- uses: astral-sh/setup-uv@v5 | |
- uses: hendrikmuhs/[email protected] | |
with: | |
key: ${{ matrix.python-version }} | |
create-symlink: true | |
- name: Install python tools | |
run: uv pip install --system --python=python --group dev pytest-github-actions-annotate-failures | |
- name: Also install hdf5 if supported | |
if: matrix.python-version == '3.11' || matrix.python-version == '3.13' | |
run: uv pip install --system --python=python h5py | |
- name: Configure | |
run: cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Debug -DBOOST_HISTOGRAM_ERRORS=ON ${{ matrix.cmake-extras }} | |
- name: Build | |
run: cmake --build build -j 4 | |
- name: Test | |
working-directory: ./build | |
run: python -m pytest -ra | |
build_wheels: | |
name: ${{ matrix.only }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- os: ubuntu-latest | |
only: cp313t-manylinux_x86_64 | |
- os: ubuntu-24.04-arm | |
only: cp313-manylinux_aarch64 | |
- os: windows-latest | |
only: cp39-win32 | |
- os: windows-latest | |
only: cp313-win_amd64 | |
- os: macos-13 | |
only: cp310-macosx_x86_64 | |
- os: macos-14 | |
only: cp312-macosx_arm64 | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true | |
fetch-depth: 0 | |
- uses: astral-sh/setup-uv@v5 | |
- uses: pypa/[email protected] | |
with: | |
only: "${{ matrix.only }}" | |
env: | |
CIBW_BUILD_VERBOSITY: 1 | |
- uses: actions/upload-artifact@v4 | |
with: | |
path: wheelhouse/* | |
name: test-wheels-${{ strategy.job-index }} | |
- name: Check wheels | |
run: pipx run twine check wheelhouse/* | |
shell: bash | |
pass: | |
if: always() | |
needs: [clang-tidy, pylint, cmake, build_wheels] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: re-actors/alls-green@release/v1 | |
with: | |
jobs: ${{ toJSON(needs) }} |