Add examples to CI (build only for now) (#143)

This commit is contained in:
Giovanni Petrantoni 2020-04-19 14:04:53 +09:00 committed by GitHub
parent 2ac54331cc
commit 027e8227ea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 10 additions and 1 deletions

View File

@ -47,6 +47,7 @@ build_script:
test_script: test_script:
- nimble test - nimble test
- nimble examples_build
deploy: off deploy: off

View File

@ -50,4 +50,4 @@ install:
script: script:
- nimble install -y --depsOnly - nimble install -y --depsOnly
- nimble test - nimble test
- nimble examples_build

View File

@ -188,4 +188,5 @@ steps:
gcc -v gcc -v
nimble test nimble test
nimble examples_build
displayName: 'Testing the package' displayName: 'Testing the package'

View File

@ -22,7 +22,14 @@ proc runTest(filename: string) =
exec "nim c -r --opt:speed -d:debug --verbosity:0 --hints:off tests/" & filename exec "nim c -r --opt:speed -d:debug --verbosity:0 --hints:off tests/" & filename
rmFile "tests/" & filename.toExe rmFile "tests/" & filename.toExe
proc buildSample(filename: string) =
exec "nim c --opt:speed --threads:on -d:debug --verbosity:0 --hints:off examples/" & filename
rmFile "examples" & filename.toExe
task test, "Runs the test suite": task test, "Runs the test suite":
runTest "testnative" runTest "testnative"
runTest "testdaemon" runTest "testdaemon"
runTest "testinterop" runTest "testinterop"
task examples_build, "Build the samples":
buildSample "directchat"