Skip to content

Commit 4879241

Browse files
authored
Merge branch 'Macaulay2:stable' into stable
2 parents cde7ec6 + c2aa530 commit 4879241

2,384 files changed

Lines changed: 147920 additions & 91861 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.codespell_ignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
aci
12
afile
23
alledges
34
allready
@@ -45,11 +46,13 @@ lsat
4546
manuel
4647
methd
4748
mis
49+
mone
4850
mor
4951
multidimension
5052
nam
5153
nd
5254
nin
55+
ninj
5356
nome
5457
numer
5558
oint
@@ -74,3 +77,5 @@ thets
7477
toom
7578
tring
7679
ue
80+
vew
81+
matc

.github/workflows/build-deb.yml

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,107 @@
1+
# This workflow builds Debian packages for the last 3 Debian releases
2+
# (currently trixie, bookworm, and bullseye)
3+
4+
# After each Macaulay2 release, a new package is prepared for Debian unstable
5+
# (and a few days later, it migrates to Debian testing). The packaging is
6+
# under version control in Debian's git forge, Salsa, at
7+
# https://salsa.debian.org/math-team/macaulay2, in the debian/latest branch
8+
9+
# Backport the package to each of the supported releases and push to the
10+
# appropriate release branch, e.g., debian/trixie for trixie. In many cases,
11+
# this is as simple as just merging the debian/latest branch. Push each branch
12+
# to Salsa.
13+
14+
# Once each branch is ready and pushed to Salsa, run this action using "workflow
15+
# dispatch" to generate each Debian package.
16+
17+
# Download the artifacts and unzip them. Push files using dput to
18+
# Repositories/Debian/mini-dinstall/incoming on the webserver, and then
19+
# run "mini-install -b -v" on the server. Finally sign the Release files
20+
# in each directory (gpg --clearsign -o InRelease Release).
21+
22+
name: Build Debian packages
23+
on: workflow_dispatch
24+
25+
jobs:
26+
build-deb:
27+
runs-on: ${{ matrix.os }}
28+
strategy:
29+
fail-fast: false
30+
matrix:
31+
release:
32+
- bullseye
33+
- bookworm
34+
- trixie
35+
os:
36+
- ubuntu-latest
37+
- ubuntu-24.04-arm
38+
container:
39+
image: debian:${{ matrix.release }}
40+
steps:
41+
- name: Install dependencies
42+
run: |
43+
apt-get update
44+
apt-get install -y wget ca-certificates
45+
if test ${{ matrix.release }} = "bullseye"; \
46+
then wget -O /usr/share/keyrings/macaulay2-archive-key.asc https://macaulay2.com/Repositories/Debian/macaulay2-archive-key.asc; \
47+
fi
48+
wget -O /etc/apt/sources.list.d/macaulay2.sources https://macaulay2.com/Repositories/Debian/${{ matrix.release }}/macaulay2.sources
49+
apt-get update
50+
apt-get install -y 4ti2 bison cohomcalg coinor-csdp \
51+
debhelper dh-linktree emacs-nox fflas-ffpack flex \
52+
gfan gfortran install-info libboost-dev libboost-math-dev \
53+
libboost-regex-dev libboost-stacktrace-dev libcdd-dev \
54+
libeigen3-dev libffi-dev libflint-dev libfrobby-dev libfplll-dev \
55+
libgc-dev libgdbm-dev libglpk-dev libgtest-dev libjansson-dev \
56+
liblapack-dev liblzma-dev libmathic-dev libmathicgb-dev \
57+
libmemtailor-dev libmpfi-dev libmpfr-dev libmps-dev libnauty-dev \
58+
libnormaliz-dev libntl-dev libreadline-dev \
59+
libsingular4-dev libtbb-dev libxml2-dev lrslib \
60+
lsb-release msolve nauty normaliz pkgconf python3-dev \
61+
r-base singular-data time topcom git devscripts dh-elpa
62+
63+
# arch-independent dependencies (amd64 build only)
64+
if test ${{ matrix.os }} = "ubuntu-latest"; then
65+
apt-get install -y faketime gdbmtool jdupes
66+
67+
# don't need javascript on bullseye (just use the vendored copies)
68+
if test ${{ matrix.release }} != "bullseye"; then
69+
apt-get install -y node-fortawesome-fontawesome-free \
70+
fonts-katex libjs-bootsidemenu libjs-bootstrap5 libjs-d3 \
71+
libjs-jquery libjs-katex libjs-nouislider libjs-three \
72+
node-clipboard node-css-loader node-import-local \
73+
node-interpret node-prismjs node-prismjs-bibtex \
74+
node-rechoir node-style-loader npm pkg-js-tools webpack
75+
fi
76+
fi
77+
- name: Clone repository
78+
run: |
79+
git clone https://salsa.debian.org/math-team/macaulay2
80+
cd macaulay2
81+
git checkout debian/${{ matrix.release }}
82+
- name: Generate tarball
83+
run: |
84+
cd macaulay2
85+
uscan --verbose --rename --force-download
86+
- name: Build source package
87+
run: |
88+
cd macaulay2
89+
dpkg-buildpackage --build=source
90+
- name: Build binary package
91+
run: |
92+
dpkg-source -x macaulay2_*.dsc
93+
cd macaulay2-*
94+
if test ${{ matrix.os }} = "ubuntu-latest"; \
95+
then dpkg-buildpackage --build=binary; \
96+
else dpkg-buildpackage --build=any; \
97+
fi
98+
- name: Upload build logs
99+
if: always()
100+
uses: actions/upload-artifact@v7
101+
with:
102+
name: ${{ matrix.os }}-debian-${{ matrix.release }}
103+
path: |
104+
*.build
105+
*.buildinfo
106+
*.changes
107+
*.deb

