-
Notifications
You must be signed in to change notification settings - Fork 128
135 lines (125 loc) · 4.86 KB
/
build.yml
File metadata and controls
135 lines (125 loc) · 4.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
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
name: Build
on:
push:
branches: [master, release]
pull_request:
branches: [master, release]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/master' && github.ref != 'refs/heads/release' }}
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
python-version: ['3.9', '3.10', '3.11', '3.12', '3.13', '3.13t', 'pypy3.11']
os: [windows-latest, ubuntu-latest, macos-15-intel, macos-latest]
architecture: ['x86', 'x64']
exclude:
# Only test pypy on Linux
- os: windows-latest
python-version: pypy3.11
- os: macos-latest
python-version: pypy3.11
- os: macos-15-intel
python-version: pypy3.11
# no python builds available on macos 32 bit, arm or x64
- os: macos-latest
architecture: x86
- os: macos-15-intel
architecture: x86
# no python builds available on linux 32 bit
- os: ubuntu-latest
architecture: x86
# scipy dropped 32 bit windows builds
- os: windows-latest
architecture: x86
python-version: 3.9
- os: windows-latest
architecture: x86
python-version: 3.10
- os: windows-latest
architecture: x86
python-version: 3.11
- os: windows-latest
architecture: x86
python-version: 3.12
- os: windows-latest
architecture: x86
python-version: 3.13
- os: windows-latest
architecture: x86
python-version: 3.13t
# These are arm - old versions of Python are not supported
- os: macos-latest
python-version: 3.9
- os: macos-latest
python-version: 3.10
# pandas doesn't have wheels for 3.13t on Windows x64
- os: windows-latest
architecture: x64
python-version: 3.13t
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }} ${{ matrix.architecture }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
architecture: ${{ matrix.architecture }}
- name: Install uv
if: matrix.python-version != '3.13t'
uses: astral-sh/setup-uv@v4
with:
enable-cache: true
cache-dependency-glob: "pyproject.toml"
- name: Install Ubuntu dependencies
if: startsWith(runner.os, 'Linux')
run: |
# Taken from scipy
sudo apt-get update
sudo apt-get install -y libopenblas-dev libatlas-base-dev liblapack-dev gfortran libgmp-dev libmpfr-dev libsuitesparse-dev ccache libmpc-dev libjpeg-dev zlib1g-dev libtiff-dev libfreetype6-dev liblcms2-dev libwebp-dev
- name: Install dependencies
run: |
python -c "import platform; print(platform.platform()); print(platform.architecture())"
if [[ "${{ matrix.python-version }}" == "3.13t" ]]; then
# Use pip for 3.13t (free-threading) as uv may not fully support it yet
python -m pip install --upgrade pip
pip install -e .[test]
else
uv pip install --system -e .[test]
fi
shell: bash
- name: Add numba
if: ${{ !contains(fromJSON('["pypy3.11", "3.13t"]'), matrix.python-version) }}
run: |
uv pip install --system -e .[numba]
- name: Generate Files
if: ${{ matrix.python-version == '3.9' || matrix.python-version == '3.10' || matrix.python-version == '3.11' || matrix.python-version == '3.12' || matrix.python-version == '3.13' || matrix.python-version == '3.13t' || matrix.python-version == 'pypy3.11' }}
run: |
python dev/dump_UNIFAC_assignments_to_sqlite.py
- name: Test with pytest
run: |
pytest . -v --cov-report html --cov=thermo --cov-report term-missing -m "not online and not sympy and not numba and not CoolProp and not fuzz and not deprecated and not slow"
coveralls || true
env:
COVERALLS_REPO_TOKEN: ${{ secrets.coveralls }}
COVERALLS_PARALLEL: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PYTHON_GIL: ${{ matrix.python-version == '3.13t' && '0' || '' }}
- name: Upload coverage HTML report
if: always()
uses: actions/upload-artifact@v4
with:
name: coverage-html-${{ matrix.os }}-${{ matrix.python-version }}-${{ matrix.architecture }}
path: htmlcov/
finish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Coveralls Finished
env:
COVERALLS_REPO_TOKEN: ${{ secrets.coveralls }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
curl https://coveralls.io/webhook?repo_token=${{ secrets.coveralls }} -d "payload[build_num]=${{ github.sha }}&payload[status]=done"