Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 13 additions & 2 deletions .github/workflows/dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,9 @@ jobs:
- os: ubuntu-latest
arch: i686
- os: macos-latest
arch: auto
arch: x86_64
- os: macos-14
arch: arm64
env:
# SPKGs to install as system packages
SPKGS: _bootstrap _prereq
Expand All @@ -141,6 +143,14 @@ jobs:
name: dist
path: dist

- uses: actions/setup-python@v5
# As of 2024-02-03, the macOS M1 runners do not have preinstalled python or pipx.
# Installing pipx follows the approach of https://github.com/pypa/cibuildwheel/pull/1743
id: python
with:
python-version: "3.8 - 3.12"
update-environment: false

- name: Build platform wheels
# We build the wheels from the sdists so that MANIFEST filtering becomes effective.
# But we must run cibuildwheel with the unpacked source directory, not a tarball,
Expand All @@ -151,12 +161,13 @@ jobs:
# This is unfortunately repeated for each of the packages that we build wheels for
# because CIBW starts with a fresh container on each invocation.
run: |
"${{ steps.python.outputs.python-path }}" -m pip install pipx
export PATH=build/bin:$PATH
export CIBW_BEFORE_ALL="( $(sage-print-system-package-command debian --yes --no-install-recommends install $(sage-get-system-packages debian $SPKGS)) || $(sage-print-system-package-command fedora --yes --no-install-recommends install $(sage-get-system-packages fedora $SPKGS | sed s/pkg-config/pkgconfig/)) || ( $(sage-print-system-package-command homebrew --yes --no-install-recommends install $(sage-get-system-packages homebrew $SPKGS)) || echo error ignored) ) && ./bootstrap && ./configure --enable-build-as-root && make -j4 V=0 $TARGETS_PRE"
mkdir -p unpacked
for pkg in sagemath-objects sagemath-categories; do
(cd unpacked && tar xfz - ) < dist/$pkg*.tar.gz
pipx run cibuildwheel==2.16.2 unpacked/$pkg*
"${{ steps.python.outputs.python-path }}" -m pipx run cibuildwheel==2.17.0 unpacked/$pkg*
done

- uses: actions/upload-artifact@v3
Expand Down