Repository navigation
63 lines (53 loc) · 1.86 KB
/
Copy pathtest-python.yml
File metadata and controls
63 lines (53 loc) · 1.86 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
name: Test Python
on:
pull_request:
branches: ["main", "main-*"]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
env:
PYTHONUTF8: 1
PYTHONMALLOC: debug
jobs:
test_python:
name: Test Python, ${{ matrix.os }}, ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
# Architecture comes from the runner label, not a matrix axis.
os: [ubuntu-24.04, ubuntu-24.04-arm, macos-15, windows-2025]
python-version: ["3.14", "3.10"]
steps:
- name: Checkout
uses: actions/checkout@v7
- name: Set Up Python ${{ matrix.python-version }}
uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
- name: Print Machine Specs
shell: bash
run: |
echo "::group::Machine Information"
uname -a || true
cat /proc/cpuinfo 2>/dev/null | head -30 || sysctl -a machdep.cpu 2>/dev/null | head -30 || wmic cpu get Name,NumberOfCores,MaxClockSpeed 2>/dev/null || true
free -h 2>/dev/null || vm_stat 2>/dev/null || systeminfo 2>/dev/null | head -20 || true
echo "::endgroup::"
- name: Install Dependencies
uses: nick-fields/retry@v4
with:
max_attempts: 3
retry_wait_seconds: 10
timeout_minutes: 180
command: |
python -m pip install --no-cache-dir --upgrade pip
pip install --no-cache-dir --group test py-cpuinfo numpy scipy ml_dtypes
python -c "from cpuinfo import get_cpu_info; print(get_cpu_info())"
- name: Build Locally
run: python -m pip install .
- name: Test with PyTest
run: |
python -c "import numkong; print(numkong.get_capabilities())"
pytest test/ -s -x -Wd -v