Skip to content

Implement GraverBasis class for integer matrices #2404

Implement GraverBasis class for integer matrices

Implement GraverBasis class for integer matrices #2404

Workflow file for this run

name: Prepare source distributions and wheels
on:
pull_request:
paths:
- '**'
- '!.github/workflows/**'
- '!*.md'
- '!*.txt'
- '!condarc.yml'
- '!environment*.yml'
- '!pyrightconfig.json'
- '!src/doc/**'
- '!tools/**'
- '.github/workflows/dist.yml'
merge_group:
push:
tags:
# Match all release tags including beta, rc
- 'passagemath-[0-9]+.[0-9]+'
- 'passagemath-[0-9]+.[0-9]+.[0-9]+'
- 'passagemath-[0-9]+.[0-9]+.beta[0-9]+'
- 'passagemath-[0-9]+.[0-9]+.[0-9]+.beta[0-9]+'
- 'passagemath-[0-9]+.[0-9]+.rc[0-9]+'
- 'passagemath-[0-9]+.[0-9]+.[0-9]+.rc[0-9]+'
workflow_dispatch:
# Allow to run manually
concurrency:
# Cancel previous runs of this workflow for the same branch
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
release_dist:
# This job first checks whether "configure --enable-download-from-upstream-url"
# (the default since #32390) is needed.
#
# In this way, we check that all necessary package tarballs
# have already been uploaded to the Sage server at the time
# of pushing a release tag.
#
# It also uses "bootstrap -D", thus checking that the "configure"
# tarball has been uploaded to the Sage server at the time
# of pushing a release tag.
if: startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install bootstrap prerequisites
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install $(build/bin/sage-get-system-packages debian _bootstrap)
- name: bootstrap -D
run: |
./bootstrap -D
- name: bootstrap
if: failure()
run: |
./bootstrap
- name: make dist (--disable-download-from-upstream-url)
if: (success() || failure())
id: make_dist
run: |
./configure --disable-download-from-upstream-url && make dist
env:
MAKE: make -j8
- name: make download (--disable-download-from-upstream-url)
if: (success() || failure())
id: make_download
run: |
make -k download DOWNLOAD_PACKAGES=":all: --no-file huge"
env:
MAKE: make -j8
- name: Reconfigure with --enable-download-from-upstream-url
if: (success() || failure()) && (steps.make_dist.outcome != 'success' || steps.make_download.outcome != 'success')
run: |
./configure
- name: make dist (--enable-download-from-upstream-url)
if: (success() || failure()) && steps.make_dist.outcome != 'success'
run: |
make dist
env:
MAKE: make -j8
- name: make download (--enable-download-from-upstream-url)
if: (success() || failure()) && steps.make_download.outcome != 'success'
run: |
make -k download DOWNLOAD_PACKAGES=":all: --no-file huge --allow-upstream --on-error warn"
env:
MAKE: make -j8
- name: Remove what cannot be distributed
if: success() || failure()
run: |
rm -f upstream/*do-not-distribute*
- uses: actions/upload-artifact@v4
if: success() || failure()
with:
path: |
dist/*.tar.gz
upstream
name: release_dist
sdists_for_pypi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache sdists
id: cache-sdists
if: "!startsWith(github.ref, 'refs/tags/passagemath-')"
uses: actions/cache@v4
with:
path: dist
# Exclude dangling symlinks from hashFiles
key: >-
sdists-build=${{
hashFiles('build',
'configure.ac',
'm4')
}}-pkgs=${{
hashFiles('pkgs',
'!pkgs/sage-conf/bin/**',
'!pkgs/sage-conf*/pyproject.toml',
'!pkgs/sage-conf_conda/**',
'!pkgs/sage-conf_pypi/sage_root/**',
'!pkgs/sage-project-cookiecutter/**',
'!pkgs/sagemath-standard/requirements.txt')
}}-src=${{ hashFiles('src') }}
- name: Install bootstrap prerequisites
if: steps.cache-sdists.outputs.cache-hit != 'true'
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install $(build/bin/sage-get-system-packages debian _bootstrap)
- name: Cache SAGE_LOCAL
if: steps.cache-sdists.outputs.cache-hit != 'true'
uses: actions/cache@v4
with:
path: |
config.status
local
key: >-
sdists-SAGE_LOCAL-build=${{
hashFiles('build',
'configure.ac',
'm4')
}}
restore-keys: |
sdists-SAGE_LOCAL
- name: make pypi-sdists
if: steps.cache-sdists.outputs.cache-hit != 'true'
run: |
./bootstrap
./configure
make sagemath_environment V=0
make pypi-sdists V=0
(mkdir dist && mv upstream/*sage*.tar.gz dist/)
ls -l dist
- uses: actions/upload-artifact@v4
with:
path: "dist/*.tar.gz"
name: dist
- name: twine check
if: steps.cache-sdists.outputs.cache-hit != 'true'
run: |
./sage -pip install twine
./sage -sh -c 'twine check dist/*.tar.gz'
release:
needs: [release_dist, sdists_for_pypi]
runs-on: ubuntu-latest
if: (success() || failure()) && github.repository == 'passagemath/passagemath' && startsWith(github.ref, 'refs/tags/passagemath-')
steps:
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
latest_release_tag=$(curl -s https://api.github.com/repos/${{ github.repository }}/releases \
| jq -r 'sort_by(.created_at) | last(.[]).tag_name')
release_notes=$(curl -s \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ github.repository }}/releases/generate-notes \
-d "{
\"tag_name\": \"${{ github.ref_name }}\",
\"previous_tag_name\": \"$latest_release_tag\"
}" | jq -r '.body')
# escape special characters for json
release_notes=$(jq -R -s '.' <<< "$release_notes")
curl -L \
-X POST \
-H "Accept: application/vnd.github+json" \
-H "Authorization: Bearer $GITHUB_TOKEN" \
-H "X-GitHub-Api-Version: 2022-11-28" \
https://api.github.com/repos/${{ github.repository }}/releases \
-d "{
\"tag_name\": \"${{ github.ref_name }}\",
\"prerelease\": ${{ contains(github.ref, 'beta') || contains(github.ref, 'rc') }},
\"body\": $release_notes
}"
permissions:
contents: write
release_assets:
needs: [release_dist, sdists_for_pypi, release]
if: (success() || failure()) && github.repository == 'passagemath/passagemath' && startsWith(github.ref, 'refs/tags/passagemath-')
uses: ./.github/workflows/release-assets-publish.yml
with:
tag: ${{ github.ref_name }}
permissions:
contents: write
noarch_wheels_for_pypi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cache noarch-wheels
if: "!startsWith(github.ref, 'refs/tags/passagemath-')"
id: cache-noarch-wheels
uses: actions/cache@v4
with:
path: dist
key: >-
noarch-wheels-build=${{
hashFiles('build',
'configure.ac',
'm4')
}}-pkgs=${{
hashFiles('pkgs',
'!pkgs/sage-conf/bin/**',
'!pkgs/sage-conf*/pyproject.toml',
'!pkgs/sage-conf_conda/**',
'!pkgs/sage-conf_pypi/sage_root/**',
'!pkgs/sage-project-cookiecutter/**',
'!pkgs/sagemath-standard/requirements.txt')
}}-src=${{ hashFiles('src') }}
- name: Install bootstrap prerequisites
if: steps.cache-noarch-wheels.outputs.cache-hit != 'true'
run: |
sudo DEBIAN_FRONTEND=noninteractive apt-get update
sudo DEBIAN_FRONTEND=noninteractive apt-get install $(build/bin/sage-get-system-packages debian _bootstrap)
- name: Cache SAGE_LOCAL
if: steps.cache-noarch-wheels.outputs.cache-hit != 'true'
uses: actions/cache@v4
with:
path: |
config.status
local
key: >-
noarch-wheels-SAGE_LOCAL-build=${{
hashFiles('build',
'configure.ac',
'm4')
}}
restore-keys: |
noarch-wheels-SAGE_LOCAL
- name: make pypi-noarch-wheels
if: steps.cache-noarch-wheels.outputs.cache-hit != 'true'
run: |
./bootstrap
./configure --without-system-gap
make pypi-noarch-wheels V=0
(mkdir dist && mv venv/var/lib/sage/wheels/*sage*-none-any.whl dist/ && rm -f dist/*sage*conf-*-none-any.whl)
ls -l dist
- name: Repair wheels
if: steps.cache-noarch-wheels.outputs.cache-hit != 'true'
run: |
make auditwheel_or_delocate V=0
cd pkgs
set -x
for pkg in sagemath-*; do
if [ -r $pkg/repair_wheel.py ]; then
pkg_underscore=${pkg//-/_}
for whl in ../dist/*$pkg_underscore-*-none-any.whl; do
if [ -r "$whl" ]; then
../sage -sh -c "python3 $pkg/repair_wheel.py $whl"
fi
done
fi
done
cd ..
ls -l dist
- uses: actions/upload-artifact@v4
with:
path: "dist/*.whl"
name: noarch-wheels
- name: Upload logs artifact
uses: actions/upload-artifact@v4
if: always()
with:
name: logs-${{ matrix.os }}-${{ matrix.build }}-${{ matrix.arch }}-noarch-wheels
path: ./logs
build_wheels:
name: wheels ${{ matrix.build }}*_${{ matrix.arch }} side A
runs-on: ${{ matrix.os }}
needs: [sdists_for_pypi, noarch_wheels_for_pypi]
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
arch: >-
${{ github.event_name == 'pull_request'
&& fromJson('["x86_64"]')
|| fromJson('["x86_64"]') }}
build: >-
${{ github.event_name == 'pull_request'
&& fromJson('["manylinux"]')
|| fromJson('["manylinux", "musllinux"]') }}
include:
- os: ubuntu-24.04-arm
arch: aarch64
build: manylinux
- os: ubuntu-24.04-arm
arch: aarch64
build: musllinux
- os: macos-15-intel
arch: x86_64
build: macosx
- os: macos-14
arch: arm64
build: macosx
env:
# SPKGs to install as system packages
SPKGS: _bootstrap _prereq liblzma bzip2 info libxml2 libuuid
# Non-Python packages to install as spkgs
TARGETS_PRE: _cibuildwheel_local_a pip ${{ startsWith(matrix.os, 'ubuntu') && 'patchelf' || '' }}
CIBW_BUILD: "*${{ matrix.build }}*"
#
CIBW_ARCHS: ${{ matrix.arch }}
# https://cibuildwheel.readthedocs.io/en/stable/options/#requires-python
CIBW_PROJECT_REQUIRES_PYTHON: ${{ github.event_name == 'pull_request' && '>=3.10, <3.11' || '>=3.10, <3.14' }}
# Run before wheel build
CIBW_BEFORE_BUILD: |
(echo "passagemath-conf @ file://$(pwd)/pkgs/sage-conf" && echo "passagemath-setup @ file://$(pwd)/pkgs/sage-setup") > constraints.txt
# Environment during wheel build
CIBW_ENVIRONMENT: "PATH=$(pwd)/prefix/bin:$PATH CPATH=$(pwd)/prefix/include LIBRARY_PATH=$(pwd)/prefix/lib PKG_CONFIG_PATH=$(pwd)/prefix/lib/pkgconfig:$PKG_CONFIG_PATH ACLOCAL_PATH=/usr/share/aclocal CURL_CONFIGURE='--without-zstd --without-brotli --without-libidn2' LINBOX_CONFIGURE=--without-ntl SAGE_MACAULAY2_BUILD_OPTIONS=-DWITH_PYTHON=off PIP_CONSTRAINT=$(pwd)/constraints.txt PIP_FIND_LINKS=file://$(pwd)/wheelhouse' 'file://$(pwd)/dist SAGE_NUM_THREADS=6 ${{ startsWith(matrix.os, 'macos') && 'FC=gfortran LDFLAGS=\"-Wl,-ld_classic -Wl,-headerpad_max_install_names $LDFLAGS\"' || '' }}"
# Without setting LD_LIBRARY_PATH, we get Cannot repair wheel, because required library "libm4ri-0.0.20200125.so" could not be located
CIBW_REPAIR_WHEEL_COMMAND_LINUX: "set -x && pkg=$(basename {wheel}) && pkg=${pkg%%-*} && pkg=${pkg//_/-} && pkg=${pkg#pas} && if [ -r pkgs/$pkg/repair_wheel.py ]; then python3 -m pip install passagemath-conf auditwheel && python3 pkgs/$pkg/repair_wheel.py {wheel}; fi && auditwheel --version && LD_LIBRARY_PATH=$(pwd)/prefix/lib:$LD_LIBRARY_PATH auditwheel -v -v -v -v repair -w {dest_dir} {wheel}"
CIBW_REPAIR_WHEEL_COMMAND_MACOS: "set -x && export DYLD_FALLBACK_LIBRARY_PATH=$(pwd)/prefix/lib:$DYLD_FALLBACK_LIBRARY_PATH && pkg=$(basename {wheel}) && pkg=${pkg%%-*} && pkg=${pkg//_/-} && pkg=${pkg#pas} && if [ -r pkgs/$pkg/repair_wheel.py ]; then python3 -m pip install passagemath-conf auditwheel && python3 pkgs/$pkg/repair_wheel.py {wheel}; fi && delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"
# to avoid "DelocationError: Library dependencies do not satisfy target MacOS version 10.9"
MACOSX_DEPLOYMENT_TARGET: 13.0
steps:
- name: Maximize build disk space
if: runner.os == 'Linux' && matrix.arch != 'aarch64'
uses: easimon/maximize-build-space@v10
with:
# need space in /var for Docker images
root-reserve-mb: 30000
remove-dotnet: true
remove-android: true
remove-haskell: true
remove-codeql: true
remove-docker-images: true
- uses: actions/checkout@v4
- name: Set up QEMU
if: runner.os == 'Linux' && matrix.arch != 'x86_64' && matrix.arch != 'i686' && matrix.arch != 'aarch64'
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Download sdists
uses: actions/download-artifact@v4
with:
name: dist
path: dist
- name: Download noarch-wheels
uses: actions/download-artifact@v4
with:
name: noarch-wheels
path: dist
- name: Retrieve configure tarball cache
id: cache-configure
uses: actions/cache/restore@v4
with:
path: |
build/pkgs/configure
upstream/configure*
key: >-
configure-build=${{
hashFiles('build',
'configure.ac',
'm4')
}}
- 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.11 - 3.13"
update-environment: false
- name: Bootstrap
if: steps.cache-configure.outputs.cache-hit != 'true'
# Patch python3 spkg-configure to allow Python 3.9.0 during the CIBW_BEFORE_ALL phase
run: |
export PATH=$(pwd)/build/bin:$PATH
eval $(sage-print-system-package-command auto --sudo --yes update)
eval $(sage-print-system-package-command auto --sudo --yes --no-install-recommends --spkg install _bootstrap bzip2 xz liblzma)
sed -i.bak '/m4_pushdef.*MIN_VERSION/s/3[0-9.]*/3.9.0/' build/pkgs/python3/spkg-configure.m4
./bootstrap -s
- name: Save configure tarball cache
if: steps.cache-configure.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: |
build/pkgs/configure
upstream/configure*
key: ${{ steps.cache-configure.outputs.cache-primary-key }}
- name: Retrieve SAGE_LOCAL cache
id: cache-sage-local
uses: actions/cache/restore@v4
with:
path: |
/sage-*
~/sage-*
key: >-
${{ runner.os }}-cibuildwheel-${{ matrix.arch }}-${{ matrix.build }}-build=${{
hashFiles('build',
'configure.ac',
'm4',
'.github/workflows/dist.yml')
}}
# restore-keys: |
# ${{ runner.os }}-cibuildwheel-${{ matrix.arch }}-${{ matrix.build }}
- name: Unpack and prepare
id: unpack
# 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,
# so that SAGE_ROOT is copied into the build containers.
#
# In the CIBW_BEFORE_ALL phase, we install libraries using the Sage distribution.
# https://cibuildwheel.readthedocs.io/en/stable/options/#before-all
# For Linux, this is repeated for each of the packages that we build wheels for
# because CIBW starts with a fresh container on each invocation.
# Therefore we cache it in a directory mounted from the host: /host
# https://cibuildwheel.pypa.io/en/stable/faq/#linux-builds-in-containers
#
# - configure --with-sage-venv makes the SAGE_VENV separate from SAGE_LOCAL.
# SAGE_LOCAL is put in PATH for the wheel building.
# SAGE_VENV must not be in PATH so it does not shadow cibuildwheel's build tools.
#
run: |
if [ ! -x ./configure ]; then ./bootstrap -D; fi
touch configure
"${{ steps.python.outputs.python-path }}" -m pip install setuptools
. ./.homebrew-build-env 2> /dev/null || :
./configure --with-python="${{ steps.python.outputs.python-path }}" --with-system-python3=force --disable-python-distutils-check --prefix=$HOME/runner-venv
make cibuildwheel
export PATH=build/bin:$PATH
echo CIBW_BEFORE_ALL="echo > constraints.txt && ( $(sage-print-system-package-command debian update) && $(sage-print-system-package-command debian --yes --no-install-recommends install $(sage-get-system-packages debian $SPKGS) zip) || $(sage-print-system-package-command fedora --yes --no-install-recommends install $(sage-get-system-packages fedora $SPKGS | sed s/pkg-config/pkgconfig/) zip) || ( $(sage-print-system-package-command homebrew --yes --no-install-recommends install $(sage-get-system-packages homebrew $SPKGS) make) || $(sage-print-system-package-command alpine --yes --no-install-recommends install $(sage-get-system-packages alpine $SPKGS) zip) || echo error ignored) ) && . ./.homebrew-build-env 2> /dev/null; rm -f config.status && PREFIX=${{ startsWith(matrix.os, 'ubuntu') && '/host/sage-\$AUDITWHEEL_PLAT' || '\$HOME/sage-local' }} && if cp \$PREFIX/config.status . 2>/dev/null; then chmod +x config.status; fi && if [ -x ./config.status ]; then ./config.status; else rm -f prefix && ./configure --enable-build-as-root --enable-fat-binary --prefix=\$PREFIX --with-sage-venv --without-system-curl --without-system-gdbm --without-system-gettext --without-system-gmp --without-system-libffi --without-system-openssl --with-system-python3=force --without-system-readline --without-system-libpng --without-system-patchelf --without-system-zlib && echo ::group::config.log && cat config.log && echo ::endgroup:: && cp config.status prefix/ && (MAKE=\"make -j6\" make -k V=0 $TARGETS_PRE || echo error ignored); fi && rm -rf prefix/share/gap/doc && for a in \$(find prefix/lib -type f -name 'lib*'); do case \$a in *flint*|*gf2x*|*gmp*|*gsl*|*mpfr*|*ntl*|*openblas*|*normaliz*|*ssl*|*crypto*|*curl*|*tinfo*|*readline*) strip -x \$a;; esac; done; for a in \$(find prefix/bin -type f); do case \$a in *M2-binary*) strip -x \$a;; esac; done" >> "$GITHUB_ENV"
mkdir -p unpacked
set -x
for sdist in dist/$pkg*.tar.gz; do
(cd unpacked && tar xfz - && base=${sdist#dist/} && mv ${base%.tar.gz} ${base%-*}) < $sdist
done
- name: sagemath-objects
id: sagemath-objects
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_objects
- name: Save SAGE_LOCAL cache
if: (success() || failure()) && steps.unpack.outcome == 'success'
uses: actions/cache/save@v4
with:
path: |
/sage-*
~/sage-*
key: ${{ steps.cache-sage-local.outputs.cache-primary-key }}
####### sagemath-categories and what depends on it
- name: sagemath-categories
id: sagemath-categories
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_categories
- name: sagemath-glpk
id: sagemath-glpk
if: (success() || failure()) && steps.sagemath-categories.outcome == 'success'
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_glpk
- name: sagemath-homfly
id: sagemath-homfly
if: (success() || failure()) && steps.sagemath-categories.outcome == 'success'
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_homfly
- name: sagemath-combinat
id: sagemath-combinat
if: (success() || failure()) && steps.sagemath-categories.outcome == 'success'
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_combinat
- name: sagemath-graphs
id: sagemath-graphs
if: (success() || failure()) && steps.sagemath-categories.outcome == 'success'
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_graphs
- name: sagemath-planarity
id: sagemath-planarity
if: (success() || failure()) && steps.sagemath-categories.outcome == 'success'
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_planarity
env:
CIBW_PROJECT_REQUIRES_PYTHON: ${{ github.event_name == 'pull_request' && '>=3.10, <3.11' || '>=3.10, <3.13' }}
- name: sagemath-rankwidth
id: sagemath-rankwidth
if: (success() || failure()) && steps.sagemath-categories.outcome == 'success'
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_rankwidth
env:
CIBW_PROJECT_REQUIRES_PYTHON: ${{ github.event_name == 'pull_request' && '>=3.10, <3.11' || '>=3.10, <3.13' }}
- name: sagemath-tachyon
id: sagemath-tachyon
if: (success() || failure()) && steps.sagemath-categories.outcome == 'success'
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_tachyon
env:
CIBW_PROJECT_REQUIRES_PYTHON: ${{ github.event_name == 'pull_request' && '>=3.10, <3.11' || '>=3.10, <3.13' }}
####### sagemath-modules and what depends on it
- name: sagemath-modules
id: sagemath-modules
if: (success() || failure()) && steps.sagemath-categories.outcome == 'success'
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_modules
- name: sagemath-plot
id: sagemath-plot
if: (success() || failure()) && steps.sagemath-modules.outcome == 'success'
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_plot
- name: sagemath-polyhedra
id: sagemath-polyhedra
if: (success() || failure()) && steps.sagemath-modules.outcome == 'success'
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_polyhedra
- name: sagemath-ntl
id: sagemath-ntl
if: (success() || failure()) && steps.sagemath-modules.outcome == 'success'
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_ntl
- name: sagemath-flint
id: sagemath-flint
if: (success() || failure()) && steps.sagemath-modules.outcome == 'success'
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_flint
- name: sagemath-pari
id: sagemath-pari
if: (success() || failure()) && steps.sagemath-modules.outcome == 'success'
run: |
. ./.homebrew-build-env 2> /dev/null || :
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_pari
- name: sagemath-cddlib
id: sagemath-cddlib
if: (success() || failure()) && steps.sagemath-modules.outcome == 'success'
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_cddlib
env:
CIBW_PROJECT_REQUIRES_PYTHON: ${{ github.event_name == 'pull_request' && '>=3.10, <3.11' || '>=3.10, <3.13' }}
- name: sagemath-nauty
id: sagemath-nauty
if: (success() || failure()) && steps.sagemath-modules.outcome == 'success'
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_nauty
env:
CIBW_PROJECT_REQUIRES_PYTHON: ${{ github.event_name == 'pull_request' && '>=3.10, <3.11' || '>=3.10, <3.13' }}
- name: sagemath-libecm
id: sagemath-libecm
if: (success() || failure()) && steps.sagemath-modules.outcome == 'success'
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_libecm
- name: sagemath-lcalc
id: sagemath-lcalc
if: (success() || failure()) && steps.sagemath-modules.outcome == 'success'
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_lcalc
- name: sagemath-libbraiding
id: sagemath-libbraiding
if: (success() || failure()) && steps.sagemath-modules.outcome == 'success'
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_libbraiding
env:
CIBW_PROJECT_REQUIRES_PYTHON: ${{ github.event_name == 'pull_request' && '>=3.10, <3.11' || '>=3.10, <3.13' }}
- name: sagemath-gap
id: sagemath-gap
if: (success() || failure()) && steps.sagemath-modules.outcome == 'success'
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_gap
- name: sagemath-gap-pkg-caratinterface
id: sagemath-gap-pkg-caratinterface
if: (success() || failure()) && steps.sagemath-modules.outcome == 'success'
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_gap_pkg_caratinterface
env:
CIBW_PROJECT_REQUIRES_PYTHON: ${{ github.event_name == 'pull_request' && '>=3.10, <3.11' || '>=3.10, <3.13' }}
- name: sagemath-gap-pkg-cddinterface
id: sagemath-gap-pkg-cddinterface
if: (success() || failure()) && steps.sagemath-modules.outcome == 'success'
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_gap_pkg_cddinterface
env:
CIBW_PROJECT_REQUIRES_PYTHON: ${{ github.event_name == 'pull_request' && '>=3.10, <3.11' || '>=3.10, <3.13' }}
- name: sagemath-gap-pkg-curlinterface
id: sagemath-gap-pkg-curlinterface
if: (success() || failure()) && steps.sagemath-modules.outcome == 'success'
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_gap_pkg_curlinterface
env:
CIBW_PROJECT_REQUIRES_PYTHON: ${{ github.event_name == 'pull_request' && '>=3.10, <3.11' || '>=3.10, <3.13' }}
- name: sagemath-gap-pkg-float
id: sagemath-gap-pkg-float
if: (success() || failure()) && steps.sagemath-modules.outcome == 'success'
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_gap_pkg_float
env:
CIBW_PROJECT_REQUIRES_PYTHON: ${{ github.event_name == 'pull_request' && '>=3.10, <3.11' || '>=3.10, <3.13' }}
- name: sagemath-gap-pkg-normalizinterface
id: sagemath-gap-pkg-normalizinterface
if: (success() || failure()) && steps.sagemath-modules.outcome == 'success'
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_gap_pkg_normalizinterface
env:
CIBW_PROJECT_REQUIRES_PYTHON: ${{ github.event_name == 'pull_request' && '>=3.10, <3.11' || '>=3.10, <3.13' }}
- name: sagemath-gap-pkg-semigroups
id: sagemath-gap-pkg-semigroups
if: (success() || failure()) && steps.sagemath-modules.outcome == 'success'
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_gap_pkg_semigroups
env:
CIBW_PROJECT_REQUIRES_PYTHON: ${{ github.event_name == 'pull_request' && '>=3.10, <3.11' || '>=3.10, <3.13' }}
- name: sagemath-groups
id: sagemath-groups
if: (success() || failure()) && steps.sagemath-modules.outcome == 'success'
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_groups
- name: sagemath-cliquer
id: sagemath-cliquer
if: (success() || failure()) && steps.sagemath-modules.outcome == 'success'
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_cliquer
env:
CIBW_PROJECT_REQUIRES_PYTHON: ${{ github.event_name == 'pull_request' && '>=3.10, <3.11' || '>=3.10, <3.13' }}
- uses: actions/upload-artifact@v4
if: always()
with:
name: ${{ matrix.os }}-${{ matrix.build }}-${{ matrix.arch }}-wheels
path: ./wheelhouse/*.whl
- name: Upload logs artifact
uses: actions/upload-artifact@v4
if: always()
with:
name: logs-${{ matrix.os }}-${{ matrix.build }}-${{ matrix.arch }}-wheels
path: ./logs
build_optional_wheels:
name: wheels ${{ matrix.build }}*_${{ matrix.arch }} side B
if: (success() || failure())
runs-on: ${{ matrix.os }}
needs: [sdists_for_pypi, noarch_wheels_for_pypi, build_wheels]
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
arch: >-
${{ github.event_name == 'pull_request'
&& fromJson('["x86_64"]')
|| fromJson('["x86_64"]') }}
build: >-
${{ github.event_name == 'pull_request'
&& fromJson('["manylinux"]')
|| fromJson('["manylinux", "musllinux"]') }}
include:
- os: ubuntu-24.04-arm
arch: aarch64
build: manylinux
- os: ubuntu-24.04-arm
arch: aarch64
build: musllinux
- os: macos-15-intel
arch: x86_64
build: macosx
- os: macos-14
arch: arm64
build: macosx
env:
# SPKGs to install as system packages
SPKGS: _bootstrap _prereq liblzma bzip2 info libxml2
# Non-Python packages to install as spkgs
TARGETS_PRE: _cibuildwheel_local_b ${{ startsWith(matrix.os, 'ubuntu') && 'patchelf' || '' }}
CIBW_BUILD: "*${{ matrix.build }}*"
#
CIBW_ARCHS: ${{ matrix.arch }}
# https://cibuildwheel.readthedocs.io/en/stable/options/#requires-python
CIBW_PROJECT_REQUIRES_PYTHON: ${{ github.event_name == 'pull_request' && '>=3.10, <3.11' || '>=3.10, <3.14' }}
# Run before wheel build
CIBW_BEFORE_BUILD: |
(echo "passagemath-conf @ file://$(pwd)/pkgs/sage-conf" && echo "passagemath-setup @ file://$(pwd)/pkgs/sage-setup") > constraints.txt
# Environment during wheel build
CIBW_ENVIRONMENT: "PATH=$(pwd)/prefix/bin:$PATH CPATH=$(pwd)/prefix/include LIBRARY_PATH=$(pwd)/prefix/lib PKG_CONFIG_PATH=$(pwd)/prefix/lib/pkgconfig:$PKG_CONFIG_PATH ACLOCAL_PATH=/usr/share/aclocal CURL_CONFIGURE='--without-zstd --without-brotli --without-libidn2' GIAC_CONFIGURE=--disable-ntl LINBOX_CONFIGURE=--without-ntl SAGE_MACAULAY2_BUILD_OPTIONS=-DWITH_PYTHON=off PIP_CONSTRAINT=$(pwd)/constraints.txt PIP_FIND_LINKS=file://$(pwd)/wheelhouse' 'file://$(pwd)/dist SAGE_NUM_THREADS=6 ${{ startsWith(matrix.os, 'macos') && 'FC=gfortran LDFLAGS=\"-Wl,-ld_classic -Wl,-headerpad_max_install_names $LDFLAGS\"' || '' }}"
# Without setting LD_LIBRARY_PATH, we get Cannot repair wheel, because required library "libm4ri-0.0.20200125.so" could not be located
CIBW_REPAIR_WHEEL_COMMAND_LINUX: "set -x && pkg=$(basename {wheel}) && pkg=${pkg%%-*} && pkg=${pkg//_/-} && pkg=${pkg#pas} && if [ -r pkgs/$pkg/repair_wheel.py ]; then python3 -m pip install passagemath-conf auditwheel && python3 pkgs/$pkg/repair_wheel.py {wheel}; fi && auditwheel --version && LD_LIBRARY_PATH=$(pwd)/prefix/lib:$LD_LIBRARY_PATH auditwheel -v -v -v -v repair -w {dest_dir} {wheel}"
CIBW_REPAIR_WHEEL_COMMAND_MACOS: "set -x && export DYLD_FALLBACK_LIBRARY_PATH=$(pwd)/prefix/lib:$DYLD_FALLBACK_LIBRARY_PATH && pkg=$(basename {wheel}) && pkg=${pkg%%-*} && pkg=${pkg//_/-} && pkg=${pkg#pas} && if [ -r pkgs/$pkg/repair_wheel.py ]; then python3 -m pip install passagemath-conf auditwheel && python3 pkgs/$pkg/repair_wheel.py {wheel}; fi && delocate-wheel --require-archs {delocate_archs} -w {dest_dir} -v {wheel}"
# to avoid "DelocationError: Library dependencies do not satisfy target MacOS version 10.9"
MACOSX_DEPLOYMENT_TARGET: 13.0
steps:
- name: Maximize build disk space
if: runner.os == 'Linux' && matrix.arch != 'aarch64'
uses: easimon/maximize-build-space@v10
with:
# need space in /var for Docker images
root-reserve-mb: 30000
remove-dotnet: true
remove-android: true
remove-haskell: true
remove-codeql: true
remove-docker-images: true
- uses: actions/checkout@v4
- name: Set up QEMU
if: runner.os == 'Linux' && matrix.arch != 'x86_64' && matrix.arch != 'i686' && matrix.arch != 'aarch64'
uses: docker/setup-qemu-action@v3
with:
platforms: all
- name: Download sdists
uses: actions/download-artifact@v4
with:
name: dist
path: dist
- name: Download noarch-wheels
uses: actions/download-artifact@v4
with:
name: noarch-wheels
path: dist
- name: Download wheels
uses: actions/download-artifact@v4
with:
name: ${{ matrix.os }}-${{ matrix.build }}-${{ matrix.arch }}-wheels
path: dist
- name: Retrieve configure tarball cache
id: cache-configure
uses: actions/cache/restore@v4
with:
path: |
build/pkgs/configure
upstream/configure*
key: >-
configure-build=${{
hashFiles('build',
'configure.ac',
'm4')
}}
- 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.11 - 3.13"
update-environment: false
- name: Bootstrap
if: steps.cache-configure.outputs.cache-hit != 'true'
# Patch python3 spkg-configure to allow Python 3.9.0 during the CIBW_BEFORE_ALL phase
run: |
export PATH=$(pwd)/build/bin:$PATH
eval $(sage-print-system-package-command auto --sudo --yes update)
eval $(sage-print-system-package-command auto --sudo --yes --no-install-recommends --spkg install _bootstrap bzip2 xz liblzma)
sed -i.bak '/m4_pushdef.*MIN_VERSION/s/3[0-9.]*/3.9.0/' build/pkgs/python3/spkg-configure.m4
./bootstrap
- name: Save configure tarball cache
if: steps.cache-configure.outputs.cache-hit != 'true'
uses: actions/cache/save@v4
with:
path: |
build/pkgs/configure
upstream/configure*
key: ${{ steps.cache-configure.outputs.cache-primary-key }}
- name: Retrieve SAGE_LOCAL cache
id: cache-sage-local
uses: actions/cache/restore@v4
with:
path: |
/sage-*
~/sage-*
key: >-
${{ runner.os }}-cibuildwheel-${{ matrix.arch }}-${{ matrix.build }}-build=${{
hashFiles('build',
'configure.ac',
'm4',
'.github/workflows/dist.yml')
}}
- name: Unpack and prepare
id: unpack
# 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,
# so that SAGE_ROOT is copied into the build containers.
#
# In the CIBW_BEFORE_ALL phase, we install libraries using the Sage distribution.
# https://cibuildwheel.readthedocs.io/en/stable/options/#before-all
# For Linux, this is repeated for each of the packages that we build wheels for
# because CIBW starts with a fresh container on each invocation.
# Therefore we cache it in a directory mounted from the host: /host
# https://cibuildwheel.pypa.io/en/stable/faq/#linux-builds-in-containers
#
# - configure --with-sage-venv makes the SAGE_VENV separate from SAGE_LOCAL.
# SAGE_LOCAL is put in PATH for the wheel building.
# SAGE_VENV must not be in PATH so it does not shadow cibuildwheel's build tools.
#
run: |
if [ ! -x ./configure ]; then ./bootstrap -D; fi
touch configure
"${{ steps.python.outputs.python-path }}" -m pip install setuptools
. ./.homebrew-build-env 2> /dev/null || :
./configure --with-python="${{ steps.python.outputs.python-path }}" --with-system-python3=force --prefix=$HOME/runner-venv
make cibuildwheel
export PATH=build/bin:$PATH
rm -f ~/sage-local/config.status /sage-*/config.status # trigger rebuild
echo CIBW_BEFORE_ALL="echo > constraints.txt && ( $(sage-print-system-package-command debian update) && $(sage-print-system-package-command debian --yes --no-install-recommends install $(sage-get-system-packages debian $SPKGS) zip) || $(sage-print-system-package-command fedora --yes --no-install-recommends install $(sage-get-system-packages fedora $SPKGS | sed s/pkg-config/pkgconfig/) zip) || ( $(sage-print-system-package-command homebrew --yes --no-install-recommends install $(sage-get-system-packages homebrew $SPKGS) make) || $(sage-print-system-package-command alpine --yes --no-install-recommends install $(sage-get-system-packages alpine $SPKGS) zip) || echo error ignored) ) && . ./.homebrew-build-env 2> /dev/null; rm -f config.status && PREFIX=${{ startsWith(matrix.os, 'ubuntu') && '/host/sage-\$AUDITWHEEL_PLAT' || '\$HOME/sage-local' }} && if cp \$PREFIX/config.status . 2>/dev/null; then chmod +x config.status; fi && if [ -x ./config.status ]; then ./config.status; else rm -f prefix && ./configure --enable-build-as-root --enable-fat-binary --prefix=\$PREFIX --with-sage-venv --without-system-curl --with-system-python3=force --without-system-gdbm --without-system-gettext --without-system-gmp --without-system-libffi --without-system-openssl --without-system-readline --without-system-libpng --without-system-patchelf --without-system-zlib && echo ::group::config.log && cat config.log && echo ::endgroup:: && cp config.status prefix/ && (MAKE=\"make -j6\" make -k V=0 $TARGETS_PRE || echo error ignored); fi && rm -rf prefix/share/gap/doc && for a in \$(find prefix/lib -type f -name 'lib*'); do case \$a in *flint*|*gf2x*|*gmp*|*gsl*|*mpfr*|*ntl*|*openblas*|*normaliz*|*ssl*|*crypto*|*curl*|*tinfo*|*readline*) strip -x \$a;; esac; done; for a in \$(find prefix/bin -type f); do case \$a in *M2-binary*) strip -x \$a;; esac; done" >> "$GITHUB_ENV"
mkdir -p unpacked
set -x
for sdist in dist/$pkg*.tar.gz; do
(cd unpacked && tar xfz - && base=${sdist#dist/} && mv ${base%.tar.gz} ${base%-*}) < $sdist
done
- name: sagemath-bliss
id: sagemath-bliss
if: (success() || failure())
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_bliss
env:
CIBW_PROJECT_REQUIRES_PYTHON: ${{ github.event_name == 'pull_request' && '>=3.10, <3.11' || '>=3.10, <3.13' }}
- name: Save SAGE_LOCAL cache
if: (success() || failure()) && steps.unpack.outcome == 'success'
uses: actions/cache/save@v4
with:
path: |
/sage-*
~/sage-*
key: ${{ steps.cache-sage-local.outputs.cache-primary-key }}
- name: Prepare sage-local artifact
if: always() && runner.os != 'Linux' && steps.unpack.outcome == 'success'
# Adapted from macos.yml
# This is macOS tar -- cannot use --remove-files.
# We remove the $SAGE_LOCAL/lib64 link
run: |
mkdir -p sage-local-artifact && (cd $HOME && rm -f "sage-local/lib64" && tar -cf - sage-local) > sage-local-artifact/sage-local.tar
- name: Upload sage-local artifact
if: always() && runner.os != 'Linux' && steps.unpack.outcome == 'success'
uses: actions/upload-artifact@v4
with:
path: sage-local-artifact/sage-local.tar
name: sage-local-${{ matrix.os }}-${{ matrix.build }}-${{ matrix.arch }}-optional-wheels
# Standard packages
- name: sagemath-linbox
id: sagemath-linbox
if: (success() || failure())
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_linbox
- name: sagemath-singular
id: sagemath-singular
if: (success() || failure())
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_singular
- name: sagemath-schemes
id: sagemath-schemes
if: (success() || failure())
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_schemes
- name: sagemath-ecl
id: sagemath-ecl
if: (success() || failure())
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_ecl
- name: sagemath-maxima
id: sagemath-maxima
if: (success() || failure())
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_maxima
- name: sagemath-symbolics
id: sagemath-symbolics
if: (success() || failure())
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_symbolics
- name: sagemath-standard-no-symbolics
id: sagemath-standard-no-symbolics
if: (success() || failure())
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_standard_no_symbolics
- name: sagemath-brial
id: sagemath-brial
if: (success() || failure())
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_brial
- name: sagemath-giac
id: sagemath-giac
if: (success() || failure())
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_giac
- name: sagemath-palp
id: sagemath-palp
if: (success() || failure())
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_palp
env:
CIBW_PROJECT_REQUIRES_PYTHON: ${{ github.event_name == 'pull_request' && '>=3.10, <3.11' || '>=3.10, <3.13' }}
- name: sagemath-eclib
id: sagemath-eclib
if: (success() || failure())
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_eclib
- name: sagemath-sympow
id: sagemath-sympow
if: (success() || failure())
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_sympow
env:
CIBW_PROJECT_REQUIRES_PYTHON: ${{ github.event_name == 'pull_request' && '>=3.10, <3.11' || '>=3.10, <3.13' }}
# Optional packages
- name: sagemath-gfan
id: sagemath-gfan
if: (success() || failure())
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_gfan
env:
CIBW_PROJECT_REQUIRES_PYTHON: ${{ github.event_name == 'pull_request' && '>=3.10, <3.11' || '>=3.10, <3.13' }}
- name: sagemath-fricas
id: sagemath-fricas
if: (success() || failure())
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_fricas
- name: sagemath-coxeter3
id: sagemath-coxeter3
if: (success() || failure())
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_coxeter3
- name: sagemath-mcqd
id: sagemath-mcqd
if: (success() || failure())
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_mcqd
env:
CIBW_PROJECT_REQUIRES_PYTHON: ${{ github.event_name == 'pull_request' && '>=3.10, <3.11' || '>=3.10, <3.13' }}
- name: sagemath-meataxe
id: sagemath-meataxe
if: (success() || failure())
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_meataxe
- name: sagemath-sirocco
id: sagemath-sirocco
if: (success() || failure())
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_sirocco
- name: sagemath-tdlib
id: sagemath-tdlib
if: (success() || failure())
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_tdlib
env:
CIBW_PROJECT_REQUIRES_PYTHON: ${{ github.event_name == 'pull_request' && '>=3.10, <3.11' || '>=3.10, <3.13' }}
- name: sagemath-msolve
id: sagemath-msolve
if: (success() || failure())
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_msolve
env:
CIBW_PROJECT_REQUIRES_PYTHON: ${{ github.event_name == 'pull_request' && '>=3.10, <3.11' || '>=3.10, <3.13' }}
- name: sagemath-latte-4ti2
id: sagemath-latte-4ti2
if: (success() || failure())
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_latte_4ti2
env:
CIBW_PROJECT_REQUIRES_PYTHON: ${{ github.event_name == 'pull_request' && '>=3.10, <3.11' || '>=3.10, <3.13' }}
- name: sagemath-topcom
id: sagemath-topcom
if: (success() || failure())
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_topcom
env:
CIBW_PROJECT_REQUIRES_PYTHON: ${{ github.event_name == 'pull_request' && '>=3.10, <3.11' || '>=3.10, <3.13' }}
- name: sagemath-lrslib
id: sagemath-lrslib
if: (success() || failure())
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_lrslib
env:
CIBW_PROJECT_REQUIRES_PYTHON: ${{ github.event_name == 'pull_request' && '>=3.10, <3.11' || '>=3.10, <3.13' }}
- name: sagemath-cmr
id: sagemath-cmr
if: (success() || failure())
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_cmr
- name: sagemath-frobby
id: sagemath-frobby
if: (success() || failure())
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_frobby
env:
CIBW_PROJECT_REQUIRES_PYTHON: ${{ github.event_name == 'pull_request' && '>=3.10, <3.11' || '>=3.10, <3.13' }}
- name: sagemath-qepcad
id: sagemath-qepcad
if: (success() || failure())
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_qepcad
env:
CIBW_PROJECT_REQUIRES_PYTHON: ${{ github.event_name == 'pull_request' && '>=3.10, <3.11' || '>=3.10, <3.13' }}
- name: sagemath-rubiks
id: sagemath-rubiks
if: (success() || failure())
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_rubiks
env:
CIBW_PROJECT_REQUIRES_PYTHON: ${{ github.event_name == 'pull_request' && '>=3.10, <3.11' || '>=3.10, <3.13' }}
- name: sagemath-plantri
id: sagemath-plantri
if: (success() || failure())
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_plantri
env:
CIBW_PROJECT_REQUIRES_PYTHON: ${{ github.event_name == 'pull_request' && '>=3.10, <3.11' || '>=3.10, <3.13' }}
- name: sagemath-buckygen
id: sagemath-buckygen
if: (success() || failure())
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_buckygen
env:
CIBW_PROJECT_REQUIRES_PYTHON: ${{ github.event_name == 'pull_request' && '>=3.10, <3.11' || '>=3.10, <3.13' }}
- name: sagemath-benzene
id: sagemath-benzene
if: (success() || failure())
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_benzene
env:
CIBW_PROJECT_REQUIRES_PYTHON: ${{ github.event_name == 'pull_request' && '>=3.10, <3.11' || '>=3.10, <3.13' }}
- name: sagemath-glucose
id: sagemath-glucose
if: (success() || failure())
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_glucose
env:
CIBW_PROJECT_REQUIRES_PYTHON: ${{ github.event_name == 'pull_request' && '>=3.10, <3.11' || '>=3.10, <3.13' }}
- name: sagemath-kissat
id: sagemath-kissat
if: (success() || failure())
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_kissat
env:
CIBW_PROJECT_REQUIRES_PYTHON: ${{ github.event_name == 'pull_request' && '>=3.10, <3.11' || '>=3.10, <3.13' }}
- name: sagemath-kenzo
id: sagemath-kenzo
if: (success() || failure())
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_kenzo
env:
CIBW_PROJECT_REQUIRES_PYTHON: ${{ github.event_name == 'pull_request' && '>=3.10, <3.11' || '>=3.10, <3.13' }}
- name: sagemath-macaulay2
id: sagemath-macaulay2
if: (success() || failure())
run: |
~/runner-venv/bin/python3 -m cibuildwheel unpacked/passagemath_macaulay2
env:
CIBW_PROJECT_REQUIRES_PYTHON: ${{ github.event_name == 'pull_request' && '>=3.10, <3.11' || '>=3.10, <3.13' }}
- uses: actions/upload-artifact@v4
if: always()
with:
name: ${{ matrix.os }}-${{ matrix.build }}-${{ matrix.arch }}-optional-wheels
path: ./wheelhouse/*.whl
- name: Upload logs artifact
uses: actions/upload-artifact@v4
if: always()
with:
name: logs-${{ matrix.os }}-${{ matrix.build }}-${{ matrix.arch }}-optional-wheels
path: ./logs
upload_wheels:
# This needs to be a separate job because pypa/gh-action-pypi-publish cannot run on macOS
needs: [sdists_for_pypi, noarch_wheels_for_pypi, build_wheels, build_optional_wheels]
if: (success() || failure()) && startsWith(github.ref, 'refs/tags')
uses: ./.github/workflows/pypi-publish.yml
with:
patterns: >-
["ubuntu-latest-manylinux-*-wheels",
"ubuntu-latest-musllinux-*-wheels",
"ubuntu-24.04-arm-manylinux-*-wheels",
"ubuntu-24.04-arm-musllinux-*-wheels",
"macos-15-intel-*-wheels",
"macos-14-*-wheels",
"noarch-wheels"]
secrets: inherit
tox:
needs: [sdists_for_pypi, noarch_wheels_for_pypi, build_wheels, build_optional_wheels]
if: (success() || failure())
uses: ./.github/workflows/ci-wheels.yml
with:
run-id: ${{ github.run_id }}