Skip to content

Commit

Permalink
broaden ci matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
disruptek committed Dec 21, 2020
1 parent 9683eea commit 4369cb8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 23 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
path: jason

- name: Setup Nim
uses: alaviss/[email protected].0
uses: alaviss/[email protected].1
with:
path: nim
version: ${{ matrix.branch }}
Expand Down
28 changes: 6 additions & 22 deletions jason.nimble
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,15 @@ author = "disruptek"
description = "compile-time json"
license = "MIT"

requires "nim >= 1.3.5 & < 2.0.0"
requires "https://github.com/disruptek/testes >= 0.3.2 & < 1.0.0"
requires "nim >= 1.4.0 & < 2.0.0"
requires "https://github.com/disruptek/testes >= 0.7.3 & < 1.0.0"
requires "https://github.com/disruptek/criterion < 1.0.0"

proc execCmd(cmd: string) =
echo "exec: " & cmd
exec cmd

proc execTest(test: string) =
when getEnv("GITHUB_ACTIONS", "false") != "true":
execCmd "nim c -f -r " & test
when (NimMajor, NimMinor) >= (1, 2):
execCmd "nim cpp --gc:arc -d:danger -f -r " & test
else:
execCmd "nim c -r " & test
execCmd "nim cpp -r " & test
execCmd "nim c -d:danger -r " & test
execCmd "nim cpp -d:danger -r " & test
when (NimMajor, NimMinor) >= (1, 2):
execCmd "nim c --useVersion:1.0 -d:danger -r " & test
execCmd "nim c --gc:arc -d:danger -r " & test
execCmd "nim cpp --gc:arc -d:danger -r " & test

task test, "run tests for ci":
execTest("tests/test.nim")
when defined(windows):
exec "testes.cmd"
else:
exec findExe"testes"

task demo, "generate benchmarks":
exec """demo docs/bench.svg "nim c --out=\$1 --gc:arc --define:danger tests/bench.nim""""
Expand Down

0 comments on commit 4369cb8

Please sign in to comment.