-
Notifications
You must be signed in to change notification settings - Fork 22
121 lines (96 loc) · 2.8 KB
/
tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
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:15-bullseye
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
- name: Configure
run: cmake -S . -B build -DCMAKE_CXX_CLANG_TIDY="$(which clang-tidy);--warnings-as-errors=*"
- name: Build
run: cmake --build build -j 2
pylint:
runs-on: ubuntu-latest
name: PyLint
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- name: Run PyLint
run: |
echo "::add-matcher::$GITHUB_WORKSPACE/.github/matchers/pylint.json"
pipx run nox -s pylint
cmake:
runs-on: ubuntu-latest
env:
PIP_ONLY_BINARY: numpy
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.9", "3.12", "pypy3.9"]
include:
- python-version: "3.8"
cmake-extras: "-DCMAKE_CXX_STANDARD=17"
name: CMake Python ${{ matrix.python-version }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: true
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install python tools
run: python -m pip install -r dev-requirements.txt pytest-github-actions-annotate-failures
- name: Configure
run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Debug -DBOOST_HISTOGRAM_ERRORS=ON ${{ matrix.cmake-extras }}
- name: Build
run: cmake --build build -j 2
- name: Test
working-directory: ./build
run: python -m pytest -ra
build_wheels:
name: Wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-2019, macos-latest]
steps:
- uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- uses: pypa/[email protected]
env:
CIBW_BUILD: cp38-win32 cp312-manylinux_x86_64 cp37-macosx_x86_64
CIBW_BUILD_VERBOSITY: 1
CIBW_ENVIRONMENT: "PIP_ONLY_BINARY=:all:"
- uses: actions/upload-artifact@v3
with:
path: wheelhouse/*
- name: Check wheels
run: pipx run twine check wheelhouse/*
shell: bash