Skip to content

Commit

Permalink
Merge branch 'development' into locate
Browse files Browse the repository at this point in the history
  • Loading branch information
pzinn authored Aug 8, 2024
2 parents 0644561 + bf9ac3e commit a867e8d
Show file tree
Hide file tree
Showing 133 changed files with 3,903 additions and 2,470 deletions.
48 changes: 23 additions & 25 deletions .github/workflows/test_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,17 @@ name: Build and Test Macaulay2

on:
workflow_dispatch:
push:
branches:
- pre-master # when we're ready to merge 'development' into 'master', we merge it first into 'pre-master', so it can be tested
pull_request:
branches:
- master
- development
schedule:
# cron time in UTC
# a scheduled job runs on the default branch: 'master'
- cron: '0 6 * * *'
- cron: '0 6 * * SUN' # runs tests on the main branch every Sunday at 06:00 UTC

concurrency:
# Cancel in-progress runs when a new workflow with the same group name is triggered
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

defaults:
run:
Expand All @@ -35,28 +35,23 @@ jobs:
fail-fast: false
matrix:
build-system:
- cmake
- autotools
- cmake
os:
- ubuntu-22.04
- macos-12
- ubuntu-24.04
- macos-13
compiler:
- default
include:
- build-system: cmake
os: ubuntu-22.04
compiler: clang-15
cxx: clang++-15
cc: clang-15
# This build tests Clang rather than AppleClang (keep)
- build-system: cmake
os: macos-12
os: macos-13 # TODO: switch to macos-14 for arm64 testing
compiler: clang-15
cxx: clang++
cc: clang
exclude:
- build-system: cmake
os: macos-12
os: macos-13
compiler: default
steps:
- uses: actions/checkout@v4
Expand All @@ -70,8 +65,10 @@ jobs:
run: |
brew config
brew tap macaulay2/tap
brew install automake boost tbb ccache ctags llvm make ninja yasm libffi
brew install --overwrite python
brew install automake boost tbb ccache ctags texinfo llvm make ninja yasm libffi msolve
brew install --only-dependencies macaulay2/tap/M2
brew link factory --force
# ----------------------
# Install missing tools and libraries for Linux
Expand All @@ -80,14 +77,15 @@ jobs:
- name: Install requirements for Linux
if: runner.os == 'Linux'
run: |
sudo add-apt-repository -y -n ppa:macaulay2/macaulay2
sudo apt-get update
sudo apt-get install -y -q --no-install-recommends clang-15 gfortran libtool-bin ninja-build yasm ccache
sudo apt-get install -y -q --no-install-recommends libboost-stacktrace-dev \
sudo apt-get install -y -q --no-install-recommends clang-16 gfortran libtool-bin ninja-build yasm ccache
sudo apt-get install -y -q --no-install-recommends liblzma-dev libboost-stacktrace-dev \
libncurses-dev libncurses5-dev libreadline-dev libeigen3-dev liblapack-dev libxml2-dev \
libgc-dev libgdbm-dev libglpk-dev libgmp3-dev libgtest-dev libmpfr-dev libmpfi-dev libntl-dev gfan \
libgivaro-dev libboost-regex-dev fflas-ffpack libflint-dev libmps-dev libfrobby-dev \
libsingular-dev singular-data libcdd-dev cohomcalg topcom 4ti2 libnormaliz-dev normaliz coinor-csdp \
libnauty2-dev nauty lrslib polymake phcpack w3c-markup-validator libtbb-dev qepcad libomp-15-dev
libnauty-dev nauty lrslib polymake pipx phcpack w3c-markup-validator libtbb-dev qepcad libomp-16-dev msolve
# ----------------------
# Steps common to all build variants
Expand All @@ -99,7 +97,7 @@ jobs:
echo "CXX=${{ matrix.cxx }}" >> $GITHUB_ENV
if [[ "${{ runner.os }}" == "Linux" ]]
then shopt -s expand_aliases
alias llvm-config="/usr/bin/llvm-config-15"
alias llvm-config="/usr/bin/llvm-config-16"
echo "/usr/lib/ccache" >> $GITHUB_PATH
echo "/home/linuxbrew/.linuxbrew/bin" >> $GITHUB_PATH
else echo `brew --prefix ccache`/libexec >> $GITHUB_PATH
Expand Down Expand Up @@ -144,7 +142,7 @@ jobs:
if: matrix.build-system == 'cmake'
run: |
cmake --build . --target M2-core M2-emacs install-packages
if [[ "${{ runner.os }}" == "Linux" ]] && [[ "${{ matrix.compiler }}" == "clang-15" ]]; then
if [[ "${{ runner.os }}" == "Linux" ]] && [[ "${{ matrix.build-system }}" == "cmake" ]]; then
sudo apt-get install -y -q --no-install-recommends dpkg-dev
echo "GIT_COMMIT=`git describe --dirty --always --match HEAD`" >> $GITHUB_ENV
cpack -G DEB
Expand Down Expand Up @@ -175,7 +173,7 @@ jobs:
# ----------------------

