nimcrypto/nimcrypto.nimble

49 lines
1.2 KiB
Plaintext
Raw Permalink Normal View History

2018-12-15 15:14:26 +00:00
# Package
2018-03-15 23:07:09 +00:00
version = "0.5.4"
2018-03-15 23:07:09 +00:00
author = "Eugene Kabanov"
description = "Nim cryptographic library"
license = "MIT"
2018-11-02 06:17:09 +00:00
skipDirs = @["tests", "examples", "Nim", "docs"]
2018-03-15 23:07:09 +00:00
2018-12-15 15:14:26 +00:00
# Dependencies
requires "nim > 0.18.0"
2018-03-21 09:12:35 +00:00
2018-12-15 15:14:26 +00:00
# Tests
task test, "Runs the test suite":
2021-02-25 16:52:26 +00:00
var testCommands = @[
"nim c -f -r tests/",
"nim c -f -d:danger -r tests/",
"nim c -f -d:danger --threads:on -r tests/",
]
2021-02-25 16:52:26 +00:00
when (NimMajor, NimMinor) >= (1, 5):
testCommands.add "nim c -f --gc:orc --threads:on -r tests/"
2019-01-18 22:07:30 +00:00
let exampleFiles = @[
"ecb", "cbc", "ofb", "cfb", "ctr", "gcm"
]
2021-02-25 16:52:26 +00:00
var exampleCommands = @[
2019-01-18 22:07:30 +00:00
"nim c -f -r --threads:on examples/",
]
2021-02-25 16:52:26 +00:00
when (NimMajor, NimMinor) >= (1, 5):
exampleCommands.add "nim c -f --gc:orc --threads:on -r examples/"
for cmd in testCommands:
2019-09-01 20:53:09 +00:00
echo "\n" & cmd & "testall"
exec cmd & "testall"
rmFile("tests/testall".toExe())
2019-01-18 22:07:30 +00:00
for efile in exampleFiles:
for cmd in exampleCommands:
echo "\n" & cmd & efile
exec cmd & efile
rmFile("examples/" & efile.toExe())
2019-01-07 23:35:28 +00:00
exec("nim c -f -r -d:nimcryptoLowercase tests/testapi")
exec("nim c -f -r -d:nimcrypto0xPrefix tests/testapi")
exec("nim c -f -r -d:nimcrypto0xPrefix -d:nimcryptoLowercase tests/testapi")