Skip to content

Commit 32fe55a

Browse files
committed
merge
2 parents d6d454f + 91168f9 commit 32fe55a

File tree

3 files changed

+112
-1
lines changed

3 files changed

+112
-1
lines changed
+100
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
name: Build Multiarch
2+
3+
on:
4+
push:
5+
branches: [release]
6+
pull_request:
7+
branches: [master, release]
8+
9+
jobs:
10+
multi-arch-test:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
include:
16+
- arch: armv6
17+
distro: bookworm
18+
- arch: armv7
19+
distro: bookworm
20+
- arch: aarch64
21+
distro: bookworm
22+
- arch: s390x
23+
distro: bookworm
24+
- arch: ppc64le
25+
distro: bookworm
26+
27+
- arch: armv7
28+
distro: ubuntu_latest
29+
- arch: aarch64
30+
distro: ubuntu_latest
31+
- arch: riscv64
32+
distro: ubuntu_latest
33+
- arch: s390x
34+
distro: ubuntu_latest
35+
- arch: ppc64le
36+
distro: ubuntu_latest
37+
38+
- arch: armv7
39+
distro: ubuntu22.04
40+
- arch: aarch64
41+
distro: ubuntu22.04
42+
- arch: riscv64
43+
distro: ubuntu22.04
44+
- arch: s390x
45+
distro: ubuntu22.04
46+
- arch: ppc64le
47+
distro: ubuntu22.04
48+
# ubuntu20.04 is too old, fluids dropped support with numpy 2.0 compat
49+
50+
- arch: armv6
51+
distro: alpine_latest
52+
- arch: armv7
53+
distro: alpine_latest
54+
- arch: aarch64
55+
distro: alpine_latest
56+
- arch: riscv64
57+
distro: alpine_latest
58+
- arch: s390x
59+
distro: alpine_latest
60+
- arch: ppc64le
61+
distro: alpine_latest
62+
# fedora-latest doesn't work not sure why
63+
64+
steps:
65+
- uses: actions/checkout@v4
66+
- name: Set up QEMU
67+
uses: docker/setup-qemu-action@v2
68+
with:
69+
platforms: all
70+
- name: Run on ${{ matrix.arch }}
71+
uses: uraimo/run-on-arch-action@v2
72+
with:
73+
arch: ${{ matrix.arch }}
74+
distro: ${{ matrix.distro }}
75+
githubToken: ${{ github.token }}
76+
install: |
77+
if [[ "${{ matrix.distro }}" == "alpine_latest" ]]; then
78+
apk update
79+
apk add python3 py3-pip py3-scipy py3-matplotlib py3-numpy py3-pandas py3-sqlalchemy
80+
elif [[ "${{ matrix.distro }}" == "ubuntu_latest" || "${{ matrix.distro }}" == "ubuntu20.04" || "${{ matrix.distro }}" == "ubuntu22.04" || "${{ matrix.distro }}" == "bookworm" ]]; then
81+
apt-get update
82+
apt-get install -y libatlas-base-dev liblapack-dev gfortran libgmp-dev libmpfr-dev libsuitesparse-dev ccache libmpc-dev python3 python3-pip python3-scipy python3-matplotlib python3-numpy python3-pandas python3-sqlalchemy
83+
fi
84+
run: |
85+
if python3 -c "import subprocess; exit('no such option' not in subprocess.getoutput('pip3 install --break-system-packages'))"; then
86+
# If the exit status is 0 (True), this means the option is not supported
87+
python3 -m pip install wheel
88+
pip3 install -r requirements_test_multiarch.txt
89+
pip3 install .
90+
python3 dev/dump_UNIFAC_assignments_to_sqlite.py
91+
pip3 uninstall -y thermo
92+
else
93+
# If the exit status is 1 (False), this means the option is supported
94+
python3 -m pip install wheel --break-system-packages
95+
pip3 install -r requirements_test_multiarch.txt --break-system-packages
96+
pip3 install . --break-system-packages
97+
python3 dev/dump_UNIFAC_assignments_to_sqlite.py
98+
pip3 uninstall -y thermo --break-system-packages
99+
fi
100+
python3 -m pytest . -v -m "not online and not sympy and not numba and not CoolProp and not fuzz and not deprecated and not slow"

conftest.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
is_pypy = 'PyPy' in sys.version
55
ver_tup = platform.python_version_tuple()[0:2]
66
ver_tup = tuple(int(i) for i in ver_tup)
7+
is_x86_or_x86_64 = platform.machine().lower() in ('i386', 'i686', 'x86', 'x86_64', 'amd64')
78
def pytest_ignore_collect(path):
89
path = str(path)
910
# Serious technical debt
@@ -15,7 +16,7 @@ def pytest_ignore_collect(path):
1516
return True
1617
if 'conf.py' in path:
1718
return True
18-
if ver_tup <= (3, 7) or ver_tup >= (3, 13) or is_pypy:
19+
if ver_tup <= (3, 7) or ver_tup >= (3, 13) or is_pypy or not is_x86_or_x86_64:
1920
# numba does not yet run under pypy
2021
if 'numba' in path:
2122
return True

requirements_test_multiarch.txt

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
sympy
2+
fluids>=1.0.26
3+
chemicals>=1.2.0
4+
pytest
5+
pint
6+
IPython
7+
sphinx
8+
mpmath
9+
fuzzywuzzy
10+
pytz

0 commit comments

Comments
 (0)