diff --git a/.appveyor.yml b/.appveyor.yml index e11621e25..29d8a80db 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -47,6 +47,7 @@ build_script: test_script: - nimble test + - nimble examples_build deploy: off diff --git a/.travis.yml b/.travis.yml index 4283d984a..201eca668 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,4 +50,4 @@ install: script: - nimble install -y --depsOnly - nimble test - + - nimble examples_build diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 059cba697..677cca6fd 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -188,4 +188,5 @@ steps: gcc -v nimble test + nimble examples_build displayName: 'Testing the package' diff --git a/libp2p.nimble b/libp2p.nimble index 8f5acedd3..5fed40651 100644 --- a/libp2p.nimble +++ b/libp2p.nimble @@ -22,7 +22,14 @@ proc runTest(filename: string) = exec "nim c -r --opt:speed -d:debug --verbosity:0 --hints:off tests/" & filename 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": runTest "testnative" runTest "testdaemon" runTest "testinterop" + +task examples_build, "Build the samples": + buildSample "directchat"