mirror of
https://github.com/status-im/constantine.git
synced 2025-02-23 09:28:07 +00:00
* Implement a Sage codegenerator for frobenius constants * Sage codegen for pairings * Autogen of endomorphism acceleration constants * The autogen fixed a copy-paste bug in lattice decomposition. We can use conditional negation now and save an add+dbl in scalar mul * small fixes * sage code for square root bls12-377 is not old * readme updates * Provide test suggestions for derive_frobenius * indentation + add equation form to sage * Sage test vector generator * Use the json vectors - includes type system workaround: generic sandwich https://github.com/nim-lang/Nim/issues/11225 - converting NimNode to typedesc: https://github.com/nim-lang/Nim/issues/6785 * Delete old sage code * Install nim-serialization and nim-json-serialization in CI * CI nimble install force yes
142 lines
3.5 KiB
YAML
142 lines
3.5 KiB
YAML
# Travis config for Constantine
|
|
language: c
|
|
|
|
cache:
|
|
directories:
|
|
- nim-devel
|
|
- nim-stable
|
|
|
|
matrix:
|
|
include:
|
|
# Constantine only works with Nim devel
|
|
# Build and test using both gcc and clang
|
|
# Build and test on both x86-64 and ARM64
|
|
# 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"
|
|
- dist: bionic
|
|
arch: amd64
|
|
env:
|
|
- ARCH=amd64
|
|
- CHANNEL=devel
|
|
compiler: gcc
|
|
|
|
- dist: bionic
|
|
arch: arm64
|
|
env:
|
|
- ARCH=arm64
|
|
- 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"
|
|
|
|
- dist: bionic
|
|
arch: ppc64le
|
|
env:
|
|
- ARCH=powerpc64el
|
|
- CHANNEL=devel
|
|
compiler: gcc
|
|
|
|
# "Unknown processor s390x"
|
|
# - dist: bionic
|
|
# arch: s390x
|
|
# env:
|
|
# - ARCH=s390x
|
|
# - CHANNEL=devel
|
|
# compiler: gcc
|
|
|
|
# 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
|
|
- parallel
|
|
homebrew:
|
|
packages:
|
|
- gmp
|
|
# Travis `bundle` bug: https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/28
|
|
# - parallel
|
|
|
|
before_install:
|
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
|
HOMEBREW_NO_AUTO_UPDATE=1 brew install parallel;
|
|
fi
|
|
- |
|
|
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 stew serialization json_serialization
|
|
# 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
|
|
if [[ "$ARCH" == "amd64" ]]; then
|
|
nimble test_parallel_no_assembler
|
|
fi
|
|
fi
|
|
branches:
|
|
except:
|
|
- gh-pages
|