-
Notifications
You must be signed in to change notification settings - Fork 4
71 lines (61 loc) · 2.12 KB
/
ci.yaml
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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
run-tests:
name: Run tests for ${{ matrix.python-version }}-${{ matrix.os-platform[1] }}
runs-on: ${{ matrix.os-platform[0] }}
timeout-minutes: 30
env:
CIBW_BUILD_FRONTEND: "build[uv]"
strategy:
fail-fast: false
matrix:
python-version: [39, 310, 311, 312, 313]
os-platform:
[
[ubuntu-latest, manylinux_x86_64],
[ubuntu-latest, manylinux_aarch64],
[windows-latest, win_amd64],
[macos-12, macosx_x86_64],
[macos-14, macosx_arm64],
]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
submodules: "true"
- name: Set up QEMU
if: matrix.os-platform[1] == 'manylinux_aarch64'
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0
with:
platforms: arm64
- name: Set up uv
uses: astral-sh/setup-uv@3b9817b1bf26186f03ab8277bab9b827ea5cc254 # v3.2.0
- name: Build wheels and run tests
uses: pypa/cibuildwheel@7940a4c0e76eb2030e473a5f864f291f63ee879b # v2.21.3
env:
CIBW_BUILD: cp${{ matrix.python-version }}-${{ matrix.os-platform[1] }}
CIBW_TEST_COMMAND: pytest {project}/tests -k "not efficiency"
run_benchmarks:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # 4.2.2
with:
submodules: "true"
- uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # 5.3.0
with:
python-version: "3.12"
- name: Install dependencies
run: pip install uv && uv pip install --system ".[dev]" pytest-codspeed
- name: Run benchmarks
uses: CodSpeedHQ/action@b587655f756aab640e742fec141261bc6f0a569d # 3.0.1
with:
token: ${{ secrets.CODESPEED_TOKEN }}
run: pytest tests/test_efficiency.py --codspeed