-
-
Save timotheecour/fff49b1102659eedcbc2762bc201b375 to your computer and use it in GitHub Desktop.
Travis CI setup for Nim
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
os: | |
- windows | |
- linux | |
- osx | |
language: c | |
env: | |
- BRANCH=0.19.6 | |
- BRANCH=0.20.2 | |
- BRANCH=1.0.6 | |
- BRANCH=devel | |
cache: | |
directories: | |
- "$HOME/.choosenim" | |
install: | |
- curl https://gist.github.com/genotrance/fb53504a4fba88bc5201d3783df5c522/raw/travis.sh -LsSf -o travis.sh | |
- source travis.sh | |
script: | |
- nimble develop -y | |
- nimble test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
export CHOOSENIM_NO_ANALYTICS=1 | |
export GITBIN=$HOME/.choosenim/git/bin | |
export PATH=$HOME/.nimble/bin:$GITBIN:$PATH | |
if ! type -P choosenim &> /dev/null; then | |
echo "Fresh install" | |
mkdir -p $GITBIN | |
if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then | |
export EXT=.exe | |
# Setup git outside "Program Files", space breaks cmake sh.exe | |
cd $GITBIN/.. | |
curl -L -s "https://github.com/git-for-windows/git/releases/download/v2.23.0.windows.1/PortableGit-2.23.0-64-bit.7z.exe" -o portablegit.exe | |
7z x -y -bd portablegit.exe | |
cd - | |
fi | |
export CHOOSENIM_CHOOSE_VERSION="$BRANCH --latest" | |
curl https://nim-lang.org/choosenim/init.sh -sSf > init.sh | |
sh init.sh -y | |
cp $HOME/.nimble/bin/choosenim$EXT $GITBIN/. | |
# Copy DLLs for choosenim | |
if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then | |
cp $HOME/.nimble/bin/*.dll $GITBIN/. | |
fi | |
else | |
echo "Already installed" | |
rm -rf $HOME/.choosenim/current | |
choosenim update $BRANCH --latest | |
choosenim $BRANCH | |
fi | |
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then | |
# Work around https://github.com/nim-lang/Nim/issues/12337 fixed in 1.0+ | |
ulimit -n 8192 | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment