From cd7929f187abb606c96a972970e2768e8b9eb73d Mon Sep 17 00:00:00 2001 From: mratsim Date: Fri, 16 Feb 2018 11:45:45 +0100 Subject: [PATCH] Add continuous integration --- .appveyor.yml | 37 +++++++++++++++++++++++++++++++++++++ .travis.yml | 43 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 80 insertions(+) create mode 100644 .appveyor.yml create mode 100644 .travis.yml diff --git a/.appveyor.yml b/.appveyor.yml new file mode 100644 index 0000000..c678125 --- /dev/null +++ b/.appveyor.yml @@ -0,0 +1,37 @@ +version: '{build}' + +cache: +- nim-0.17.2_x64.zip +- x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z +- packages -> **\packages.config +- '%LocalAppData%\NuGet\Cache -> **\packages.config' + +matrix: + fast_finish: true + +environment: + matrix: + - MINGW_ARCHIVE: x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z + MINGW_DIR: mingw64 + MINGW_URL: https://ayera.dl.sourceforge.net/project/mingw-w64/Toolchains%20targetting%20Win64/Personal%20Builds/mingw-builds/4.9.2/threads-win32/seh/x86_64-4.9.2-release-win32-seh-rt_v4-rev4.7z + NIM_ARCHIVE: nim-0.17.2_x64.zip + NIM_DIR: nim-0.17.2 + NIM_URL: https://nim-lang.org/download/nim-0.17.2_x64.zip + platform: x64 + +install: + - MKDIR %CD%\tools_tmp + - IF not exist "%MINGW_ARCHIVE%" appveyor DownloadFile "%MINGW_URL%" -FileName "%MINGW_ARCHIVE%" + - 7z x -y "%MINGW_ARCHIVE%" -o"%CD%\tools_tmp"> nul + - IF not exist "%NIM_ARCHIVE%" appveyor DownloadFile "%NIM_URL%" -FileName "%NIM_ARCHIVE%" + - 7z x -y "%NIM_ARCHIVE%" -o"%CD%\tools_tmp"> nul + - SET PATH=%CD%\tools_tmp\%NIM_DIR%\bin;%CD%\tools_tmp\%MINGW_DIR%\bin;%PATH% + - SET PATH=%PATH%;%CD% + +build_script: + - nimble.exe refresh + +test_script: + - nimble.exe test + +deploy: off diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..90ec7e4 --- /dev/null +++ b/.travis.yml @@ -0,0 +1,43 @@ +language: c + +cache: ccache + +matrix: + include: + # Build and test against the master (stable) and devel branches of Nim + # Build and test using both gcc and clang + - os: linux + env: CHANNEL=stable + compiler: gcc + + - os: linux + env: CHANNEL=devel + compiler: gcc + + # On OSX we only test against clang (gcc is mapped to clang by default) + - os: osx + env: CHANNEL=stable + compiler: clang + + allow_failures: + # Ignore failures when building against the devel Nim branch + # Also ignore OSX, due to very long build time and Homebrew/curl SSLRead errors + - env: CHANNEL=devel + - os: osx + fast_finish: true + +install: + - export CHOOSENIM_NO_ANALYTICS=1 + - curl https://nim-lang.org/choosenim/init.sh -sSf > init.sh + - sh init.sh -y + - export PATH=~/.nimble/bin:$PATH + - echo "export PATH=~/.nimble/bin:$PATH" >> ~/.profile + - choosenim $CHANNEL + +script: + - nimble refresh + - nimble test + +branches: + except: + - gh-pages