CI: test with multiple Nim versions (#23)

* CI: test with multiple Nim versions

* fix readIntoExImpl() when premature EOF is triggered on some Windows versions
* also fix some unrelated pointer math
This commit is contained in:
Ștefan Talpalaru 2022-01-05 23:22:53 +01:00 • committed by GitHub
commit 371e60b17c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 141 additions and 135 deletions

View file

@ -14,20 +14,18 @@ requires "nim >= 1.2.0",
"unittest2"
### Helper functions
proc test(env, path: string) =
proc test(args, path: string) =
# Compilation language is controlled by TEST_LANG
var lang = "c"
if existsEnv"TEST_LANG":
lang = getEnv"TEST_LANG"
let lang = getEnv("TEST_LANG", "c")
let common_args = "-r -f --hints:off --skipParentCfg --styleCheck:usages --styleCheck:error"
let common_args = "-r -f " & getEnv("NIMFLAGS") & " --hints:off --skipParentCfg --styleCheck:usages --styleCheck:error"
exec "nim " & lang & " " & env &
exec "nim " & lang & " " & args &
" -d:asyncBackend=none " & common_args & " " & path
exec "nim " & lang & " " & env &
exec "nim " & lang & " " & args &
" -d:asyncBackend=chronos " & common_args & " " & path
# TODO std backend is broken / untested
# exec "nim " & lang & " " & env &
# exec "nim " & lang & " " & args &
# " -d:asyncBackend=asyncdispatch " & common_args & " " & path
task test, "Run all tests":