-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (53 loc) · 1.79 KB
/
Copy pathci.yml
File metadata and controls
62 lines (53 loc) · 1.79 KB
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
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
test-rdma-build:
name: build (libibverbs) + tests
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.9", "3.10", "3.11", "3.12"]
steps:
- uses: actions/checkout@v4
- name: Install RDMA dev headers and build tools
run: |
sudo apt-get update
sudo apt-get install -y libibverbs-dev librdmacm-dev cmake ninja-build
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install (builds the C++ extension) + test deps
run: |
python -m pip install --upgrade pip
pip install ".[test]"
- name: Verify the extension built with RDMA support
run: |
python -c "from peercache import _peercache; assert _peercache.HAS_RDMA, 'expected RDMA build'; print('HAS_RDMA', _peercache.HAS_RDMA)"
- name: Run tests (TCP fallback; runners have no RDMA device)
run: pytest -q
test-no-rdma:
name: build (PEERCACHE_NO_RDMA) + tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Install without RDMA (stub extension + TCP fallback)
run: |
python -m pip install --upgrade pip
pip install ".[test]" --config-settings=cmake.define.PEERCACHE_NO_RDMA=ON
- name: Verify stub build falls back to TCP
run: |
python -c "from peercache import _peercache; assert _peercache.HAS_RDMA is False; print('stub build OK')"
- name: Run tests
run: pytest -q