Update Quicktest & Continuous Integration configuration to latest.
This commit is contained in:
parent
18e73e7168
commit
b731108b1c
|
@ -1,37 +1,48 @@
|
||||||
version: '{build}'
|
version: '{build}'
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
- nim-0.17.2_x64.zip
|
|
||||||
- x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z
|
- x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z
|
||||||
- packages -> **\packages.config
|
- i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z
|
||||||
- '%LocalAppData%\NuGet\Cache -> **\packages.config'
|
|
||||||
|
|
||||||
|
# We always want 32 and 64-bit compilation
|
||||||
matrix:
|
matrix:
|
||||||
fast_finish: true
|
fast_finish: false # set this flag to immediately finish build once one of the jobs fails.
|
||||||
|
|
||||||
environment:
|
environment:
|
||||||
|
|
||||||
matrix:
|
matrix:
|
||||||
- MINGW_ARCHIVE: x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z
|
- MINGW_DIR: mingw32
|
||||||
MINGW_DIR: mingw64
|
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_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
|
MINGW_ARCHIVE: i686-4.9.2-release-win32-dwarf-rt_v4-rev4.7z
|
||||||
NIM_ARCHIVE: nim-0.17.2_x64.zip
|
platform: x86
|
||||||
NIM_DIR: nim-0.17.2
|
- MINGW_DIR: mingw64
|
||||||
NIM_URL: https://nim-lang.org/download/nim-0.17.2_x64.zip
|
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
|
platform: x64
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- MKDIR %CD%\tools_tmp
|
- setlocal EnableExtensions EnableDelayedExpansion
|
||||||
- IF not exist "%MINGW_ARCHIVE%" appveyor DownloadFile "%MINGW_URL%" -FileName "%MINGW_ARCHIVE%"
|
- IF not exist "%MINGW_ARCHIVE%" appveyor DownloadFile "%MINGW_URL%" -FileName "%MINGW_ARCHIVE%"
|
||||||
- 7z x -y "%MINGW_ARCHIVE%" -o"%CD%\tools_tmp"> nul
|
- 7z x -y "%MINGW_ARCHIVE%" > nul
|
||||||
- IF not exist "%NIM_ARCHIVE%" appveyor DownloadFile "%NIM_URL%" -FileName "%NIM_ARCHIVE%"
|
- SET PATH=%CD%\%MINGW_DIR%\bin;%CD%\Nim\bin;%PATH%
|
||||||
- 7z x -y "%NIM_ARCHIVE%" -o"%CD%\tools_tmp"> nul
|
- git clone https://github.com/nim-lang/Nim.git
|
||||||
- SET PATH=%CD%\tools_tmp\%NIM_DIR%\bin;%CD%\tools_tmp\%MINGW_DIR%\bin;%PATH%
|
- cd %CD%\Nim
|
||||||
- SET PATH=%PATH%;%CD%
|
- 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:
|
build_script:
|
||||||
- nimble.exe refresh
|
- cd C:\projects\%APPVEYOR_PROJECT_SLUG%
|
||||||
|
- nimble install -y
|
||||||
test_script:
|
test_script:
|
||||||
- nimble.exe test
|
- nimble test
|
||||||
|
|
||||||
deploy: off
|
deploy: off
|
||||||
|
|
47
.travis.yml
47
.travis.yml
|
@ -1,10 +1,39 @@
|
||||||
# Travis config for MpInt using Status Nim docker.
|
matrix:
|
||||||
|
# allow_failures:
|
||||||
|
# - os: osx
|
||||||
|
|
||||||
sudo: required
|
include:
|
||||||
services:
|
- os: linux
|
||||||
- docker
|
sudo: required
|
||||||
before_install:
|
services:
|
||||||
- docker pull statusteam/nim-base
|
- docker
|
||||||
script:
|
before_install:
|
||||||
- docker run statusteam/nim-base nim --version
|
- docker pull statusteam/nim-base
|
||||||
- docker run -v "$(pwd):/project" -w /project statusteam/nim-base sh -c "nimble install -dy && nimble test"
|
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
|
||||||
|
|
|
@ -8,7 +8,7 @@ srcDir = "src"
|
||||||
### Dependencies
|
### Dependencies
|
||||||
|
|
||||||
# TODO remove test only requirements: https://github.com/nim-lang/nimble/issues/482
|
# 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") =
|
proc test(name: string, lang: string = "c") =
|
||||||
if not dirExists "build":
|
if not dirExists "build":
|
||||||
|
|
|
@ -14,9 +14,9 @@ const itercount = 1000
|
||||||
suite "Property-based testing (testing with random inputs) - uint64 on 64-bit / uint32 on 32-bit":
|
suite "Property-based testing (testing with random inputs) - uint64 on 64-bit / uint32 on 32-bit":
|
||||||
|
|
||||||
when defined(release):
|
when defined(release):
|
||||||
echo "Testing in release mode"
|
echo "Testing in release mode with " & $itercount & " random tests for each proc."
|
||||||
else:
|
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)
|
let hi = 1'u shl (sizeof(uint)*7)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue