-
Notifications
You must be signed in to change notification settings - Fork 9
174 lines (148 loc) · 4.83 KB
/
ci.yml
File metadata and controls
174 lines (148 loc) · 4.83 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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
name: CI
on:
push:
branches: [master, main]
pull_request:
branches: [master, main]
jobs:
test:
name: Test py${{ matrix.python-version }} / llvmlite ${{ matrix.llvmlite-version }} on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
python-version: ['3.10', '3.11', '3.12']
llvmlite-version: ['default']
include:
# Pinned llvmlite 0.44 (legacy PM, LLVM 15)
- os: ubuntu-latest
python-version: '3.12'
llvmlite-version: '0.44.*'
- os: macos-latest
python-version: '3.12'
llvmlite-version: '0.44.*'
# Pinned llvmlite 0.46 (new PM, LLVM 20)
- os: ubuntu-latest
python-version: '3.12'
llvmlite-version: '0.46.*'
- os: macos-latest
python-version: '3.12'
llvmlite-version: '0.46.*'
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ "${{ matrix.llvmlite-version }}" != "default" ]; then
pip install "llvmlite==${{ matrix.llvmlite-version }}"
fi
pip install -e .
- name: Show llvmlite version
run: python -c "import llvmlite; print(f'llvmlite {llvmlite.__version__}')"
- name: Run tests (first run - no cache)
env:
PYTHONPATH: .
run: |
echo "=== First run: clean build (no cache) ==="
rm -rf build/
python test/run_all_tests.py
- name: Run tests (second run - with cache)
env:
PYTHONPATH: .
run: |
echo "=== Second run: with cache ==="
python test/run_all_tests.py
test-windows:
name: Test py${{ matrix.python-version }} / llvmlite ${{ matrix.llvmlite-version }} on Windows (zig)
runs-on: windows-latest
timeout-minutes: 10
strategy:
fail-fast: false
matrix:
python-version: ['3.12']
llvmlite-version: ['default']
include:
- python-version: '3.12'
llvmlite-version: '0.44.*'
- python-version: '3.12'
llvmlite-version: '0.46.*'
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if ("${{ matrix.llvmlite-version }}" -ne "default") {
pip install "llvmlite==${{ matrix.llvmlite-version }}"
}
pip install -e .
- name: Show llvmlite version
run: python -c "import llvmlite; print(f'llvmlite {llvmlite.__version__}')"
- name: Verify zig is available
run: |
python-zig version
- name: Run tests (first run - no cache)
env:
PYTHONPATH: .
run: |
echo "=== First run: clean build (no cache) ==="
if (Test-Path build) { Remove-Item -Recurse -Force build }
python test/run_all_tests.py
- name: Run tests (second run - with cache)
env:
PYTHONPATH: .
run: |
echo "=== Second run: with cache ==="
python test/run_all_tests.py
test-arm64:
name: Test on ARM64 (AArch64)
runs-on: ubuntu-24.04-arm
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -e .
- name: Run tests (first run - no cache)
env:
PYTHONPATH: .
run: |
echo "=== First run: clean build (no cache) ==="
rm -rf build/
python test/run_all_tests.py
- name: Run tests (second run - with cache)
env:
PYTHONPATH: .
run: |
echo "=== Second run: with cache ==="
python test/run_all_tests.py
lint:
name: Lint Check
runs-on: ubuntu-latest
continue-on-error: true # Don't block CI on lint errors for now
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install ruff
- name: Run Ruff linter
run: ruff check pythoc/ --output-format=github || true
- name: Run Ruff formatter check
run: ruff format --check pythoc/ || true