-
Notifications
You must be signed in to change notification settings - Fork 0
72 lines (61 loc) · 1.76 KB
/
build.yml
File metadata and controls
72 lines (61 loc) · 1.76 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
63
64
65
66
67
68
69
70
71
72
name: build
on: [push, pull_request]
jobs:
debian:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
container:
- debian:bullseye-slim
- debian:bookworm-slim
- debian:trixie-slim
container: ${{ matrix.container }}
steps:
- name: Install build tools
run: |
apt update
apt install -y build-essential gcc g++ make cmake git python3 python3-pip python3-venv
- name: Checkout
uses: actions/checkout@v4
- name: Build and install
run: |
python3 -m venv .venv
. .venv/bin/activate
pip install . pytest
env:
CMAKE_BUILD_PARALLEL_LEVEL: "8"
- name: Run tests
run: |
. .venv/bin/activate
pytest tests/ -v
native:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
allow-prereleases: true
- name: Install build tools (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt update
sudo apt install -y build-essential gcc g++ cmake
- name: Set up MSVC (Windows)
if: matrix.os == 'windows-latest'
uses: ilammy/msvc-dev-cmd@v1
- name: Build and install
run: |
pip install . pytest
env:
CMAKE_BUILD_PARALLEL_LEVEL: "8"
- name: Run tests
run: pytest tests/ -v