-
-
Notifications
You must be signed in to change notification settings - Fork 38
99 lines (85 loc) · 2.82 KB
/
build.yml
File metadata and controls
99 lines (85 loc) · 2.82 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
name: Tests
on:
push:
branches:
- '**'
pull_request:
branches:
- main
jobs:
build_wheels:
name: Build and test on ${{ matrix.os }}${{ matrix.numpy-version && format(' (numpy {0})', matrix.numpy-version) || matrix.python-version && format(' (python {0})', matrix.python-version) || '' }}
runs-on: ${{ matrix.os }}
env:
CMAKE_GENERATOR: Ninja
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.12"]
numpy-version: [null]
include:
- os: ubuntu-latest
python-version: "3.12"
numpy-version: "1.26"
- os: ubuntu-latest
python-version: "3.14"
numpy-version: null
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Install sccache (Windows)
if: runner.os == 'Windows'
run: choco install sccache --yes
- name: Cache sccache (Windows)
if: runner.os == 'Windows'
uses: actions/cache@v5
with:
path: C:\Users\runneradmin\AppData\Local\sccache
key: sccache-${{ runner.os }}-${{ github.sha }}
restore-keys: |
sccache-${{ runner.os }}-
- name: Cache pip (Windows)
if: runner.os == 'Windows'
uses: actions/cache@v5
with:
path: C:\Users\runneradmin\AppData\Local\pip\Cache
key: pip-${{ runner.os }}-${{ hashFiles('pyproject.toml') }}
restore-keys: |
pip-${{ runner.os }}-
- name: Install Ninja
uses: seanmiddleditch/gha-setup-ninja@master
- name: Add LLVM to PATH (Windows)
if: runner.os == 'Windows'
run: echo "C:\\Program Files\\LLVM\\bin" >> $env:GITHUB_PATH
- name: Install specific numpy version
if: matrix.numpy-version
run: pip install "numpy==${{ matrix.numpy-version }}.*"
- name: Build (Windows)
if: runner.os == 'Windows'
id: build_windows
run: pip install -e .[test]
env:
CMAKE_C_COMPILER_LAUNCHER: sccache
CMAKE_CXX_COMPILER_LAUNCHER: sccache
SCCACHE_DIR: C:\Users\runneradmin\AppData\Local\sccache
CC: clang-cl
CXX: clang-cl
CMAKE_BUILD_PARALLEL_LEVEL: 8
SKBUILD_PARALLEL_LEVEL: 8
- name: Build (non-Windows)
if: runner.os != 'Windows'
id: build_non_windows
run: pip install -e .[test]
- name: Test (Windows)
if: runner.os == 'Windows'
run: python -m pytest -m "not heavy and (network or not network)"
# env:
# BLOSC_NTHREADS: "1"
# NUMEXPR_NUM_THREADS: "1"
# OMP_NUM_THREADS: "1"
- name: Test (non-Windows)
if: runner.os != 'Windows'
run: python -m pytest -m "not heavy and (network or not network)"