Debian Codegraph @

.github/workflows/build_primary_wheels.yml

raw
1 name: Build primary wheels
2
3 on:
4 push:
5 branches:
6 - master
7 tags:
8 - v*
9 pull_request:
10 paths:
11 - '**'
12
13 jobs:
14 build_wheels:
15 name: Build primary wheels on ${{ matrix.os }}
16 runs-on: ${{ matrix.os }}
17 strategy:
18 matrix:
19 include:
20 - os: ubuntu-latest
21 cibw_archs: "native"
22 - os: windows-latest
23 cibw_archs: "native"
24
25 steps:
26 - uses: actions/checkout@v3
27
28 - name: Build wheels
29 uses: pypa/[email protected]
30 env:
31 CIBW_ARCHS: ${{ matrix.cibw_archs }}
32 CIBW_SKIP: "cp311-* cp312-* pp*"
33 CIBW_TEST_REQUIRES: pytest
34 CIBW_TEST_COMMAND: >
35 python -X faulthandler {package}/test/debug.py &&
36 python -X faulthandler -m pytest -p no:faulthandler -s {package}
37
38 - uses: actions/upload-artifact@v3
39 with:
40 path: ./wheelhouse/*.whl
41
42 build_pure_py:
43 name: Build and test pure py wheels
44 runs-on: ubuntu-latest
45 strategy:
46 matrix:
47 include:
48 - tag: py311
49 version: 3.11
50 - tag: py312
51 version: 3.12
52 - tag: py313
53 version: 3.13
54
55 steps:
56 - uses: actions/checkout@v4
57
58 - name: Set up Python
59 uses: actions/setup-python@v5
60 with:
61 python-version: "${{ matrix.version }}"
62
63 - name: Install dependencies
64 run: pip install -U pip setuptools wheel pytest pytest-cov
65
66 - name: Build module
67 run: FROZENDICT_PURE_PY=1 python setup.py bdist_wheel
68
69 - name: Change tag to wheel
70 run: python -m wheel tags --python-tag=${{ matrix.tag }} --remove dist/*
71
72 - name: Install module
73 run: pip install dist/*
74
75 - name: Test with pytest
76 run: pytest --cov=frozendict --cov-report=term-missing --cov-branch --cov-fail-under=100
77
78 - uses: actions/upload-artifact@v3
79 with:
80 path: ./dist/*