Skip to content

Commit e8f5b7d

Browse files
authored
Update cibuildwheel (#2010)
* Update cibuildwheel based on current web documentation Now uses cibuildwheel 3.0 Signed-off-by: Geoff Hutchison <[email protected]>
1 parent 3399a81 commit e8f5b7d

File tree

3 files changed

+21
-25
lines changed

3 files changed

+21
-25
lines changed

.github/workflows/build_wheels.yml

Lines changed: 8 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ concurrency:
77
cancel-in-progress: true
88

99
env:
10-
# Don't build python 2.7, pypy, or 32-bit wheels or Mac arm64 on Py3.8
11-
CIBW_SKIP: "cp36-* cp37-* cp311-manylinux* cp312-manylinux* cp38-macosx_arm64 pp* *-musllinux_* *-manylinux_i686 *-win32"
10+
# builds to skip (e.g. skip 32-bit windows)
11+
CIBW_SKIP: "cp38-macosx_arm64 *-manylinux_i686 *-musllinux_* *-win32"
1212

1313
# Need to do some setup before repairing the wheel on linux...
1414
CIBW_REPAIR_WHEEL_COMMAND_LINUX: bash scripts/github-actions/repair_command_linux.sh
@@ -27,7 +27,7 @@ env:
2727
CIBW_TEST_COMMAND: pytest {project}/scripts/github-actions/simple_test.py
2828

2929
# We can't currently test Mac arm64 builds on x64
30-
CIBW_TEST_SKIP: "*_arm64 *_universal2:arm64"
30+
CIBW_TEST_SKIP: "*_arm64"
3131

3232

3333
# Use bash by default for the run command
@@ -42,8 +42,7 @@ jobs:
4242
strategy:
4343
fail-fast: false
4444
matrix:
45-
# For Windows, we have to use visual studio 2017, which is on windows-2016
46-
os: [ubuntu-20.04, macos-latest, windows-2019]
45+
os: [ubuntu-latest, ubuntu-24.04-arm, windows-latest, macos-13, macos-14]
4746

4847
steps:
4948
- uses: actions/checkout@v4
@@ -52,20 +51,11 @@ jobs:
5251
# give it a correct version even on non-tag push.
5352
fetch-depth: 0
5453

55-
- uses: actions/setup-python@v5
56-
name: Install Python
57-
with:
58-
python-version: '3.8'
59-
cache: 'pip' # caching pip dependencies
60-
61-
- name: Install cibuildwheel
62-
run: pip install cibuildwheel==2.16.2
63-
6454
- name: Install dependencies
6555
run: . ./scripts/github-actions/install.sh
6656

6757
- name: Build wheels
68-
run: cibuildwheel --output-dir wheelhouse
58+
uses: pypa/cibuildwheel@v3.0.0
6959

7060
- uses: actions/upload-artifact@v4
7161
with:
@@ -81,8 +71,10 @@ jobs:
8171
steps:
8272
- uses: actions/download-artifact@v4
8373
with:
84-
name: artifact
74+
# unpacks all CIBW artifacts into dist/
75+
pattern: cibw-*
8576
path: dist
77+
merge-multiple: true
8678

8779
- uses: pypa/gh-action-pypi-publish@master
8880
with:
Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
#!/usr/bin/env bash
22
set -ev
33

4-
# CentOS 7 is EOL so mirror.centos.org is offline
5-
# https://serverfault.com/a/1161921
6-
7-
sed -i s/mirror.centos.org/vault.centos.org/g /etc/yum.repos.d/*.repo
8-
sed -i s/^#.*baseurl=http/baseurl=https/g /etc/yum.repos.d/*.repo
9-
sed -i s/^mirrorlist=http/#mirrorlist=https/g /etc/yum.repos.d/*.repo
10-
11-
yum install -y git eigen3-devel
4+
# This script is used to repair the Linux environment in GitHub Actions.
5+
if command -v apt-get >/dev/null; then
6+
apt-get -y install git libeigen3-dev
7+
elif command -v yum >/dev/null; then
8+
yum install -y git eigen3-devel
9+
else
10+
echo "Neither apt-get nor yum found. Cannot install dependencies."
11+
exit 1
12+
fi

scripts/github-actions/simple_test.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
import avogadro
2+
import faulthandler
3+
4+
faulthandler.enable()
25

36
ethane_xyz = '''8
47
Ethane
@@ -15,10 +18,10 @@
1518

1619
def test_simple():
1720
mol = avogadro.core.Molecule()
18-
manager = avogadro.io.FileFormatManager()
1921

2022
assert mol.atom_count() == 0
2123

24+
manager = avogadro.io.FileFormatManager()
2225
assert manager.read_string(mol, ethane_xyz, 'xyz')
2326

2427
assert mol.atom_count() == 8

0 commit comments

Comments
 (0)