-
-
Save disruptek/8720abb92b8953a90b3f1bd6fa6039f0 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.4 | |
- BRANCH=devel | |
cache: | |
directories: | |
- "$HOME/.choosenim" | |
- "$TRAVIS_BUILD_DIR/git" | |
install: | |
- curl https://gist.github.com/genotrance/fb53504a4fba88bc5201d3783df5c522/raw/3122ece117489afcc9008b63d6278d97074b8f2c/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 PATH=`pwd`/git/bin:$HOME/.nimble/bin:$PATH | |
if ! type -P choosenim &> /dev/null; then | |
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 .. | |
# Latest choosenim binary doesn't have | |
# https://github.com/dom96/choosenim/pull/117 | |
# https://github.com/dom96/choosenim/pull/135 | |
# | |
# Using custom build with these PRs for Windows | |
curl -L -s "https://bintray.com/genotrance/binaries/download_file?file_path=choosenim.exe" -o choosenim.exe | |
curl -L -s "https://bintray.com/genotrance/binaries/download_file?file_path=libeay32.dll" -o libeay32.dll | |
curl -L -s "https://bintray.com/genotrance/binaries/download_file?file_path=ssleay32.dll" -o ssleay32.dll | |
./choosenim.exe $BRANCH -y | |
cp ./choosenim.exe `pwd`/git/bin/. | |
else | |
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 | |
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