Update Quicktest & Continuous Integration configuration to latest.

This commit is contained in:
mratsim 2018-05-03 11:07:33 +02:00
parent 18e73e7168
commit b731108b1c
4 changed files with 72 additions and 32 deletions

View File

@ -1,37 +1,48 @@
version: '{build}'
cache:
- nim-0.17.2_x64.zip
- x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z
- packages -> **\packages.config
- '%LocalAppData%\NuGet\Cache -> **\packages.config'
- i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z
# We always want 32 and 64-bit compilation
matrix:
fast_finish: true
fast_finish: false # set this flag to immediately finish build once one of the jobs fails.
environment:
matrix:
- MINGW_ARCHIVE: x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z
MINGW_DIR: mingw64
MINGW_URL: https://ayera.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.9.2/threads-win32/seh/x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z
NIM_ARCHIVE: nim-0.17.2_x64.zip
NIM_DIR: nim-0.17.2
NIM_URL: https://nim-lang.org/download/nim-0.17.2_x64.zip
- MINGW_DIR: mingw32
MINGW_URL: https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Personal%20Builds/mingw-builds/4.9.2/threads-win32/dwarf/i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z/download
MINGW_ARCHIVE: i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z
platform: x86
- MINGW_DIR: mingw64
MINGW_URL: https://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.9.2/threads-win32/seh/x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z/download
MINGW_ARCHIVE: x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z
platform: x64
install:
- MKDIR %CD%\tools_tmp
- setlocal EnableExtensions EnableDelayedExpansion
- IF not exist "%MINGW_ARCHIVE%" appveyor DownloadFile "%MINGW_URL%" -FileName "%MINGW_ARCHIVE%"
- 7z x -y "%MINGW_ARCHIVE%" -o"%CD%\tools_tmp"> nul
- IF not exist "%NIM_ARCHIVE%" appveyor DownloadFile "%NIM_URL%" -FileName "%NIM_ARCHIVE%"
- 7z x -y "%NIM_ARCHIVE%" -o"%CD%\tools_tmp"> nul
- SET PATH=%CD%\tools_tmp\%NIM_DIR%\bin;%CD%\tools_tmp\%MINGW_DIR%\bin;%PATH%
- SET PATH=%PATH%;%CD%
- 7z x -y "%MINGW_ARCHIVE%" > nul
- SET PATH=%CD%\%MINGW_DIR%\bin;%CD%\Nim\bin;%PATH%
- git clone https://github.com/nim-lang/Nim.git
- cd %CD%\Nim
- git remote add statusim https://github.com/status-im/Nim.git
- git fetch statusim
- git config --global user.email "you@example.com"
- git config --global user.name "Your Name"
- for /f "tokens=*" %%G IN ('git branch -a --list ^"statusim/status-autopatch-*^"') DO (git merge %%G)
- git clone --depth 1 https://github.com/nim-lang/csources
- cd csources
- IF "%PLATFORM%" == "x64" ( build64.bat ) else ( build.bat )
- cd ..
- bin\nim c koch
- koch boot -d:release
- koch nimble
build_script:
- nimble.exe refresh
- cd C:\projects\%APPVEYOR_PROJECT_SLUG%
- nimble install -y
test_script:
- nimble.exe test
- nimble test
deploy: off

View File

@ -1,5 +1,9 @@
# Travis config for MpInt using Status Nim docker.
matrix:
# allow_failures:
# - os: osx
include:
- os: linux
sudo: required
services:
- docker
@ -8,3 +12,28 @@ before_install:
script:
- docker run statusteam/nim-base nim --version
- docker run -v "$(pwd):/project" -w /project statusteam/nim-base sh -c "nimble install -dy && nimble test"
- os: osx
before_install:
# - brew update
# - brew install gcc
- git clone https://github.com/nim-lang/nim.git
- cd nim
- git remote add statusim https://github.com/status-im/nim.git
- git fetch statusim
- git config --global user.email "you@example.com"
- git config --global user.name "Your Name"
- for b in $(git branch -a --list 'statusim/status-autopatch-*'); do git merge $b; done
- git clone --depth 1 https://github.com/nim-lang/csources.git
- cd csources
- sh build.sh
- cd ..
- export PATH=$PWD/bin:$PATH
- nim c koch
- ./koch boot -d:release
- ./koch nimble
- cd ..
script:
- nimble install -dy && nimble test

View File

@ -8,7 +8,7 @@ srcDir = "src"
### Dependencies
# TODO remove test only requirements: https://github.com/nim-lang/nimble/issues/482
requires "nim >= 0.18", "https://github.com/alehander42/nim-quicktest >= 0.0.12"
requires "nim >= 0.18", "https://github.com/alehander42/nim-quicktest >= 0.18.0"
proc test(name: string, lang: string = "c") =
if not dirExists "build":

View File

@ -14,9 +14,9 @@ const itercount = 1000
suite "Property-based testing (testing with random inputs) - uint64 on 64-bit / uint32 on 32-bit":
when defined(release):
echo "Testing in release mode"
echo "Testing in release mode with " & $itercount & " random tests for each proc."
else:
echo "Testing in normal (non-release) mode"
echo "Testing in normal (non-release) mode " & $itercount & " random tests for each proc."
let hi = 1'u shl (sizeof(uint)*7)