- name: Run Tests using CTest
if: matrix.build-system == 'cmake' && runner.os == 'Linux' && matrix.compiler == 'clang-15'
if: matrix.build-system == 'cmake' && runner.os == 'macOS'
run: |
set -xe
./M2 -q --check 1 -e 'exit 0'
Expand All @@ -197,7 +195,7 @@ jobs:
- name: Validate HTML documentation
if: matrix.build-system == 'autotools' && runner.os == 'Linux'
run: |
python3 -m pip install html5validator
pipx install html5validator
if test ${{ github.event_name }} = pull_request
then
git fetch --depth=1 origin development
Expand Down Expand Up @@ -243,7 +241,7 @@ jobs:
M2/BUILD/build/Macaulay2/tests/*/*.errors
- name: Upload Macaulay2 package for Ubuntu (x86_64)
if: matrix.build-system == 'cmake' && runner.os == 'Linux' && matrix.compiler == 'clang-15' && success()
if: matrix.build-system == 'cmake' && runner.os == 'Linux' && success()
uses: actions/upload-artifact@v4
with:
name: Macaulay2-${{ env.GIT_COMMIT }}-ubuntu-x86_64
Expand Down
19 changes: 11 additions & 8 deletions M2/BUILD/docker/actions/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,36 +2,39 @@
# Net usage: ~255MB
# Disk usage: <1GB docker image + 650MB Macaulay2 build

FROM ubuntu:20.04
FROM ubuntu:24.04

ENV DEBIAN_FRONTEND noninteractive

RUN apt-get update && \
apt-get install -y software-properties-common apt-transport-https build-essential curl git gnupg && \
curl https://apt.kitware.com/keys/kitware-archive-latest.asc -s --output - | apt-key add - && \
echo 'deb https://apt.kitware.com/ubuntu/ focal main' > \
echo 'deb https://apt.kitware.com/ubuntu/ noble main' > \
/etc/apt/sources.list.d/cmake.list && \
add-apt-repository -y ppa:macaulay2/macaulay2 && \
apt-get update && apt-get install -y autoconf bison ccache cmake flex libtool ninja-build yasm && apt-get clean

# Programs and libraries we require to build
RUN apt-get install -y -q --no-install-recommends libatomic-ops-dev libboost-stacktrace-dev \
RUN apt-get install -y -q --no-install-recommends libboost-stacktrace-dev \
libncurses-dev libncurses5-dev libreadline-dev libeigen3-dev liblapack-dev libxml2-dev \
libgc-dev libgdbm-dev libglpk-dev libgmp3-dev libgtest-dev libmpfr-dev libntl-dev gfan \
libgc-dev libgdbm-dev libglpk-dev libgmp3-dev libgtest-dev libmpfr-dev libmpfi-dev libntl-dev gfan \
libgivaro-dev libboost-regex-dev fflas-ffpack libflint-dev libmps-dev libfrobby-dev \
libnauty-dev libnormaliz-dev libsingular-dev singular-data libcdd-dev \
cohomcalg topcom 4ti2 normaliz coinor-csdp nauty lrslib w3c-markup-validator libtbb-dev
cohomcalg topcom 4ti2 normaliz coinor-csdp nauty lrslib libtbb-dev

# Testing with clang-11 compiler
RUN apt-get install -y clang-11 llvm-11 && apt-get clean
#RUN apt-get install -y clang-16 llvm-16 libomp-16-dev && apt-get clean

RUN apt-get install -y -q --no-install-recommends mlocate bash-completion && apt-get clean && updatedb
# For testing optional programs
#RUN apt-get install -y polymake phcpack qepcad && apt-get clean

RUN apt-get install -y -q --no-install-recommends locate bash-completion && apt-get clean && updatedb

RUN add-apt-repository ppa:ubuntu-toolchain-r/test && \
apt-get update

# Needed for building with autotools
# RUN apt-get install -y -q liblzma-dev
# RUN apt-get install -y -q liblzma-dev w3c-markup-validator

# Add non-root user for building and running Macaulay2
RUN useradd -G sudo -g root -u 1000 -m macaulay
Expand Down
2 changes: 1 addition & 1 deletion M2/BUILD/docker/arch/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ RUN pacman --sync --noconfirm --refresh --needed \
RUN pacman --sync --noconfirm --needed openblas openmp intel-tbb libxml2 readline gdbm boost

# Libraries we can build
RUN pacman --sync --noconfirm --needed eigen fflas-ffpack givaro glpk gmp gc gtest mpfr ntl libatomic_ops
RUN pacman --sync --noconfirm --needed eigen fflas-ffpack givaro glpk gmp gc gtest mpfr ntl

# Optional packages
RUN pacman --sync --noconfirm mlocate bash-completion
Expand Down
2 changes: 1 addition & 1 deletion M2/BUILD/docker/brew/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# Net usage: ~700MB
# Disk usage: ~1GB

FROM homebrew/brew
FROM homebrew/ubuntu22.04:latest

# Install optional packages
RUN apt-get update && apt-get install -y -q --no-install-recommends vim mlocate && apt-get clean
Expand Down
3 changes: 0 additions & 3 deletions M2/BUILD/docker/debian/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ RUN apt-get install -y libopenblas-dev libxml2-dev libreadline-dev libgdbm-dev \
libboost-regex-dev libboost-stacktrace-dev libomp-dev libtbb-dev && \
apt-get clean

# This is a dependency that we should get rid of
RUN apt-get install -y libatomic-ops-dev && apt-get clean

# Libraries we can build (factory not available on ubuntu)
RUN apt-get install -y libeigen3-dev libglpk-dev libgmp3-dev libmpfr-dev \
libntl-dev libnauty-dev libnormaliz-dev libfrobby-dev libgc-dev && apt-get clean
Expand Down
2 changes: 1 addition & 1 deletion M2/BUILD/docker/fedora/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ RUN microdnf install autoconf bison ccache cmake curl diffutils file gcc-c++ git

# Libraries we require
RUN microdnf install openblas-devel libxml2-devel readline-devel gdbm-devel \
boost-devel libatomic_ops-devel libomp-dev libtbb-dev
boost-devel libomp-dev libtbb-dev

# Libraries we can build (factory not available on ubuntu)
RUN microdnf install eigen3-devel glpk-devel gmp-devel mpfr-devel ntl-devel \
Expand Down
4 changes: 2 additions & 2 deletions M2/BUILD/docker/gentoo/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ COPY --from=portage /var/db/repos/gentoo /var/db/repos/gentoo
RUN emerge --sync
RUN emerge -n cmake ninja

#RUN emerge --ask -n 4ti2 blas-reference lapack-reference boehm-gc boost cddlib coinor-csdp flint fplll frobby gdbm gfan glpk gmp gtest libatomic_ops lrslib mpc mpfr mpir nauty normaliz ntl topcom yasm sys-process/time
#RUN emerge --ask -n 4ti2 blas-reference lapack-reference boehm-gc boost cddlib coinor-csdp flint fplll frobby gdbm gfan glpk gmp gtest lrslib mpc mpfr mpir nauty normaliz ntl topcom yasm sys-process/time

# autoconf automake bison make patch ccache \
# gettext python cmake curl gcc git gnupg \
Expand All @@ -25,7 +25,7 @@ RUN emerge -n cmake ninja
#RUN pacman --sync --noconfirm --needed openblas openmp intel-tbb libxml2 readline gdbm boost

# Libraries we can build
#RUN pacman --sync --noconfirm --needed eigen fflas-ffpack givaro glpk gmp gc gtest mpfr ntl libatomic_ops
#RUN pacman --sync --noconfirm --needed eigen fflas-ffpack givaro glpk gmp gc gtest mpfr ntl

# Optional packages
#RUN pacman --sync --noconfirm mlocate bash-completion
Expand Down
10 changes: 3 additions & 7 deletions M2/BUILD/docker/ubuntu/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@
# Net usage: ~255MB
# Disk usage: <1GB docker image + 650MB Macaulay2 build

FROM ubuntu:focal
FROM ubuntu:noble

# Programs we require to build
RUN apt-get update && \
apt-get install -y apt-transport-https build-essential curl git gnupg && \
curl https://apt.kitware.com/keys/kitware-archive-latest.asc -s --output - | apt-key add - && \
echo 'deb https://apt.kitware.com/ubuntu/ focal main' > \
echo 'deb https://apt.kitware.com/ubuntu/ noble main' > \
/etc/apt/sources.list.d/cmake.list && \
apt-get update && apt-get install -y autoconf bison ccache cmake flex libtool ninja-build yasm && apt-get clean

Expand All @@ -20,14 +20,11 @@ RUN apt-get install -y libopenblas-dev libxml2-dev libreadline-dev libgdbm-dev \
libboost-regex-dev libboost-stacktrace-dev libomp-dev libtbb-dev && \
apt-get clean

# This is a dependency that we should get rid of
RUN apt-get install -y libatomic-ops-dev && apt-get clean

# Libraries we can build
RUN apt-get install -y --no-install-recommends software-properties-common && \
add-apt-repository -y ppa:macaulay2/macaulay2 && apt-get update && \
apt-get install -y -q --no-install-recommends libeigen3-dev libgc-dev \
libglpk-dev libgmp3-dev libmpfr-dev libmps-dev libgtest-dev \
libglpk-dev libgmp3-dev libmpfr-dev libmpfi-dev libmps-dev libgtest-dev \
libntl-dev libflint-dev libsingular-dev singular-data libfrobby-dev \
libnauty-dev libnormaliz-dev && apt-get clean

Expand All @@ -43,7 +40,6 @@ RUN apt-get update && \
apt-get update && apt-get clean

RUN apt-get install -y libgivaro-dev fflas-ffpack
RUN apt-get install -y libmpfi-dev

# Optional packages
RUN apt-get install -y mlocate bash-completion
Expand Down
3 changes: 0 additions & 3 deletions M2/BUILD/docker/valgrind/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ RUN apt-get install -y libopenblas-dev libxml2-dev libreadline-dev libgdbm-dev \
libboost-regex-dev libboost-stacktrace-dev libomp-dev libtbb-dev && \
apt-get clean

# This is a dependency that we should get rid of
RUN apt-get install -y libatomic-ops-dev && apt-get clean

# Libraries we can build
RUN apt-get install -y --no-install-recommends software-properties-common && \
add-apt-repository -y ppa:macaulay2/macaulay2 && apt-get update && \
Expand Down
6 changes: 3 additions & 3 deletions M2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
## 6. cmake --install BUILD/cmake
###############################################################################

## Requires CMake version 3.15 and is tested with 3.19
cmake_minimum_required(VERSION 3.15...3.19)
cmake_policy(VERSION 3.14)
## Requires CMake version 3.24 and is tested with 3.30
cmake_minimum_required(VERSION 3.24...3.30)
cmake_policy(VERSION 3.24)
cmake_policy(SET CMP0096 NEW) # preserve leading zeros in version number

## Use the C++20 standard
Expand Down
1 change: 1 addition & 0 deletions M2/LICENSING-NOTES
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ Programs we include with our distribution:

4ti2 GPL 2
gfan GPL 2
msolve GPL 2
normaliz GPL 3

Libraries linked with some of our programs:
Expand Down
2 changes: 1 addition & 1 deletion M2/Macaulay2/README.in
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ fitness for a particular purpose.

Some programs or packages may be distributed along with Macaulay2 according to the terms of
their own licenses, not affecting the license we offer you for Macaulay2
itself. These include the following programs: 4ti2, normaliz, and gfan.
itself. These include the following programs: 4ti2, normaliz, gfan, and msolve.

The source code for the libraries, programs, or packages that we use is
available on our web site at
Expand Down
1 change: 1 addition & 0 deletions M2/Macaulay2/d/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ set(DLIST
pthread0.d
stdiop0.d
gmp.d
ballarith.d
engine.dd
xml.d # removed unless WITH_XML
stdio0.d
Expand Down
1 change: 1 addition & 0 deletions M2/Macaulay2/d/Makefile.files.in
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ M2_DFILES += interrupts.d
M2_DFILES += pthread0.d
M2_DFILES += stdiop0.d
M2_DFILES += gmp.d
M2_DFILES += ballarith.d
M2_DFILES += engine.dd
ifeq (@XML@,yes)
M2_DFILES += xml.d
Expand Down
Loading

0 comments on commit a867e8d

Please sign in to comment.