-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
TravisCI
Oleh Prypin edited this page May 21, 2016
·
10 revisions
Building your code on Travis CI is useful to check regressions against the master and devel branches of Nim. Same for your code documentation.
Detailed guide, which the following example originates from:
Advanced uses of Travis CI with Nim
# Copied from https://github.com/nim-lang/Nim/wiki/TravisCI
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:
# Replace uppercase strings!
- nim c --cc:$CC --verbosity:0 -r MYFILE.nim
# Optional: build docs.
- nim doc --docSeeSrcUrl:https://github.com/AUTHOR/MYPROJECT/blob/master --project MYFILE.nim
cache:
directories:
- nim-master
- nim-devel
branches:
except:
- gh-pages
Intro
Getting Started
- Install
- Docs
- Curated Packages
- Editor Support
- Unofficial FAQ
- Nim for C programmers
- Nim for Python programmers
- Nim for TypeScript programmers
- Nim for D programmers
- Nim for Java programmers
- Nim for Haskell programmers
Developing
- Build
- Contribute
- Creating a release
- Compiler module reference
- Consts defined by the compiler
- Debugging the compiler
- GitHub Actions/Travis CI/Circle CI/Appveyor
- GitLab CI setup
- Standard library and the JavaScript backend
Misc