112 lines
3.1 KiB
YAML
112 lines
3.1 KiB
YAML
version: 2.2.0_b{build}-{branch}
|
|
|
|
os: Visual Studio 2015
|
|
|
|
init:
|
|
- git config --global core.autocrlf input
|
|
- set "PATH=C:\msys64\mingw64\bin;C:\msys64\usr\bin;%PATH%"
|
|
- set MSYSTEM=MINGW64
|
|
- pacman --noconfirm --needed -S base-devel git zip mingw-w64-x86_64-toolchain mingw-w64-x86_64-cmake
|
|
- set "PATH=%PATH%;%APPVEYOR_BUILD_FOLDER%\build;%APPVEYOR_BUILD_FOLDER%\build\Debug;%APPVEYOR_BUILD_FOLDER%\build\external\bin;%APPVEYOR_BUILD_FOLDER%\build\external\lib"
|
|
|
|
environment:
|
|
COVERALLS_REPO_TOKEN:
|
|
secure: 5nuCg+faxFPeppoNNcSwVobswAVFUf8ut83vw8CX/4W2y0kZkGmwEfCUxSQWiQDU
|
|
CI_NAME: appveyor
|
|
CI_JOB_ID: $(APPVEYOR_JOB_ID)
|
|
GCOV_PREFIX: $(APPVEYOR_BUILD_FOLDER)
|
|
PYTHON: "C:\\Python34"
|
|
PYTHON_BIN: "C:\\Python34\\python.exe"
|
|
PYTHON_VERSION: "3.4.2"
|
|
PYTHON_ARCH: "32"
|
|
PYTHONIOENCODING: "utf-8" # consider cmd encoding to be unicode
|
|
CRAM_SHELL: "C:\\msys64\\usr\\bin\\sh.exe"
|
|
matrix:
|
|
- COMPILER: mingw
|
|
GENERATOR: "MSYS Makefiles"
|
|
CXXFLAGS: -D__NO_INLINE__
|
|
- COMPILER: msvc
|
|
GENERATOR: "Visual Studio 14 2015"
|
|
CFLAGS: /MP
|
|
CXXFLAGS: /MP
|
|
|
|
clone_depth: 5
|
|
|
|
platform:
|
|
- x86
|
|
- x64
|
|
|
|
configuration:
|
|
- Debug
|
|
- Release
|
|
- RelWithDebInfo
|
|
|
|
install:
|
|
# Install Python
|
|
- ps: if (-not(Test-Path($env:PYTHON))) { & .cmake\install_python.ps1 }
|
|
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PYTHON%\\bin;%PATH%"
|
|
- python --version
|
|
# Upgrade pip
|
|
- "pip install --disable-pip-version-check --user --upgrade pip"
|
|
# Install cram
|
|
- "pip install cram"
|
|
- python -m cram --version
|
|
# Patch buggy cram
|
|
- sh -c "patch C:/Python34/Lib/site-packages/cram.py .cmake/cram-win.patch"
|
|
|
|
- ps: $env:RELEASE_NAME = $env:APPVEYOR_REPO_BRANCH -replace "/", "-"
|
|
# Hack to make git think it is on the tip of the repo branch
|
|
- 'git checkout -B %APPVEYOR_REPO_BRANCH%'
|
|
# Configure project
|
|
- 'mkdir build && cd build'
|
|
- >
|
|
cmake
|
|
-Wno-dev
|
|
-DCTESTS=ON
|
|
-DI18N=OFF
|
|
-DCMAKE_INSTALL_PREFIX="criterion-%RELEASE_NAME%"
|
|
-DCMAKE_BUILD_TYPE="%CONFIGURATION%"
|
|
%CMAKE_OPTS%
|
|
-G "%GENERATOR%"
|
|
..
|
|
|
|
build_script:
|
|
# open dummy fd 0 to prevent errors at configure time for nanomsg
|
|
- cmake --build . 0<nul
|
|
|
|
before_deploy:
|
|
- ps: |
|
|
$archive = "criterion-$env:RELEASE_NAME-windows-$env:COMPILER-$env:PLATFORM"
|
|
cmake --build . --target install
|
|
7z a -ttar "$archive.tar" "criterion-$env:RELEASE_NAME"
|
|
7z a -tbzip2 "../$archive.tar.bz2" "$archive.tar"
|
|
Push-AppveyorArtifact "../$archive.tar.bz2"
|
|
|
|
test_script:
|
|
- cmake --build . --target criterion_tests
|
|
- ps: |
|
|
ctest
|
|
if (-not $lastexitcode -eq 0) {
|
|
type Testing/Temporary/LastTest.log
|
|
$host.setshouldexit(1)
|
|
}
|
|
|
|
#after_test:
|
|
# - 'make coveralls'
|
|
|
|
notifications:
|
|
|
|
- provider: Email
|
|
to: [franklinmathieu@gmail.com]
|
|
on_build_status_changed: true
|
|
|
|
deploy:
|
|
provider: GitHub
|
|
auth_token:
|
|
secure: MnZZQeoxBVnpV9GSSvVok5Je0/N2d/fzG4+ITw95/tYSgZ8rleBV23a5sCwAea3r
|
|
artifact: 'criterion-$(RELEASE_NAME)-windows-$(COMPILER)-$(PLATFORM).tar.bz2'
|
|
draft: false
|
|
prerelease: false
|
|
on:
|
|
appveyor_repo_tag: true
|
|
configuration: RelWithDebInfo
|