Skip to content

Commit 97245a8

Browse files
committed
fix devel CI, use nim r for tasks
1 parent 2cccc7e commit 97245a8

3 files changed

Lines changed: 23 additions & 14 deletions

File tree

ci/build_docs.nim

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
when (NimMajor, NimMinor) >= (1, 4):
2+
when (compiles do: import nimbleutils):
3+
import nimbleutils
4+
# https://github.com/metagn/nimbleutils
5+
6+
when not declared(buildDocs):
7+
{.error: "docs task not implemented, need nimbleutils".}
8+
9+
# run from project root
10+
buildDocs(gitUrl = "https://github.com/holo-nim/holo-match", extraOptions = "--path:src")

ci/run_tests.nim

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
when (NimMajor, NimMinor) >= (1, 4):
2+
when (compiles do: import nimbleutils):
3+
import nimbleutils
4+
# https://github.com/metagn/nimbleutils
5+
6+
when not declared(runTests):
7+
{.error: "tests task not implemented, need nimbleutils".}
8+
9+
# run from project root
10+
runTests(backends = {c, js, nims}, optionCombos = @[""])

holo_match.nimble

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,8 @@ srcDir = "src"
1010

1111
requires "nim >= 1.0.0"
1212

13-
when (NimMajor, NimMinor) >= (1, 4):
14-
when (compiles do: import nimbleutils):
15-
import nimbleutils
16-
# https://github.com/metagn/nimbleutils
17-
1813
task docs, "build docs for all modules":
19-
when declared(buildDocs):
20-
buildDocs(gitUrl = "https://github.com/holo-nim/holo-match", extraOptions = "--path:src")
21-
else:
22-
echo "docs task not implemented, need nimbleutils"
14+
exec "nim r ci/build_docs.nim"
2315

24-
task tests, "run tests for multiple backends":
25-
when declared(runTests):
26-
runTests(backends = {c, js, nims}, optionCombos = @[""])
27-
else:
28-
echo "tests task not implemented, need nimbleutils"
16+
task tests, "run tests for multiple backends and defines":
17+
exec "nim r ci/run_tests.nim"

0 commit comments

Comments
 (0)