Skip to content

Instantly share code, notes, and snippets.

@iranika
Forked from genotrance/travis.sh
Last active February 7, 2020 12:02
Show Gist options
  • Save iranika/ec97e8f0f97c59243c648e14b2f0366e to your computer and use it in GitHub Desktop.
Save iranika/ec97e8f0f97c59243c648e14b2f0366e to your computer and use it in GitHub Desktop.
Travis CI setup for Nim
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"
- "$TRAVIS_BUILD_DIR/git"
install:
- curl https://gist.github.com/genotrance/fb53504a4fba88bc5201d3783df5c522/raw/travis.sh -LsSf -o travis.sh
- source travis.sh
script:
- nimble develop -y
- nimble test
#! /bin/bash
export CHOOSENIM_NO_ANALYTICS=1
export PATH=`pwd`/git/bin:$HOME/.nimble/bin:$PATH
if type -P choosenim &> /dev/null; then
choosenim stable
cp $HOME/.nimble/bin/choosenim `pwd`/git/bin/.
else
mkdir -p git/bin
if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then
# Setup git outside "Program Files", space breaks cmake sh.exe
cd git
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
curl https://nim-lang.org/choosenim/init.sh -sSf > init.sh
sh init.sh -y
cp $HOME/.nimble/bin/choosenim `pwd`/git/bin/.
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