2020-02-23 16:56:43 +00:00
|
|
|
# Travis config for Constantine
|
|
|
|
language: c
|
|
|
|
|
|
|
|
cache:
|
|
|
|
directories:
|
|
|
|
- nim-devel
|
|
|
|
- nim-stable
|
|
|
|
|
|
|
|
matrix:
|
|
|
|
include:
|
2020-12-12 18:47:45 +00:00
|
|
|
# Travis pricing change https://blog.travis-ci.com/2020-11-02-travis-ci-new-billing
|
|
|
|
# Keep only ARM64 and PPC
|
|
|
|
|
2020-02-23 16:56:43 +00:00
|
|
|
# Constantine only works with Nim devel
|
|
|
|
# Build and test using both gcc and clang
|
|
|
|
# Build and test on both x86-64 and ARM64
|
2020-03-16 15:33:51 +00:00
|
|
|
# Ubuntu Bionic (18.04) is needed, it includes
|
|
|
|
# GCC 7 codegen fixes to addcarry_u64.
|
2020-08-20 08:21:39 +00:00
|
|
|
# Clang 9 (and GCC-6) are needed for inline assembly "flag output constraints"
|
2020-02-23 16:56:43 +00:00
|
|
|
|
2020-03-16 15:33:51 +00:00
|
|
|
- dist: bionic
|
2020-02-23 16:56:43 +00:00
|
|
|
arch: arm64
|
|
|
|
env:
|
|
|
|
- ARCH=arm64
|
|
|
|
- CHANNEL=devel
|
|
|
|
compiler: gcc
|
|
|
|
|
2020-08-31 21:13:16 +00:00
|
|
|
- dist: bionic
|
|
|
|
arch: ppc64le
|
|
|
|
env:
|
|
|
|
- ARCH=powerpc64el
|
|
|
|
- CHANNEL=devel
|
|
|
|
compiler: gcc
|
|
|
|
|
2020-08-31 21:36:23 +00:00
|
|
|
# "Unknown processor s390x"
|
|
|
|
# - dist: bionic
|
|
|
|
# arch: s390x
|
|
|
|
# env:
|
|
|
|
# - ARCH=s390x
|
|
|
|
# - CHANNEL=devel
|
|
|
|
# compiler: gcc
|
2020-08-31 21:13:16 +00:00
|
|
|
|
2020-12-12 18:47:45 +00:00
|
|
|
# - 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
|
2020-02-23 16:56:43 +00:00
|
|
|
fast_finish: true
|
|
|
|
|
|
|
|
# Submodules are only for benchmarks, don't clone them
|
|
|
|
git:
|
|
|
|
submodules: false
|
|
|
|
|
|
|
|
addons:
|
|
|
|
apt:
|
|
|
|
packages:
|
|
|
|
- libgmp-dev
|
2020-06-07 17:39:34 +00:00
|
|
|
- parallel
|
2020-02-23 16:56:43 +00:00
|
|
|
homebrew:
|
|
|
|
packages:
|
|
|
|
- gmp
|
2020-06-07 17:39:34 +00:00
|
|
|
# Travis `bundle` bug: https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/28
|
|
|
|
# - parallel
|
2020-02-23 16:56:43 +00:00
|
|
|
|
|
|
|
before_install:
|
2020-06-07 17:39:34 +00:00
|
|
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
|
|
|
HOMEBREW_NO_AUTO_UPDATE=1 brew install parallel;
|
|
|
|
fi
|
2020-02-23 16:56:43 +00:00
|
|
|
- |
|
|
|
|
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
|
2021-01-21 20:25:42 +00:00
|
|
|
- nimble install -y gmp stew json_serialization
|
|
|
|
# Workaround #113 and https://github.com/status-im/nim-serialization/issues/33
|
|
|
|
# and nimble flaky pinning / dependency resolution,
|
|
|
|
# json_serialization install would override nim-serialization pinning
|
|
|
|
- nimble uninstall -y serialization
|
|
|
|
- nimble install serialization@#217d78a
|
|
|
|
|
2020-08-20 08:21:39 +00:00
|
|
|
# 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
|
2020-08-31 21:13:16 +00:00
|
|
|
if [[ "$ARCH" == "amd64" ]]; then
|
2020-08-20 08:21:39 +00:00
|
|
|
nimble test_parallel_no_assembler
|
|
|
|
fi
|
2020-07-24 20:02:30 +00:00
|
|
|
fi
|
2020-02-23 16:56:43 +00:00
|
|
|
branches:
|
|
|
|
except:
|
|
|
|
- gh-pages
|