This commit is contained in:
jangko 2020-10-20 15:35:47 +07:00
parent 5d8d1ea648
commit 4981d719a1
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
6 changed files with 90 additions and 8 deletions

39
.appveyor.yml Normal file
View File

@ -0,0 +1,39 @@
version: '{build}'
image: Visual Studio 2015
cache:
- NimBinaries
matrix:
# We always want 32 and 64-bit compilation
fast_finish: false
platform:
- x86
- x64
# when multiple CI builds are queued, the tested commit needs to be in the last X commits cloned with "--depth X"
clone_depth: 10
install:
# use the newest versions documented here: https://www.appveyor.com/docs/windows-images-software/#mingw-msys-cygwin
- IF "%PLATFORM%" == "x86" SET PATH=C:\mingw-w64\i686-6.3.0-posix-dwarf-rt_v5-rev1\mingw32\bin;%PATH%
- IF "%PLATFORM%" == "x64" SET PATH=C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin;%PATH%
# build nim from our own branch - this to avoid the day-to-day churn and
# regressions of the fast-paced Nim development while maintaining the
# flexibility to apply patches
- curl -O -L -s -S https://raw.githubusercontent.com/status-im/nimbus-build-system/master/scripts/build_nim.sh
- env MAKE="mingw32-make -j2" ARCH_OVERRIDE=%PLATFORM% bash build_nim.sh Nim csources dist/nimble NimBinaries
- SET PATH=%CD%\Nim\bin;%PATH%
build_script:
- cd C:\projects\%APPVEYOR_PROJECT_SLUG%
- nimble install -y
- nimble install -y toml_serialization json_serialization
test_script:
- nimble test
deploy: off

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
nimcache
*.exe

27
.travis.yml Normal file
View File

@ -0,0 +1,27 @@
language: c
# https://docs.travis-ci.com/user/caching/
cache:
directories:
- NimBinaries
git:
# when multiple CI builds are queued, the tested commit needs to be in the last X commits cloned with "--depth X"
depth: 10
os:
- linux
- osx
install:
# build nim from our own branch - this to avoid the day-to-day churn and
# regressions of the fast-paced Nim development while maintaining the
# flexibility to apply patches
- curl -O -L -s -S https://raw.githubusercontent.com/status-im/nimbus-build-system/master/scripts/build_nim.sh
- env MAKE="make -j2" bash build_nim.sh Nim csources dist/nimble NimBinaries
- export PATH=$PWD/Nim/bin:$PATH
script:
- nimble install -y
- nimble install -y toml_serialization json_serialization
- nimble test

View File

@ -8,12 +8,8 @@ license = "Apache License 2.0"
skipDirs = @["tests"]
requires "nim >= 1.0.0",
"stew",
"testutils"
task test, "run CPU tests":
when defined(windows):
exec "cmd.exe /C testrunner.cmd tests"
else:
exec "testrunner tests"
"stew"
task test, "Run all tests":
exec "nim c -r --threads:off -d:release tests/test_all"
exec "nim c -r --threads:on -d:release tests/test_all"

11
tests/test_all.nim Normal file
View File

@ -0,0 +1,11 @@
# nim-confutils
# Copyright (c) 2020 Status Research & Development GmbH
# Licensed and distributed under either of
# * MIT license: [LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT
# * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
# at your option. This file may not be copied, modified, or distributed except according to those terms.
{. warning[UnusedImport]:off .}
import
test_config_file

View File

@ -0,0 +1,7 @@
# nim-confutils
# Copyright (c) 2020 Status Research & Development GmbH
# Licensed and distributed under either of
# * MIT license: [LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT
# * Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or http://www.apache.org/licenses/LICENSE-2.0)
# at your option. This file may not be copied, modified, or distributed except according to those terms.