workaround for nim devel in ci
This commit is contained in:
parent
fe3650ceea
commit
bed1d50a45
|
@ -156,6 +156,16 @@ jobs:
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: |
|
run: |
|
||||||
nim --version
|
nim --version
|
||||||
env TEST_LANG="c" nim --hints:off --verbosity:0 test
|
env TEST_LANG="c" NIMFLAGS="${NIMFLAGS} --gc:refc" nim test
|
||||||
env TEST_LANG="cpp" nim --hints:off --verbosity:0 test
|
env TEST_LANG="cpp" NIMFLAGS="${NIMFLAGS} --gc:refc" nim test
|
||||||
|
if [[ "${{ matrix.branch }}" == "devel" ]]; then
|
||||||
|
echo -e "\nTesting with '--gc:orc':\n"
|
||||||
|
if env TEST_LANG="c" NIMFLAGS="${NIMFLAGS} --gc:orc" nim test; then
|
||||||
|
echo "Nim devel with --gc:orc works again! Please remove this check in ci.yml"
|
||||||
|
false
|
||||||
|
fi
|
||||||
|
if env TEST_LANG="cpp" NIMFLAGS="${NIMFLAGS} --gc:orc" nim test; then
|
||||||
|
echo "Nim devel with --gc:orc works again! Please remove this check in ci.yml"
|
||||||
|
false
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
|
@ -1,3 +1,5 @@
|
||||||
nimcache/
|
nimcache/
|
||||||
docs/
|
docs/
|
||||||
/nimble.develop
|
/nimble.develop
|
||||||
|
*.exe
|
||||||
|
test_results.xml
|
||||||
|
|
|
@ -57,6 +57,10 @@ proc defectiveRobot() =
|
||||||
of 3: raise newException(IOError, "I can't do that Dave.")
|
of 3: raise newException(IOError, "I can't do that Dave.")
|
||||||
else: assert 2 + 2 == 5
|
else: assert 2 + 2 == 5
|
||||||
test "unittest expect":
|
test "unittest expect":
|
||||||
|
when (NimMajor, NimMinor) >= (1, 6):
|
||||||
|
expect IOError, OSError, ValueError, AssertionDefect:
|
||||||
|
defectiveRobot()
|
||||||
|
else:
|
||||||
expect IOError, OSError, ValueError, AssertionError:
|
expect IOError, OSError, ValueError, AssertionError:
|
||||||
defectiveRobot()
|
defectiveRobot()
|
||||||
|
|
||||||
|
|
|
@ -131,6 +131,8 @@
|
||||||
|
|
||||||
import std/[locks, macros, sets, strutils, streams, times, monotimes]
|
import std/[locks, macros, sets, strutils, streams, times, monotimes]
|
||||||
|
|
||||||
|
{.warning[LockLevel]:off.}
|
||||||
|
|
||||||
when declared(stdout):
|
when declared(stdout):
|
||||||
import std/os
|
import std/os
|
||||||
|
|
||||||
|
@ -155,13 +157,16 @@ when (NimMajor, NimMinor) > (1, 2):
|
||||||
from std/exitprocs import nil
|
from std/exitprocs import nil
|
||||||
template addExitProc(p: proc) =
|
template addExitProc(p: proc) =
|
||||||
when (NimMajor, NimMinor) >= (1, 6):
|
when (NimMajor, NimMinor) >= (1, 6):
|
||||||
exitprocs.addExitProc(p)
|
{.warning[BareExcept]:off.}
|
||||||
else:
|
|
||||||
try:
|
try:
|
||||||
exitprocs.addExitProc(p)
|
exitprocs.addExitProc(p)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
echo "Can't add exit proc", e.msg
|
echo "Can't add exit proc", e.msg
|
||||||
quit(1)
|
quit(1)
|
||||||
|
|
||||||
|
when (NimMajor, NimMinor) >= (1, 6):
|
||||||
|
{.warning[BareExcept]:on.}
|
||||||
else:
|
else:
|
||||||
template addExitProc(p: proc) =
|
template addExitProc(p: proc) =
|
||||||
addQuitProc(p)
|
addQuitProc(p)
|
||||||
|
|
Loading…
Reference in New Issue