-
Notifications
You must be signed in to change notification settings - Fork 235
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
204 changed files
with
1,262 additions
and
814 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ jobs: | |
name: ${{ matrix.build-system }}-${{ matrix.os }}-${{ matrix.compiler }} | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false # eventually make this true | ||
fail-fast: true | ||
matrix: | ||
build-system: | ||
- cmake | ||
|
@@ -54,11 +54,15 @@ jobs: | |
cxx: clang++-10 | ||
cc: clang-10 | ||
# This build tests Clang rather than AppleClang (keep) | ||
#- build-system: cmake | ||
# os: macos-latest | ||
# compiler: clang10 | ||
# cxx: clang++ | ||
# cc: clang | ||
- build-system: cmake | ||
os: macos-latest | ||
compiler: clang10 | ||
cxx: clang++ | ||
cc: clang | ||
exclude: | ||
- build-system: cmake | ||
os: macos-latest | ||
compiler: default | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
@@ -71,9 +75,12 @@ jobs: | |
if: runner.os == 'macOS' | ||
run: | | ||
brew config | ||
# autoconf, libtool are already in the virtual env | ||
brew install automake ccache gnu-tar make ninja pkg-config yasm | ||
brew install bdw-gc boost cddlib eigen flint glpk libatomic_ops libomp mpfr mpir ncurses ntl tbb | ||
brew tap macaulay2/tap | ||
brew install autoconf automake bison ccache cmake gnu-tar libtool make ninja pkg-config yasm | ||
brew install bdw-gc boost eigen gdbm readline libatomic_ops libxml2 libomp tbb | ||
brew install gmp mpfr ntl [email protected] [email protected] mpsolve glpk | ||
brew install frobby memtailor mathic mathicgb givaro fflas-ffpack | ||
brew install 4ti2 cohomcalg csdp gfan lrs nauty normaliz topcom | ||
# ---------------------- | ||
# Install missing tools and libraries for Linux | ||
|
@@ -88,10 +95,9 @@ jobs: | |
sudo apt-get install -y -q --no-install-recommends libatomic-ops-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 libntl-dev gfan \ | ||
libcdd-dev libgivaro-dev libboost-regex-dev fflas-ffpack w3c-markup-validator \ | ||
cohomcalg libflint-dev libmps-dev topcom \ | ||
libsingular-dev libfrobby-dev libgtest-dev libmemtailor-dev libmathic-dev \ | ||
libmathicgb-dev 4ti2 normaliz coinor-csdp nauty lrslib singular-data | ||
libgivaro-dev libboost-regex-dev fflas-ffpack libflint-dev libmps-dev libfrobby-dev \ | ||
libsingular-dev singular-data libmemtailor-dev libmathic-dev libmathicgb-dev libcdd-dev \ | ||
cohomcalg topcom 4ti2 normaliz coinor-csdp nauty lrslib w3c-markup-validator | ||
# ---------------------- | ||
# Steps common to all build variants | ||
|
@@ -101,7 +107,6 @@ jobs: | |
run: | | ||
echo "CC=${{ matrix.cc }}" >> $GITHUB_ENV | ||
echo "CXX=${{ matrix.cxx }}" >> $GITHUB_ENV | ||
echo "LD_LIBRARY_PATH=`brew --prefix`/lib:$LD_LIBRARY_PATH" >> $GITHUB_ENV | ||
if [[ "${{ runner.os }}" == "Linux" ]] | ||
then echo "/usr/lib/ccache" >> $GITHUB_PATH | ||
# ccache doesn't seem to create the right symlink for clang-10 on ubuntu | ||
|
@@ -112,17 +117,17 @@ jobs: | |
fi | ||
- uses: actions/cache@v2 | ||
if: matrix.build-system == 'cmake' # TODO: remove when autotools is more efficient with space | ||
if: matrix.build-system == 'cmake' | ||
id: restore-cache | ||
with: | ||
path: | | ||
~/.ccache | ||
~/work/M2/M2/M2/BUILD/build/usr-host | ||
key: build-cache-${{ runner.os }}-${{ matrix.compiler }}-${{ matrix.build-system }}-${{ hashFiles('**/cmake/*-libraries.cmake') }} | ||
restore-keys: | | ||
build-cache-${{ runner.os }}-${{ matrix.compiler }}-${{ matrix.build-system }}- | ||
build-cache-${{ runner.os }}-${{ matrix.compiler }}- | ||
build-cache-${{ runner.os }}- | ||
key: build-cache-${{ runner.os }}-${{ matrix.compiler }}-${{ matrix.build-system }}-${{ hashFiles('**/cmake/*-libraries.cmake', '.github/workflows/test_build.yml') }} | ||
# restore-keys: | | ||
# build-cache-${{ runner.os }}-${{ matrix.compiler }}-${{ matrix.build-system }}- | ||
# build-cache-${{ runner.os }}-${{ matrix.compiler }}- | ||
# build-cache-${{ runner.os }}- | ||
|
||
|
||
# ---------------------- | ||
|
@@ -132,12 +137,15 @@ jobs: | |
- name: Configure Macaulay2 using CMake | ||
if: matrix.build-system == 'cmake' | ||
run: | | ||
deps=`brew deps --1 --include-optional macaulay2/tap/M2 | tr '\n' ';'` | ||
paths=$HOMEBREW_PREFIX/opt/${deps//;/;$HOMEBREW_PREFIX/opt/} | ||
cmake -S../.. -B. -GNinja \ | ||
-DCMAKE_BUILD_TYPE=MinSizeRel -DCMAKE_SYSTEM_PREFIX_PATH=`brew --prefix` \ | ||
-DBUILD_NATIVE=OFF -DBUILD_LIBRARIES="Givaro;FFLAS_FFPACK" # TODO: remove when the packages are updated | ||
-DCMAKE_BUILD_TYPE=MinSizeRel -DBUILD_NATIVE=OFF \ | ||
-DCMAKE_PREFIX_PATH=$paths \ | ||
-DCMAKE_INSTALL_PREFIX=/usr | ||
- name: Build libraries using Ninja | ||
if: matrix.build-system == 'cmake' # && steps.restore-cache.outputs.cache-hit != 'true' | ||
if: matrix.build-system == 'cmake' | ||
run: | | ||
cmake --build . --target build-libraries build-programs | ||
|
@@ -160,6 +168,8 @@ jobs: | |
run: | | ||
make -C ../.. get-libtool get-automake get-autoconf | ||
make -C ../.. all | ||
export CPPFLAGS=-I`brew --prefix`/include | ||
export LDFLAGS=-L`brew --prefix`/lib | ||
../../configure --enable-download | ||
- name: Build Macaulay2 using Make | ||
|
@@ -200,6 +210,7 @@ jobs: | |
path: | | ||
# Autotools | ||
M2/BUILD/build/config.log | ||
M2/BUILD/build/include/* | ||
M2/BUILD/build/libraries/*/build/*/config.log | ||
# CMake | ||
M2/BUILD/build/CMakeFiles/CMakeCache.txt | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,3 @@ | ||
storage | ||
!storage/.emacs | ||
nightly/*.zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# Time usage: <15min | ||
# Net usage: ~700MB | ||
# Disk usage: ~1GB | ||
|
||
FROM linuxbrew/brew | ||
|
||
# Install optional packages | ||
RUN apt-get update && apt-get install -y -q --no-install-recommends vim mlocate && apt-get clean | ||
|
||
USER 1000:0 | ||
|
||
# Add the tap containing the formulae for Macaulay2 and its dependencies | ||
RUN brew update && brew config && brew tap Macaulay2/tap | ||
|
||
RUN brew install bash-completion && echo '\n\ | ||
[[ -r "`brew --prefix`/etc/profile.d/bash_completion.sh" ]] && \n\ | ||
. "`brew --prefix`/etc/profile.d/bash_completion.sh"' >> /home/linuxbrew/.bashrc | ||
|
||
# Install dependencies of Macaulay2 | ||
#RUN brew install --only-dependencies Macaulay2/tap/macaulay2 | ||
|
||
# Install Macaulay2 | ||
#RUN brew install --verbose --build-bottle Macaulay2/tap/macaulay2 | ||
|
||
RUN sudo updatedb | ||
|
||
WORKDIR /home/linuxbrew |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
## Parameters | ||
TAG = m2-homebrew | ||
M2_HOME = /home/linuxbrew | ||
M2_REPO = $(shell git rev-parse --show-toplevel) | ||
STORAGE = $(M2_REPO)/M2/BUILD/docker/storage | ||
|
||
VOLUME-A = --volume /home/linuxbrew:$(M2_HOME) | ||
VOLUME-B = --volume $(STORAGE)/.cache:$(M2_HOME)/.cache | ||
VOLUME-C = --volume $(M2_REPO):$(M2_HOME)/M2 | ||
|
||
############################################################################### | ||
|
||
always:; @cat README.md | ||
|
||
all: build shell | ||
|
||
############################################################################### | ||
# Build targets | ||
|
||
build: build-image | ||
|
||
build-image:; docker build --tag $(TAG) . | ||
|
||
############################################################################### | ||
# Terminal targets | ||
|
||
shell: shell-linux | ||
|
||
# Run this on Linux | ||
shell-linux:; docker run $(VOLUME-A) $(VOLUME-C) -it --entrypoint bash $(TAG) | ||
|
||
# Run this on macOS | ||
shell-macos:; docker run $(VOLUME-B) $(VOLUME-C) -it --entrypoint bash $(TAG) | ||
|
||
shell-raw:; docker run $(VOLUME-C) -it --entrypoint bash $(TAG) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
# Bottling Macaulay2 for [Homebrew](https://brew.sh/) | ||
|
||
Homebrew is a package manager for macOS and Linux. The `Dockerfile` in this directory creates a container image based on Ubuntu 20.04 for building and testing the Homebrew formula for Macaulay2 available at [`Macaulay2/tap`](https://github.com/Macaulay2/homebrew-tap). | ||
|
||
## Getting Started | ||
0. Install Docker and start the daemon (optionally, also install [Homebrew](https://brew.sh/)). | ||
|
||
1. Build the container using Docker: | ||
``` | ||
make build | ||
``` | ||
|
||
2. Enter the shell: | ||
``` | ||
make shell-linux # if you are using Linuxbrew | ||
make shell-macos # if you are using Homebrew | ||
``` | ||
|
||
3. Bottle Macaulay2: | ||
``` | ||
brew install --keep-tmp --verbose --build-bottle Macaulay2/tap/M2 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.