Update portability tests to use Meson #109
Workflow file for this run
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
name: CI Linux | |
on: | |
push: | |
tags: | |
- '*' | |
# TODO: Remove this before merging | |
pull_request: | |
workflow_dispatch: | |
# Allow to run manually | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
container: | |
#- ubuntu:trusty # TODO: Upgrade Python to 3.9 | |
#- ubuntu:xenial # TODO: Upgrade Python to 3.9 | |
#- ubuntu:bionic # TODO: Upgrade Python to 3.9 | |
- ubuntu:focal # TODO: Cannot find gap although installed | |
- ubuntu:jammy # TODO: Could not build wheels for fpylll, lrcalc | |
- ubuntu:lunar # TODO: Could not build wheels for lrcalc | |
- ubuntu:mantic # TODO: Could not build wheels for lrcalc | |
#- debian:buster # TODO: Upgrade Python to 3.9 | |
- debian:bullseye # TODO: Fix lcalc include (its installed) | |
- debian:bookworm # TODO: Could not build wheels for lrcalc | |
#- debian:trixie # libbrial-dev is not available (has been removed?) | |
- debian:sid # TODO: Could not build wheels for lrcalc | |
- debian:experimental # TODO: ERROR: Could not build wheels for lrcalc | |
- linuxmintd/mint20.1-amd64 # TODO: Cannot find gap although installed | |
- linuxmintd/mint20.2-amd64 # TODO: Cannot find gap although installed | |
- linuxmintd/mint20.3-amd64 # TODO: Cannot find gap although installed | |
- linuxmintd/mint21-amd64 # TODO: Could not build wheels for fpylll, lrcalc | |
- linuxmintd/mint21.1-amd64 # TODO: Could not build wheels for fpylll, lrcalc | |
- linuxmintd/mint21.2-amd64 # TODO: Could not build wheels for fpylll, lrcalc | |
#- fedora:30 # TODO: Upgrade Python to 3.9 | |
#- fedora:31 # TODO: Upgrade Python to 3.9 | |
#- fedora:32 # TODO: Upgrade Python to 3.9 | |
- fedora:33 # TODO: Fix lcalc include (its installed) | |
- fedora:34 # TODO: Fix lcalc include (its installed) | |
- fedora:35 # TODO: Fix lcalc include (its installed) | |
- fedora:36 # TODO: Could not build wheels for fpylll, | |
- fedora:37 # TODO: Could not build wheels for fpylll | |
- fedora:38 | |
- fedora:39 # TODO: Could not build wheels for gmpy2 | |
#- centos:centos7 # TODO: Upgrade Python to 3.9 | |
#- quay.io/centos/centos:stream8 # TODO: Upgrade Python to 3.9 | |
#- quay.io/centos/centos:stream9 # TODO (cypari): Figure out how to install pari | |
#- almalinux:8 # TODO: Upgrade Python to 3.9 | |
#- almalinux:9 # TODO (cypari): Figure out how to install pari | |
- sheerluck/sage-on-gentoo-stage4 | |
- archlinux | |
#- opensuse/leap:15.3 # TODO: Preinstall git in image | |
#- opensuse/leap:15.4 # TODO: Preinstall git in image | |
#- opensuse/leap:15.5 # TODO: Preinstall git in image | |
#- opensuse/tumbleweed # TODO (cypari): gphelp is broken? | |
#- i386/ubuntu:bionic # TODO: Preinstall node in image | |
#- i386/debian:bullseye # TODO: Preinstall node in image | |
container: | |
image: ${{ matrix.container }} | |
env: | |
# For debian compatibility | |
PIP_BREAK_SYSTEM_PACKAGES: 1 | |
steps: | |
- name: Checkout code | |
# cannot use v4 yet because of https://github.com/actions/checkout/issues/1487 | |
uses: actions/checkout@v3 | |
- name: Install dependencies | |
run: | | |
SYSTEM=$(build/bin/sage-guess-package-system) | |
INSTALL_PYTHON=$(python3 -c 'import sys; print(sys.version_info < (3, 9))' || echo 'True') | |
eval $(build/bin/sage-print-system-package-command $SYSTEM update) | |
# We cannot use the setup python action because it doesn't support all containers | |
# https://github.com/actions/setup-python/issues/527 | |
if [ $INSTALL_PYTHON = 'True' ]; then | |
eval $(build/bin/sage-print-system-package-command $SYSTEM --yes --ignore-missing install python-pip python3-pip python3-venv) | |
fi | |
eval $(build/bin/sage-print-system-package-command $SYSTEM --yes --ignore-missing install $(build/bin/sage-get-system-packages $SYSTEM $(build/bin/sage-package list :standard:))) | |
# Create a virtual environment (some systems do not allow to install packages globally) | |
pip3 install --user --upgrade virtualenv | |
python3 -m venv ../venv --system-site-packages | |
. ../venv/bin/activate | |
echo PATH=$PATH >> $GITHUB_ENV # Make it so venv is inherited for other steps | |
pip3 install --upgrade pip | |
# Needed for bootstrap | |
pip3 install jinja2 | |
# Needed to download and install cypari2, fplll and lrcalc below | |
eval $(build/bin/sage-print-system-package-command $SYSTEM --yes --ignore-missing install git wget) | |
# Needed for primecountpy | |
eval $(build/bin/sage-print-system-package-command $SYSTEM --yes --ignore-missing install $(build/bin/sage-get-system-packages $SYSTEM primecount)) | |
# Arch Linux docker image does not install info files, so remove the entry to Maxima's help files from pacman | |
# see https://github.com/sagemath/sage/pull/36391 for details | |
if [ $SYSTEM = 'archlinux' ]; then | |
sed -i '/^NoExtract/d' /etc/pacman.conf; | |
fi | |
# Needed for lrcalc | |
if [ ${{ matrix.container }} = "ubuntu:jammy" ] || [ ${{ matrix.container }} = "ubuntu:lunar" ] || [ ${{ matrix.container }} = "ubuntu:mantic" ] || [ ${{ matrix.container }} = "debian:bookworm" ] || [ ${{ matrix.container }} = "debian:sid" ] || [ ${{ matrix.container }} = "debian:experimental" ] || [ ${{ matrix.container }} = "linuxmintd/mint21-amd64" ] || [ ${{ matrix.container }} = "fedora:38" ]; then | |
wget math.rutgers.edu/~asbuch/lrcalc/lrcalc-2.1.tar.gz \ | |
&& tar zxvf lrcalc-2.1.tar.gz \ | |
&& cd lrcalc-2.1 \ | |
&& ./configure \ | |
&& make \ | |
&& sudo make install | |
fi | |
# Needed for fpylll | |
if [ ${{ matrix.container }} = "fedora:36" ] || [ ${{ matrix.container }} = "fedora:37" ]; then | |
FPLLL_VERSION=5.4.5 | |
wget https://github.com/fplll/fplll/releases/download/${FPLLL_VERSION}/fplll-${FPLLL_VERSION}.tar.gz \ | |
&& tar -xf fplll-${FPLLL_VERSION}.tar.gz \ | |
&& cd fplll-${FPLLL_VERSION} \ | |
&& ./autogen.sh \ | |
&& ./configure \ | |
&& make \ | |
&& make install | |
fi | |
env: | |
PARI_VERSION: pari-2.15.4 | |
- name: Bootstrap | |
run: | | |
python3 -m sage_setup.autogen.interpreters src/sage/ext/interpreters | |
env: | |
PYTHONPATH: src | |
- name: Build | |
run: | | |
# Cannot yet use build isolation due to https://github.com/sagemath/cypari2/issues/143 | |
pip3 install 'meson>=1.3.1' 'meson-python' 'cython>=3.0.0,!=3.0.3' 'numpy>=1.19' 'cysignals>=1.10.2' 'gmpy2>=2.1.0' 'memory_allocator' | |
# dependencies of cypari2 | |
pip3 install wheel setuptools | |
pip3 install --no-build-isolation git+https://github.com/sagemath/cypari2.git | |
pip3 install --no-build-isolation . -v | |
- name: Test | |
run: | | |
./sage -t --all -p4 || true | |