Skip to content

n - s -> negmod in nmod8/32 dot code (can be avoided, but quick fix f… #914

n - s -> negmod in nmod8/32 dot code (can be avoided, but quick fix f…

n - s -> negmod in nmod8/32 dot code (can be avoided, but quick fix f… #914

Workflow file for this run

name: CI
on: [push, pull_request]
jobs:
##############################################################################
# ubuntu with gcc
##############################################################################
ubuntu-gcc:
name: Ubuntu GCC, default flags with AVX2, Code Coverage (x10)
runs-on: ubuntu-latest
env:
MAKE: "make -j --output-sync=target"
CC: "gcc"
TESTCFLAGS: "-Wall -O1"
steps:
- uses: actions/checkout@v3
- name: "Setup"
run: |
sudo apt install -y libgmp-dev
sudo apt install -y libmpfr-dev
sudo apt install -y autoconf
sudo apt install -y libtool-bin
gcc --version
gcov --version
make --version
autoconf --version
libtool --version
- name: "Configure"
run: |
./bootstrap.sh
./configure CC=${CC} --enable-avx2 TESTCFLAGS="${TESTCFLAGS}" --disable-static --enable-coverage
- name: "Compile library"
run: |
$MAKE
ldd libflint.so
- name: "Compile tests"
run: |
export FLINT_TEST_MULTIPLIER=10
$MAKE tests
- name: "Check"
run: |
export FLINT_TEST_MULTIPLIER=10
$MAKE check
- name: "Gather coverage data"
run: dev/gather_coverage.sh
- name: "Upload coverage data"
uses: codecov/[email protected]
- if: failure()
name: "If failure, stop all other jobs"
uses: andymckay/[email protected]
##############################################################################
# ubuntu with gcc (assert)
##############################################################################
ubuntu-gcc-assert:
name: Ubuntu GCC (assert, x2)
runs-on: ubuntu-latest
env:
MAKE: "make -j --output-sync=target"
CC: "gcc"
CFLAGS: "-Wall -Werror=implicit-function-declaration"
steps:
- uses: actions/checkout@v3
- name: "Setup"
run: |
sudo apt install -y libgmp-dev
sudo apt install -y libmpfr-dev
sudo apt install -y autoconf
sudo apt install -y libtool-bin
gcc --version
make --version
autoconf --version
libtool --version
- name: "Configure"
run: |
./bootstrap.sh
./configure CC=${CC} CFLAGS="${CFLAGS}" --with-gmp=/usr --with-mpfr=/usr --enable-assert --disable-static
- name: "Compile library"
run: |
$MAKE
ldd libflint.so
- name: "Compile tests"
run: |
export FLINT_TEST_MULTIPLIER=2
$MAKE tests
- name: "Check"
run: |
export FLINT_TEST_MULTIPLIER=2
$MAKE check
- if: failure()
name: "If failure, stop all other jobs"
uses: andymckay/[email protected]
##############################################################################
# macos with gcc and blas
##############################################################################
macos-gcc:
name: macOS GCC with BLAS (x3)
runs-on: macos-latest
env:
MAKE: "gmake -j -l 10 --output-sync=target"
CFLAGS: "-Wall"
EXTRA_OPTIONS: "--disable-static --enable-shared"
CC: "gcc"
steps:
- uses: actions/checkout@v3
- name: "Setup"
run: |
brew install gcc
brew install make
brew install gmp
brew install mpfr
brew install autoconf
brew install libtool
brew install automake
brew install openblas
gcc --version
gmake --version
autoconf --version
- name: "Configure"
run: |
./bootstrap.sh
./configure CC=${CC} CFLAGS="${CFLAGS}" \
--with-gmp=$(brew --prefix) \
--with-mpfr=$(brew --prefix) \
--with-blas=$(brew --prefix)/opt/openblas \
${EXTRA_OPTIONS}
- name: "Compile library"
run: |
$MAKE
- name: "Compile tests"
run: |
export FLINT_TEST_MULTIPLIER=3
$MAKE tests
- name: "Check"
run: |
export FLINT_TEST_MULTIPLIER=3
$MAKE check
- if: failure()
name: "If failure, stop all other jobs"
uses: andymckay/[email protected]
##############################################################################
# freebsd with clang
##############################################################################
freebsd-gcc:
name: FreeBSD Clang (x0.5)
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
- name: "Run tests on FreeBSD"
uses: cross-platform-actions/[email protected]
timeout-minutes: 25
continue-on-error: true
with:
operating_system: freebsd
version: '13.1'
shell: bash
run: |
yes | sudo pkg install pkgconf
yes | sudo pkg install gmake
yes | sudo pkg install gmp
yes | sudo pkg install mpfr
yes | sudo pkg install autoconf
yes | sudo pkg install libtool
yes | sudo pkg install automake
gmake --version
clang --version
autoconf --version
libtool --version
touch _is_installed
export FLINT_TEST_MULTIPLIER=0.5
./bootstrap.sh
touch _is_bootstrapped
./configure CC=clang CFLAGS="-Wall" --disable-static --enable-shared \
--with-gmp-include=$(pkgconf --variable=includedir gmp) \
--with-gmp-lib=$(pkgconf --variable=libdir gmp) \
--with-mpfr-include=$(pkgconf --variable=includedir mpfr) \
--with-mpfr-lib=$(pkgconf --variable=libdir mpfr)
touch _is_configured
gmake -j
touch _is_built
gmake -j check
touch _is_checked
# Sometimes the FreeBSD runner cannot exit properly. We created files
# for each step to show that it was able to run the tests.
- name: "Check that everything was okay"
run: |
if test -e _is_installed;
then
if test -e _is_bootstrapped;
then
if test -e _is_configured;
then
if test -e _is_built;
then
if test -e _is_checked;
then
echo "All good!"
else
echo "Check failed!"
exit 5
fi
else
echo "Building failed!"
exit 4
fi
else
echo "Configuration failed!"
exit 3
fi
else
echo "Bootstrap failed!"
exit 2
fi
else
echo "Installation failed!"
exit 1
fi
# - if: failure()
# name: "If failure, stop all other jobs"
# uses: andymckay/[email protected]
##############################################################################
# cygwin with gcc
##############################################################################
cygwin-gcc:
name: Cygwin GCC (x1)
runs-on: windows-latest
defaults:
run:
shell: C:\cygwin64\bin\bash.exe --login -o igncr '{0}'
env:
MAKE: "make -j --output-sync=target"
REPO: /cygdrive/d/a/flint2/flint2 # FIXME: De-hardcode this
CFLAGS: "-Wall"
EXTRA_OPTIONS: "--enable-shared --disable-static"
CC: "gcc"
steps:
- uses: actions/checkout@v3
- name: "Set up Cygwin"
uses: gap-actions/setup-cygwin@v1
with:
PKGS_TO_INSTALL: "dos2unix,gcc-core,make,libgmp-devel,libmpfr-devel,libtool,autoconf,automake"
- name: "Setup"
run: |
gcc --version
make --version
autoconf --version
libtool --version
- name: "Configure"
run: |
cd ${REPO}
dos2unix configure
dos2unix bootstrap.sh
./bootstrap.sh
./configure CC=${CC} CFLAGS="${CFLAGS}" ${EXTRA_OPTIONS}
- name: "Compile library"
run: |
cd ${REPO}
${MAKE}
- name: "Compile tests"
run: |
cd ${REPO}
export FLINT_TEST_MULTIPLIER=1
$MAKE tests
- name: "Check"
run: |
cd ${REPO}
export FLINT_TEST_MULTIPLIER=1
$MAKE check
- if: failure()
name: "If failure, stop all other jobs"
uses: andymckay/[email protected]
#############################################################################
# ubuntu with clang
#############################################################################
ubuntu-clang:
name: Ubuntu Clang (x5)
runs-on: ubuntu-latest
env:
MAKE: "make -j --output-sync=target"
LOCAL: ${{ github.workspace }}/local
LDFLAGS: "-Wl,-rpath,$LOCAL/lib"
CFLAGS: "-Wall"
CC: "clang"
EXTRA_OPTIONS: "--disable-static --enable-shared"
steps:
- uses: actions/checkout@v3
- name: "Setup"
run: |
sudo apt install -y libgmp-dev
sudo apt install -y libmpfr-dev
sudo apt install -y autoconf
sudo apt install -y libtool-bin
clang --version
make --version
autoconf --version
libtool --version
- name: "Configure"
run: |
./bootstrap.sh
./configure CC=${CC} CFLAGS="${CFLAGS}" ${EXTRA_OPTIONS}
- name: "Compile library"
run: |
$MAKE
ldd libflint.so
- name: "Compile tests"
run: |
export FLINT_TEST_MULTIPLIER=5
$MAKE tests
- name: "Check"
run: |
export FLINT_TEST_MULTIPLIER=5
$MAKE check
- if: failure()
name: "If failure, stop all other jobs"
uses: andymckay/[email protected]
#############################################################################
# ubuntu with gcc and cmake (no checks)
#############################################################################
ubuntu-cmake-gcc:
name: Ubuntu GCC via CMake (no check)
runs-on: ubuntu-latest
env:
MAKE: "make -j --output-sync=target"
LOCAL: ${{ github.workspace }}/local
LDFLAGS: "-Wl,-rpath,$LOCAL/lib"
CFLAGS: "-Wall"
steps:
- uses: actions/checkout@v3
- name: "Setup"
run: |
sudo apt install -y cmake
sudo apt install -y libgmp-dev
sudo apt install -y libmpfr-dev
gcc --version
make --version
cmake --version
- name: "Configure"
run: |
mkdir build
cd build
cmake -G"Unix Makefiles" -DWITH_NTL=no -DBUILD_TESTING=yes \
-DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=${LOCAL} ..
- name: "Compile library"
run: |
cd build
$MAKE
ldd lib/libflint.so
- if: failure()
name: "If failure, stop all other jobs"
uses: andymckay/[email protected]
#############################################################################
# mingw with gcc
#############################################################################
mingw64-gcc:
name: MinGW GCC (x0.5)
runs-on: windows-latest
defaults:
run:
shell: msys2 {0}
env:
MAKE: "make -j --output-sync=target"
CFLAGS: "-Wall"
EXTRA_OPTIONS: "--enable-shared --disable-static"
CC: "gcc"
steps:
- uses: actions/checkout@v3
- name: "Setup MinGW"
uses: msys2/setup-msys2@v2
with:
msystem: mingw64
update: true
install: mingw-w64-x86_64-gcc mingw-w64-x86_64-autotools
- name: "Setup"
run: |
gcc --version
make --version
autoconf --version
libtool --version
- name: "Configure"
run: |
./bootstrap.sh
./configure CC=${CC} CFLAGS="${CFLAGS}" ${EXTRA_OPTIONS}
- name: "Compile library"
run: |
${MAKE}
- name: "Compile tests"
run: |
export FLINT_TEST_MULTIPLIER=0.5
${MAKE} tests
- name: "Check"
run: |
export FLINT_TEST_MULTIPLIER=0.5
${MAKE} check
- if: failure()
name: "If failure, stop all other jobs"
uses: andymckay/[email protected]
##############################################################################
# msvc
##############################################################################
msvc:
name: MSVC (x1, excl test)
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
- name: "Setup Conda"
uses: conda-incubator/[email protected]
with:
miniconda-version: "latest"
channels: conda-forge
- name: "Install dependencies"
run: |
conda install --yes -c conda-forge mpfr
conda install --yes -c conda-forge pthreads-win32
conda info
conda list
- name: "Setup MSVC"
uses: ilammy/[email protected]
with:
arch: x86_64
- name: "Configure"
run: |
mkdir build
cd build
set "LIB=C:\Miniconda3\Library\lib;%LIB%"
set "CPATH=C:\Miniconda3\Library\include;%CPATH%"
cmake -G "Ninja" -DCMAKE_C_FLAGS="/wd4018 /wd4146 /wd4244 /wd4267 /wd4305 /wd4996" -DBUILD_TESTING=ON -DCMAKE_BUILD_TYPE=Release ..
- name: "Build"
run: |
cd build
cmake --build . -- -j4
# FIXME: Preferably drop support of CMake and native Windows, or fix so
# that we can include the test again.
- name: "Test everything except where MPIR fails"
run: |
cd build
set "FLINT_TEST_MULTIPLIER=1"
ctest -j4 --output-on-failure --timeout 180 -E "src-ca_mat-test-t-exp"
- if: failure()
name: "If failure, stop all other jobs"
uses: andymckay/[email protected]
##############################################################################
# nemo
##############################################################################
nemo:
name: Nemo.jl
runs-on: ubuntu-latest
env:
MAKE: "make -j --output-sync=target"
LOCAL: ${{ github.workspace }}/local
CFLAGS: ""
EXTRA_OPTIONS: "--disable-static --enable-shared"
CC: "gcc"
steps:
- uses: actions/checkout@v3
- name: "Setup"
run: |
sudo apt install -y sed
sudo apt install -y libgmp-dev
sudo apt install -y libmpfr-dev
sudo apt install -y autoconf
sudo apt install -y libtool-bin
gcc --version
make --version
autoconf --version
libtool --version
julia --version
- name: "Configure"
run: |
# Make sure that we output an soname which corresponds to FLINT_JLL's
# soname
wget https://raw.githubusercontent.com/JuliaPackaging/Yggdrasil/master/F/FLINT/build_tarballs.jl
FLINT_JLL_VERSION=$(grep "upstream_version =" build_tarballs.jl | sed "s/upstream_version = v\"\([0-9\.]*\)\"/\1/")
FLINT_JLL_SONAME=$(grep "$FLINT_JLL_VERSION => " configure.ac | sed "s/# $FLINT_JLL_VERSION => \([0-9\.]\+\)/\1/")
FLINT_JLL_MAJOR=$(echo $FLINT_JLL_SONAME | sed "s/\([0-9]\+\)\.[0-9]\+\.[0-9]\+/\1/")
FLINT_JLL_MINOR=$(echo $FLINT_JLL_SONAME | sed "s/[0-9]\+\.\([0-9]\+\)\.[0-9]\+/\1/")
FLINT_JLL_PATCH=$(echo $FLINT_JLL_SONAME | sed "s/[0-9]\+\.[0-9]\+\.\([0-9]\+\)/\1/")
sed -i "s/^\(FLINT_MAJOR_SO=\)[0-9]\+/\1$FLINT_JLL_MAJOR/" configure.ac
sed -i "s/^\(FLINT_MINOR_SO=\)[0-9]\+/\1$FLINT_JLL_MINOR/" configure.ac
sed -i "s/^\(FLINT_PATCH_SO=\)[0-9]\+/\1$FLINT_JLL_PATCH/" configure.ac
# Now we can create the makefile
./bootstrap.sh
./configure CC=${CC} CFLAGS="${CFLAGS}" --prefix=${LOCAL} ${EXTRA_OPTIONS}
- name: "Compile and install"
run: |
$MAKE
$MAKE install
- name: "Set up Nemo.jl"
run: |
# Override FLINT_jll's libflint with ours
git clone https://github.com/Nemocas/Nemo.jl.git
julia -e "import Pkg; Pkg.develop(path=\"./Nemo.jl\");"
echo -e "[e134572f-a0d5-539d-bddf-3cad8db41a82]\nFLINT = \"${LOCAL}\"" > ~/.julia/artifacts/Overrides.toml
touch Nemo.jl/src/Nemo.jl
julia -e "using Nemo; println(\"Path to Nemo's libflint:\", Nemo.libflint)"
- name: "Check Nemo.jl"
run: |
julia -e "import Pkg; Pkg.test(\"Nemo\")"
# - if: failure()
# name: "If failure, stop all other jobs"
# uses: andymckay/[email protected]