AppVeyor:
1. Work around memory limitations in Haskell build
2. Run subset of C# test matrix if the sandbox wasn't in cache

Travis CI
1. Change project type to C++
2. Install Mono manually in Linux
3. Use Clang as C++ compiler
4. cabal install happy
This commit is contained in:
Adam Sapek 2015-04-02 03:00:09 -07:00
Родитель 91db1c4f12
Коммит 7a14f45fcd
5 изменённых файлов: 47 добавлений и 19 удалений

Просмотреть файл

@ -1,12 +1,16 @@
language: csharp
language: cpp
compiler: clang
os:
- linux
- osx
before_install:
- echo $TRAVIS_OS_NAME
- export CC=clang
#linux prereqisite packages
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then echo "deb http://download.mono-project.com/repo/debian wheezy main" | sudo tee /etc/apt/sources.list.d/mono-xamarin.list; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then echo "deb http://download.mono-project.com/repo/debian wheezy-libtiff-compat main" | sudo tee -a /etc/apt/sources.list.d/mono-xamarin.list; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get update -qq; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install -y mono-complete referenceassemblies-pcl; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo add-apt-repository ppa:smspillaz/cmake-2.8.12 -y; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo add-apt-repository ppa:boost-latest/ppa -y; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo add-apt-repository ppa:hvr/ghc -y; fi
@ -18,15 +22,13 @@ before_install:
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then brew install ghc cabal-install; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then curl -s -o mono.pkg http://download.mono-project.com/archive/3.12.0/macos-10-x86/MonoFramework-MDK-3.12.0.macos10.xamarin.x86.pkg; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then sudo installer -pkg "mono.pkg" -target /; fi
#show versions of cmake and clang
- cmake --version && clang --version
#nuget installation
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then sudo apt-get install nuget && export NUGET=nuget; fi
- if [ "$TRAVIS_OS_NAME" == "osx" ]; then curl -s -o "cs/nuget/nuget.exe" -L "http://www.nuget.org/nuget.exe" && export NUGET="mono cs/nuget/nuget.exe"; fi
#nunit installation
- $NUGET install NUnit.Runners -version 2.6.4
#cabal-install from ppa is installed into /opt
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then /opt/cabal/1.22/bin/cabal update; else cabal update; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then $CABAL_PATH/cabal update; else cabal update; fi
- if [ "$TRAVIS_OS_NAME" == "linux" ]; then $CABAL_PATH/cabal install happy; else cabal install happy; fi
before_script:
#restore nuget packages for solution

Просмотреть файл

@ -70,6 +70,8 @@ packages are needed:
libboost-test-dev \
libboost-python-dev
cabal install happy
Running the following command in the build directory will build and execute all
the tests and examples:
@ -92,9 +94,10 @@ using Homebrew ([http://brew.sh/](http://brew.sh/)):
(boost-python is optional and only needed for Python support)
Update cabal package database:
Update cabal package database and install `happy` (only needed for tests):
cabal update
cabal install happy
Bond can be built on OS X using either standard *nix makefiles or XCode. In
order to generate and build makefiles, in the root `bond` directory run:

Просмотреть файл

@ -6,6 +6,12 @@ install:
- ps: >-
if ($env:APPVEYOR_REPO_BRANCH -ne "fsharp") {
if (Test-Path compiler\.cabal-sandbox) {
$env:SandboxCache = "restored"
}
#choco install 7zip
#$env:Path += ";${env:ProgramFiles}\7-Zip"
@ -24,7 +30,7 @@ install:
#$env:BOOST_ROOT = "${env:APPVEYOR_BUILD_FOLDER}\boost_1_57_0"
choco install haskellplatform -version 2014.2.0.0
choco install haskellplatform -version 2014.2.0.0 -y
# Haskell Platfrom package doesn't update PATH for the current shell instance
@ -94,6 +100,12 @@ test_script:
if ($env:APPVEYOR_REPO_BRANCH -ne "fsharp") {
if ($env:SandboxCache -ne "restored") {
nunit-console-x86 /framework:net-4.5 /labels cs\test\core\bin\debug\net45\Properties\Bond.UnitTest.dll cs\test\internal\bin\debug\net45\Bond.InternalTest.dll
} else {
nunit-console-x86 /framework:net-4.0 /labels cs\test\core\bin\debug\net40\Properties\Bond.UnitTest.dll cs\test\core\bin\debug\net40\Fields\Bond.UnitTest.dll cs\test\internal\bin\debug\net40\Bond.InternalTest.dll
nunit-console-x86 /framework:net-4.5 /labels cs\test\core\bin\debug\net45\Properties\Bond.UnitTest.dll cs\test\core\bin\debug\net45\Fields\Bond.UnitTest.dll cs\test\internal\bin\debug\net45\Bond.InternalTest.dll
@ -103,6 +115,7 @@ test_script:
#ctest -C Release -R compatibility --output-on-failure
#cd ..
}
} else {

Просмотреть файл

@ -10,12 +10,22 @@
cmake_policy (SET CMP0012 NEW)
if ($ENV{APPVEYOR})
# AppVeyor Azure VMs have limited memory, limit ghc heap to 192 MB
set (GHC_OPTIONS --ghc-option=+RTS --ghc-option=-M192m --ghc-option=-RTS)
# AppVeyor Azure VMs have limited memory and shakespeare package doesn't
# install as a dependency of the Bond compiler. As a workaround we install
# shakespeare explicitly when running under AppVeyor and we limit the heap
# used by ghc to 400 MB.
execute_process (
COMMAND ${Haskell_CABAL_EXECUTABLE} install shakespeare --with-compiler=${Haskell_GHC_EXECUTABLE} --jobs --ghc-option=+RTS --ghc-option=-M400m --ghc-option=-RTS
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
RESULT_VARIABLE error)
if (error)
message (FATAL_ERROR)
endif()
endif()
execute_process (
COMMAND ${Haskell_CABAL_EXECUTABLE} install ${cabal_options} --with-compiler=${Haskell_GHC_EXECUTABLE} --only-dependencies --jobs ${GHC_OPTIONS}
COMMAND ${Haskell_CABAL_EXECUTABLE} install ${cabal_options} --with-compiler=${Haskell_GHC_EXECUTABLE} --extra-prog-path=$ENV{HOME}/.cabal/bin --only-dependencies --jobs
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
RESULT_VARIABLE error)

Просмотреть файл

@ -85,7 +85,7 @@ if (Haskell_PANDOC_EXECUTABLE)
OUTPUT_NAME index
OUTPUT_DIR reference)
add_pandoc_markdown (../readme.md
add_pandoc_markdown (../README.md
TEMPLATE index.html
OUTPUT_NAME index
CODE python)