Skip to content

Commit

Permalink
Update CI with Nim 1.2.0
Browse files Browse the repository at this point in the history
Fix script if somehow Nim was built but not Nimble (Travis ARM for channel Stable)

Add debug tooling for Nim stable on Azure Linux 64-bit: https://dev.azure.com/numforge/Constantine/_build/results?buildId=421&view=logs&j=772f230d-746a-56d1-bc2f-fb811c7e19c9&t=b523bb2e-7fa8-50fa-b6c6-60216421c47f
  • Loading branch information
mratsim committed Jun 4, 2020
1 parent 3d1b1fa commit bed673a
Show file tree
Hide file tree
Showing 4 changed files with 110 additions and 55 deletions.
31 changes: 29 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,32 @@ cache:

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.

- dist: bionic
arch: amd64
env:
- ARCH=amd64
- CHANNEL=stable
compiler: gcc

- dist: bionic
arch: arm64
env:
- ARCH=arm64
- CHANNEL=stable
compiler: gcc

- dist: bionic
arch: amd64
env:
- ARCH=amd64
- CHANNEL=stable
compiler: clang

- dist: bionic
arch: amd64
env:
Expand All @@ -35,6 +56,12 @@ matrix:
compiler: clang

# On OSX we only test against clang (gcc is mapped to clang by default)
- os: osx
arch: amd64
env:
- ARCH=amd64
- CHANNEL=stable
compiler: clang
- os: osx
arch: amd64
env:
Expand Down Expand Up @@ -66,7 +93,7 @@ before_install:
install:
# Detect caching of Nim compiler
- |
if [ ! -x "nim-${CHANNEL}/bin/nim" ]; then
if [ ! -x "nim-${CHANNEL}/bin/nim" ] || [ ! -x "nim-${CHANNEL}/bin/nimble" ]; 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/
Expand Down
44 changes: 32 additions & 12 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,18 @@ strategy:
maxParallel: 10
matrix:
# TODO: Linux 32-bit requires gcc -m32 setup

# MacOS host are much faster
# Then Linux host, then Windows host
Windows_stable_64bit:
VM: 'windows-latest'
UCPU: amd64
CHANNEL: stable
TEST_LANG: c
Windows_stable_32bit:
VM: 'windows-latest'
UCPU: i686
CHANNEL: stable
TEST_LANG: c
Windows_devel_32bit:
VM: 'windows-latest'
UCPU: i686
Expand All @@ -13,33 +24,42 @@ strategy:
UCPU: amd64
CHANNEL: devel
TEST_LANG: c
Windows_cpp_devel_64bit:
VM: 'windows-latest'
Linux_stable_64bit:
VM: 'ubuntu-16.04'
UCPU: amd64
CHANNEL: devel
TEST_LANG: cpp
CHANNEL: stable
TEST_LANG: c
Linux_devel_64bit:
VM: 'ubuntu-18.04'
UCPU: amd64
CHANNEL: devel
TEST_LANG: c
Linux_cpp_devel_64bit:
VM: 'ubuntu-18.04'
UCPU: amd64
CHANNEL: devel
WEAVE_TEST_LANG: cpp

# Linux_devel_32bit:
# VM: 'ubuntu-16.04'
# UCPU: i686
# CHANNEL: devel
# TEST_LANG: c

MacOS_stable_64bit:
VM: 'macOS-10.14'
UCPU: amd64
CHANNEL: stable
TEST_LANG: c
MacOS_cpp_stable_64bit:
VM: 'macOS-10.14'
UCPU: amd64
CHANNEL: stable
TEST_LANG: cpp
MacOS_devel_64bit:
VM: 'macOS-10.14'
UCPU: amd64
CHANNEL: devel
TEST_LANG: c
MacOS_cpp_devel_64bit:
VM: 'macOS-10.14'
UCPU: amd64
CHANNEL: devel
TEST_LANG: cpp
pool:
vmImage: $(VM)

Expand Down Expand Up @@ -129,7 +149,7 @@ steps:
fi
mkdir -p NimBinaries
pushd NimBinaries
if [ ! -x "nim-${CHANNEL}/bin/nim" ]; then
if [ ! -x "nim-${CHANNEL}/bin/nim" ] || [ ! -x "nim-${CHANNEL}/bin/nimble" ]; 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/
Expand Down
2 changes: 1 addition & 1 deletion constantine.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ task test, "Run all tests":

# Big ints
test "", "tests/test_io_bigints.nim"
test "", "tests/test_bigints.nim"
test "-d:debugConstantine", "tests/test_bigints.nim"
test "", "tests/test_bigints_multimod.nim"

test "", "tests/test_bigints_vs_gmp.nim"
Expand Down
Loading

0 comments on commit bed673a

Please sign in to comment.