From 610549cf8dae408008c292ef3816ba1f3422421c Mon Sep 17 00:00:00 2001 From: Federico Ceratto Date: Sat, 28 Nov 2015 16:53:28 +0000 Subject: [PATCH] Created TravisCI (asciidoc) --- TravisCI.asciidoc | 52 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 TravisCI.asciidoc diff --git a/TravisCI.asciidoc b/TravisCI.asciidoc new file mode 100644 index 0000000..4a25e72 --- /dev/null +++ b/TravisCI.asciidoc @@ -0,0 +1,52 @@ +## Building Nim projects on Travis CI + +[source,yaml] +---- +language: c +env: + # Build and test against the master and devel branches of Nim + - BRANCH=master + - BRANCH=devel +compiler: + # Build and test using both gcc and clang + - gcc + - clang +matrix: + allow_failures: + # Ignore failures when building against the devel Nim branch + - env: BRANCH=devel + fast_finish: true +install: + - | + if [ ! -x nim-$BRANCH/bin/nim ]; then + git clone -b $BRANCH --depth 1 git://github.com/nim-lang/nim nim-$BRANCH/ + cd nim-$BRANCH + git clone -b $BRANCH --depth 1 git://github.com/nim-lang/csources csources/ + cd csources + sh build.sh + cd .. + rm -rf csources + bin/nim c koch + ./koch boot -d:release + else + cd nim-$BRANCH + git fetch origin + if ! git merge FETCH_HEAD | grep "Already up-to-date"; then + bin/nim c koch + ./koch boot -d:release + fi + fi + cd .. +before_script: + - export PATH="nim-$BRANCH/bin${PATH:+:$PATH}" +script: + - nim c --cc:$CC --verbosity:0 -r my_test_file.nim # Replace this +cache: + directories: + - nim-master + - nim-devel +branches: + except: + - gh-pages + +---- \ No newline at end of file