constantine/.travis.yml

138 lines
3.3 KiB
YAML
Raw Permalink Normal View History

# Travis config for Constantine
language: c
cache:
directories:
- nim-devel
- nim-stable
matrix:
include:
# Travis pricing change https://blog.travis-ci.com/2020-11-02-travis-ci-new-billing
# Keep only ARM64 and PPC
# Constantine only works with Nim devel
# Build and test using both gcc and clang
# Build and test on both x86-64 and ARM64
Internals refactor + renewed focus on perf (#17) * Lay out the refactoring objectives and tradeoffs * Refactor the 32 and 64-bit primitives [skip ci] * BigInts and Modular BigInts compile * Make the bigints test compile * Fix modular reduction * Fix reduction tests vs GMP * Implement montegomery mul, pow, inverse, WIP finite field compilation * Make FiniteField compile * Fix exponentiation compilation * Fix Montgomery magic constant computation for 2^64 words * Fix typo in non-optimized CIOS - passing finite fields IO tests * Add limbs comparisons [skip ci] * Fix on precomputation of the Montgomery magic constant * Passing all tests including 𝔽p2 * modular addition, the test for mersenne prime was wrong * update benches * Fix "nimble test" + typo on out-of-place field addition * bigint division, normalization is needed: https://travis-ci.com/github/mratsim/constantine/jobs/298359743 * missing conversion in subborrow non-x86 fallback - https://travis-ci.com/github/mratsim/constantine/jobs/298359744 * Fix little-endian serialization * Constantine32 flag to run 32-bit constantine on 64-bit machines * IO Field test, ensure that BaseType is used instead of uint64 when the prime can field in uint32 * Implement proper addcarry and subborrow fallback for the compile-time VM * Fix export issue when the logical wordbitwidth == physical wordbitwidth - passes all tests (32-bit and 64-bit) * Fix uint128 on ARM * Fix C++ conditional copy and ARM addcarry/subborrow * Add investigation for SIGFPE in Travis * Fix debug display for unsafeDiv2n1n * multiplexer typo * moveMem bug in glibc of Ubuntu 16.04? * Was probably missing an early clobbered register annotation on conditional mov * Note on Montgomery-friendly moduli * Strongly suspect a GCC before GCC 7 codegen bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87139) * hex conversion was (for debugging) not taking requested order into account + inlining comment * Use 32-bit limbs on ARM64, uint128 builtin __udivti4 bug? * Revert "Use 32-bit limbs on ARM64, uint128 builtin __udivti4 bug?" This reverts commit 087f9aa7fb40bbd058d05cbd8eec7fc082911f49. * Fix subborrow fallback for non-x86 (need to maks the borrow)
2020-03-16 15:33:51 +00:00
# Ubuntu Bionic (18.04) is needed, it includes
# GCC 7 codegen fixes to addcarry_u64.
# Clang 9 (and GCC-6) are needed for inline assembly "flag output constraints"
Internals refactor + renewed focus on perf (#17) * Lay out the refactoring objectives and tradeoffs * Refactor the 32 and 64-bit primitives [skip ci] * BigInts and Modular BigInts compile * Make the bigints test compile * Fix modular reduction * Fix reduction tests vs GMP * Implement montegomery mul, pow, inverse, WIP finite field compilation * Make FiniteField compile * Fix exponentiation compilation * Fix Montgomery magic constant computation for 2^64 words * Fix typo in non-optimized CIOS - passing finite fields IO tests * Add limbs comparisons [skip ci] * Fix on precomputation of the Montgomery magic constant * Passing all tests including 𝔽p2 * modular addition, the test for mersenne prime was wrong * update benches * Fix "nimble test" + typo on out-of-place field addition * bigint division, normalization is needed: https://travis-ci.com/github/mratsim/constantine/jobs/298359743 * missing conversion in subborrow non-x86 fallback - https://travis-ci.com/github/mratsim/constantine/jobs/298359744 * Fix little-endian serialization * Constantine32 flag to run 32-bit constantine on 64-bit machines * IO Field test, ensure that BaseType is used instead of uint64 when the prime can field in uint32 * Implement proper addcarry and subborrow fallback for the compile-time VM * Fix export issue when the logical wordbitwidth == physical wordbitwidth - passes all tests (32-bit and 64-bit) * Fix uint128 on ARM * Fix C++ conditional copy and ARM addcarry/subborrow * Add investigation for SIGFPE in Travis * Fix debug display for unsafeDiv2n1n * multiplexer typo * moveMem bug in glibc of Ubuntu 16.04? * Was probably missing an early clobbered register annotation on conditional mov * Note on Montgomery-friendly moduli * Strongly suspect a GCC before GCC 7 codegen bug (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=87139) * hex conversion was (for debugging) not taking requested order into account + inlining comment * Use 32-bit limbs on ARM64, uint128 builtin __udivti4 bug? * Revert "Use 32-bit limbs on ARM64, uint128 builtin __udivti4 bug?" This reverts commit 087f9aa7fb40bbd058d05cbd8eec7fc082911f49. * Fix subborrow fallback for non-x86 (need to maks the borrow)
2020-03-16 15:33:51 +00:00
- dist: bionic
arch: arm64
env:
- ARCH=arm64
- CHANNEL=stable
compiler: gcc
# - dist: bionic
# arch: ppc64le
# env:
# - ARCH=powerpc64el
# - CHANNEL=stable
# compiler: gcc
# "Unknown processor s390x"
# - dist: bionic
# arch: s390x
# env:
# - ARCH=s390x
# - CHANNEL=devel
# compiler: gcc
# - dist: bionic
# arch: amd64
# env:
# - ARCH=amd64
# - CHANNEL=devel
# compiler: gcc
#
# - dist: bionic
# arch: amd64
# env:
# - ARCH=amd64
# - CHANNEL=devel
# compiler: clang # Need Clang 9 for inline ASM test, but can't easily install it
# # addons:
# # apt:
# # sources:
# # - ubuntu-toolchain-r-test
# # - llvm-toolchain-bionic-9.0 # LLVM 9 repo is disallowed
# # packages:
# # - clang-9.0
# # env:
# # - MATRIX_EVAL="CC=clang-9.0 && CXX=clang++-9.0"
#
# # On OSX we only test against clang (gcc is mapped to clang by default)
# - os: osx
# osx_image: xcode11.5 # Need xcode 11.4.2 min for Clang 9
# arch: amd64
# env:
# - ARCH=amd64
# - CHANNEL=devel
# compiler: clang
fast_finish: true
# Submodules are only for benchmarks, don't clone them
git:
submodules: false
addons:
apt:
packages:
- libgmp-dev
homebrew:
packages:
- gmp
before_install:
- |
if [ "${CHANNEL}" = stable ]; then
BRANCH="v$(curl https://nim-lang.org/channels/stable)"
else
BRANCH="${CHANNEL}"
fi
install:
# Detect caching of Nim compiler
- |
if [ ! -x "nim-${CHANNEL}/bin/nim" ]; then
git clone -b "${BRANCH}" https://github.com/nim-lang/nim "nim-${CHANNEL}/"
pushd "nim-${CHANNEL}"
git clone --depth 1 https://github.com/nim-lang/csources csources/
pushd csources
sh build.sh
popd
rm -rf csources
bin/nim c koch
./koch boot -d:release
./koch tools
else
pushd "nim-${CHANNEL}"
git fetch origin "${BRANCH}"
if [[ $(git merge FETCH_HEAD | grep -c "Already up to date.") -ne 1 ]]; then
bin/nim c koch
./koch boot -d:release
./koch tools
fi
fi
popd
before_script:
- export PATH="$PWD/nim-${CHANNEL}/bin${PATH:+:$PATH}"
script:
- nimble refresh
- nimble install -y gmp jsony
# Installing Clang9.0 or later is a pain in Travis
# for inline assembly "flag output constraint"
# Also MacOS build is timing out with 2 series of tests.
- |
if [[ "$TRAVIS_COMPILER" == "clang" ]]; then
nimble test_parallel_no_assembler
else
nimble test_parallel
fi
branches:
except:
- gh-pages