Skip to content

Commit

Permalink
test refc under Nim 2.0 and later (#77)
Browse files Browse the repository at this point in the history
  • Loading branch information
tersec committed Apr 11, 2024
1 parent 0c6ddab commit 485f7b3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
include:
- target:
os: linux
builder: ubuntu-20.04
builder: ubuntu-latest
- target:
os: macos
builder: macos-12
builder: macos-latest
- target:
os: windows
builder: windows-2019
Expand Down
14 changes: 7 additions & 7 deletions nimcrypto.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -14,27 +14,27 @@ requires "nim >= 1.6"

let
nimc = getEnv("NIMC", "nim") # Which nim compiler to use
mmopt =
when (NimMajor, NimMinor) >= (2, 0):
"--mm:orc"
else:
"--gc:orc"

task test, "Runs the test suite":
var testCommands = @[
nimc & " c -f -r tests/",
nimc & " c -f -d:danger -r tests/",
nimc & " c -f -d:danger --threads:on -r tests/",
nimc & " c -f --passC=\"-fsanitize=undefined -fsanitize-undefined-trap-on-error\" --passL:\"-fsanitize=undefined -fsanitize-undefined-trap-on-error\" -r tests/",
nimc & " c -f " & mmopt & " --threads:on -r tests/"
nimc & " c -f --mm:orc --threads:on -r tests/"
]
when (NimMajor, NimMinor) >= (2, 0):
testCommands.add nimc & " c -f --mm:refc --threads:off --passC=\"-fsanitize=undefined -fsanitize-undefined-trap-on-error\" --passL:\"-fsanitize=undefined -fsanitize-undefined-trap-on-error\" -r tests/"
testCommands.add nimc & " c -f --mm:refc --threads:on --passC=\"-fsanitize=undefined -fsanitize-undefined-trap-on-error\" --passL:\"-fsanitize=undefined -fsanitize-undefined-trap-on-error\" -r tests/"
testCommands.add nimc & " c -f --mm:refc --threads:off -r tests/"
testCommands.add nimc & " c -f --mm:refc --threads:on -r tests/"

let exampleFiles = @[
"ecb", "cbc", "ofb", "cfb", "ctr", "gcm"
]
var exampleCommands = @[
nimc & " c -f -r --threads:on examples/",
nimc & " c -f " & mmopt & " --threads:on -r examples/"
nimc & " c -f --mm:orc --threads:on -r examples/"
]

for cmd in testCommands:
Expand Down

0 comments on commit 485f7b3

Please sign in to comment.