.github/workflows/build-dmg.yml

Lines changed: 156 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,156 @@
1+
# This workflow builds a macOS DMG for distributing Macaulay2.
2+
# It runs on both Intel (x86_64) and Apple Silicon (arm64) runners.
3+
#
4+
# The resulting DMG presents a Macaulay2-VERSION directory alongside a
5+
# shortcut to /Applications so users can drag it there. After installation,
6+
# users add /Applications/Macaulay2-VERSION/bin to their PATH.
7+
8+
name: Build macOS DMG
9+
10+
on:
11+
workflow_dispatch:
12+
push:
13+
tags:
14+
- 'release-*'
15+
16+
defaults:
17+
run:
18+
working-directory: M2/BUILD/dmg
19+
20+
jobs:
21+
build-dmg:
22+
name: Build DMG (${{ matrix.arch }})
23+
runs-on: ${{ matrix.os }}
24+
strategy:
25+
fail-fast: false
26+
matrix:
27+
include:
28+
- os: macos-14
29+
arch: arm64
30+
deployment_target: "14.0"
31+
- os: macos-15-intel
32+
arch: x86_64
33+
deployment_target: "15.0"
34+
35+
steps:
36+
- uses: actions/checkout@v6
37+
38+
# ----------------------
39+
# Install Homebrew dependencies
40+
# ----------------------
41+
42+
- name: Install requirements
43+
run: |
44+
brew config
45+
brew update
46+
brew tap macaulay2/tap
47+
# Build tools
48+
brew install automake bison dylibbundler ccache ctags llvm make yasm googletest r
49+
brew install texinfo || true
50+
# M2 library dependencies
51+
brew install \
52+
bdw-gc boost eigen fplll jansson libffi tbb \
53+
macaulay2/tap/factory fflas-ffpack flint frobby givaro \
54+
mpfi mpsolve ntl \
55+
memtailor mathic mathicgb
56+
brew link macaulay2/tap/factory --force
57+
# External programs bundled into the DMG
58+
brew install 4ti2 cohomcalg csdp gfan lrs msolve nauty normaliz topcom
59+
60+
# ----------------------
61+
# Set up build environment
62+
# ----------------------
63+
64+
- name: Prepare build environment
65+
run: |
66+
echo "$(brew --prefix ccache)/libexec" >> $GITHUB_PATH
67+
echo "$(brew --prefix make)/libexec/gnubin" >> $GITHUB_PATH
68+
echo "$(brew --prefix libtool)/libexec/gnubin" >> $GITHUB_PATH
69+
echo "$(brew --prefix bison)/bin" >> $GITHUB_PATH
70+
echo "CPPFLAGS=-I$(brew --prefix)/include -I$(brew --prefix libomp)/include -I$(brew --prefix readline)/include" >> $GITHUB_ENV
71+
echo "LDFLAGS=-L$(brew --prefix)/lib -L$(brew --prefix libomp)/lib -L$(brew --prefix readline)/lib" >> $GITHUB_ENV
72+
M2_VERSION=$(cat ../../VERSION)
73+
echo "M2_VERSION=$M2_VERSION" >> $GITHUB_ENV
74+
echo "PKG_NAME=Macaulay2-$M2_VERSION" >> $GITHUB_ENV
75+
76+
# ----------------------
77+
# Download external programs not available on Homebrew
78+
# ----------------------
79+
80+
- name: Download external programs
81+
run: |
82+
# phcpack (universal binary)
83+
curl -fsSL https://github.com/janverschelde/PHCpack/releases/download/v2.4.92/macphc \
84+
-o "$RUNNER_TEMP/phc"
85+
chmod +x "$RUNNER_TEMP/phc"
86+
87+
# bertini (arm64 only)
88+
if [ "${{ matrix.arch }}" = "arm64" ]; then
89+
curl -fsSL https://bertini.nd.edu/BertiniApple_v1.7.tar.gz \
90+
| tar -xz -C "$RUNNER_TEMP"
91+
cp "$RUNNER_TEMP/BertiniApple_v1.7/bertini" "$RUNNER_TEMP/bertini"
92+
chmod +x "$RUNNER_TEMP/bertini"
93+
fi
94+
95+
# ----------------------
96+
# Build Macaulay2 and create DMG
97+
# ----------------------
98+
99+
- name: Build and package Macaulay2
100+
env:
101+
WORKSPACE: ${{ github.workspace }}
102+
ARCH: ${{ matrix.arch }}
103+
DEPLOYMENT_TARGET: ${{ matrix.deployment_target }}
104+
run: make all
105+
106+
# ----------------------
107+
# Test the DMG
108+
# ----------------------
109+
110+
- name: Install DMG
111+
env:
112+
WORKSPACE: ${{ github.workspace }}
113+
ARCH: ${{ matrix.arch }}
114+
run: make install-dmg
115+
116+
- name: Run basic tests
117+
env:
118+
WORKSPACE: ${{ github.workspace }}
119+
ARCH: ${{ matrix.arch }}
120+
run: make run-basic-tests
121+
122+
- name: Run core tests
123+
env:
124+
WORKSPACE: ${{ github.workspace }}
125+
ARCH: ${{ matrix.arch }}
126+
run: make run-core-tests
127+
128+
- name: Run package tests
129+
# x86_64 runners are too slow and time out on --check 3
130+
if: matrix.arch == 'arm64'
131+
env:
132+
WORKSPACE: ${{ github.workspace }}
133+
ARCH: ${{ matrix.arch }}
134+
run: make run-package-tests
135+
136+
# ----------------------
137+
# Upload artifacts
138+
# ----------------------
139+
140+
- name: Upload build logs
141+
if: always()
142+
uses: actions/upload-artifact@v7
143+
with:
144+
name: ${{ env.PKG_NAME }}-${{ matrix.arch }}-logs
145+
path: |
146+
M2/BUILD/build/config.log
147+
M2/BUILD/build/include/*
148+
M2/BUILD/build/libraries/*/build/*/config.log
149+
150+
- name: Upload DMG
151+
if: success()
152+
uses: actions/upload-artifact@v7
153+
with:
154+
name: ${{ env.PKG_NAME }}-${{ matrix.arch }}-macOS
155+
path: "*.dmg"
156+
retention-days: 7

.github/workflows/build-rpm.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Build RPM packages
2-
on: workflow_dispatch
2+
on:
3+
workflow_dispatch:
4+
push:
5+
tags:
6+
- 'release-*'
37

48
jobs:
59
build-rpm:
@@ -17,16 +21,16 @@ jobs:
1721
- 8
1822
- 9
1923
- 10
20-
- 41
2124
- 42
2225
- 43
26+
- 44
2327
exclude:
24-
- distribution: almalinux
25-
release: 41
2628
- distribution: almalinux
2729
release: 42
2830
- distribution: almalinux
2931
release: 43
32+
- distribution: almalinux
33+
release: 44
3034
- distribution: fedora
3135
release: 8
3236
- distribution: fedora
@@ -42,7 +46,7 @@ jobs:
4246
RELEASE=${{ matrix.release }}
4347
- name: Upload artifacts
4448
if: always()
45-
uses: actions/upload-artifact@v6
49+
uses: actions/upload-artifact@v7
4650
with:
4751
name: ${{ matrix.os }}-${{ matrix.distribution }}-${{ matrix.release }}
4852
path: |

.github/workflows/make-dist.yml

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: Build distribution tarballs
2-
on: workflow_dispatch
2+
on:
3+
workflow_dispatch:
4+
push:
5+
tags:
6+
- 'release-*'
37

48
jobs:
59
make-dist:
@@ -9,7 +13,7 @@ jobs:
913
- name: Install build dependencies
1014
run: |
1115
sudo add-apt-repository -y ppa:macaulay2/macaulay2
12-
sudo apt-get install -y 4ti2 autoconf automake bison ca-certificates cohomcalg coinor-csdp fflas-ffpack flex g++ gdbmtool gfan gfortran git install-info libboost-dev libboost-regex-dev libboost-stacktrace-dev libcdd-dev libeigen3-dev libffi-dev libflint-dev libfplll-dev libfrobby-dev libgc-dev libgdbm-dev libgivaro-dev libglpk-dev libgmp-dev libgtest-dev liblzma-dev libmathic-dev libmathicgb-dev libmemtailor-dev libmpfi-dev libmpfr-dev libmps-dev libnauty-dev libncurses-dev libnormaliz-dev libntl-dev libopenblas-dev libpython3-dev libreadline-dev libsingular-dev libtbb-dev libtool-bin libxml2-dev lrslib make msolve nauty normaliz patch pkgconf python3 r-base singular-data time topcom wget zlib1g-dev
16+
sudo apt-get install -y 4ti2 autoconf automake bison ca-certificates cohomcalg coinor-csdp fflas-ffpack flex g++ gdbmtool gfan gfortran git install-info libboost-dev libboost-regex-dev libboost-stacktrace-dev libcdd-dev libeigen3-dev libffi-dev libflint-dev libfplll-dev libfrobby-dev libgc-dev libgdbm-dev libgivaro-dev libglpk-dev libgmp-dev libgtest-dev libjansson-dev liblzma-dev libmathic-dev libmathicgb-dev libmemtailor-dev libmpfi-dev libmpfr-dev libmps-dev libnauty-dev libncurses-dev libnormaliz-dev libntl-dev libopenblas-dev libpython3-dev libreadline-dev libsingular-dev libtbb-dev libtool-bin libxml2-dev lrslib make msolve nauty normaliz patch pkgconf python3 r-base singular-data time topcom wget zlib1g-dev
1317
- name: Build Macaulay2
1418
run: |
1519
cd M2/BUILD/build
@@ -23,7 +27,7 @@ jobs:
2327
make doc-dist
2428
- name: Upload artifacts
2529
if: always()
26-
uses: actions/upload-artifact@v6
30+
uses: actions/upload-artifact@v7
2731
with:
2832
name: dist-tarballs
2933
path: |

.github/workflows/no-stable-pr.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
name: Block PRs targeting stable
2+
3+
on:
4+
pull_request:
5+
branches: [ stable ]
6+
7+
jobs:
8+
block:
9+
if: github.repository == 'Macaulay2/M2'
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Fail
13+
run: |
14+
echo "::error::Pull requests targeting the 'stable' branch are not accepted. Please target 'development' instead."
15+
exit 1

.github/workflows/package-review.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ jobs:
2525
package: ${{ github.event.inputs.package }}
2626

2727
- name: Upload errors
28-
uses: actions/upload-artifact@v6
28+
uses: actions/upload-artifact@v7
2929
if: failure()
3030
with:
3131
name: ${{ github.event.inputs.package }}-errors

0 commit comments

Comments
 (0)