-
Notifications
You must be signed in to change notification settings - Fork 5
94 lines (78 loc) · 2.07 KB
/
build_wheels.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
name: Build
on:
pull_request:
paths:
- ".clang-format"
- ".clang-tidy"
- ".github/workflows/build_wheels.yml"
- ".gitmodules"
- "clp_ffi_py/**"
- "MANIFEST.in"
- "pyproject.toml"
- "README.md"
- "requirements-dev.txt"
- "setup.py"
- "src/**"
- "tests/**"
push:
paths:
- ".clang-format"
- ".clang-tidy"
- ".github/workflows/build_wheels.yml"
- ".gitmodules"
- "clp_ffi_py/**"
- "MANIFEST.in"
- "pyproject.toml"
- "README.md"
- "requirements-dev.txt"
- "setup.py"
- "src/**"
- "tests/**"
concurrency:
group: "${{github.workflow}}-${{github.ref}}"
# Cancel in-progress jobs for efficiency
cancel-in-progress: true
jobs:
linters:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: "3.11"
- run: |
pip install --upgrade pip
pip install -r requirements-dev.txt
- run: docformatter --check --diff clp_ffi_py tests
- run: black --diff --check clp_ffi_py tests
- run: ruff check --output-format=github clp_ffi_py tests
- run: mypy clp_ffi_py tests
- run: |
find src/clp_ffi_py/ -type f | xargs clang-format --dry-run --Werror
build_wheels:
needs: [linters]
name: Build wheels on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-22.04, macos-12]
steps:
- uses: actions/checkout@v3
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive
- name: Set up QEMU
if: runner.os == 'Linux'
uses: docker/setup-qemu-action@v2
with:
platforms: all
- name: Build wheels
uses: pypa/[email protected]
env:
CIBW_ARCHS_LINUX: auto aarch64
MACOSX_DEPLOYMENT_TARGET: 10.15
- uses: actions/upload-artifact@v3
with:
name: wheel-${{ matrix.os }}
path: ./wheelhouse/*.whl