Permalink
Fetching contributors…
Cannot retrieve contributors at this time
110 lines (90 sloc) 4.8 KB
# This file is based on one which was automatically generated by conda-smithy
# and the one in matplotlib.
# It uses conda environment to get the build dependencies for a full windows
# build, both the "normal" one and the msvc based one.
environment:
matrix:
- TARGET_ARCH: "x64"
PYTHON_VERSION: "2.7"
CONDA_INSTALL_LOCN: "C:\\Miniconda-x64"
MSYSTEM: MINGW64
PATH: C:\msys64\usr\bin;C:\msys64\mingw64\bin;C:\Windows\System32;C:\Windows;%PATH%
- TARGET_ARCH: "x64"
PYTHON_VERSION: "3.4"
CONDA_INSTALL_LOCN: "C:\\Miniconda3-x64"
MSYSTEM: MINGW64
PATH: C:\msys64\usr\bin;C:\msys64\mingw64\bin;C:\Windows\System32;C:\Windows;%PATH%
- TARGET_ARCH: "x64"
PYTHON_VERSION: "3.5"
CONDA_INSTALL_LOCN: "C:\\Miniconda35-x64"
MSYSTEM: MINGW64
PATH: C:\msys64\usr\bin;C:\msys64\mingw64\bin;C:\Windows\System32;C:\Windows;%PATH%
- TARGET_ARCH: "x64"
PYTHON_VERSION: "NONE"
CONDA_INSTALL_LOCN: "C:\\Miniconda-x64"
MSYSTEM: MINGW64
PATH: C:\msys64\usr\bin;C:\msys64\mingw64\bin;C:\Windows\System32;C:\Windows;%PATH%
# We always use a 64-bit machine, but can build x86 distributions
# with the PYTHON_ARCH variable (which is used by CMD_IN_ENV).
platform:
- x64
init:
- cmd: "ECHO %PYTHON_VERSION% %CONDA_INSTALL_LOCN%"
# all our builds have to happen in install...
build: false
install:
# If there is a newer build queued for the same PR, cancel this one.
# The AppVeyor 'rollout builds' option is supposed to serve the same
# purpose but it is problematic because it tends to cancel builds pushed
# directly to master instead of just PR builds (or the converse).
# credits: JuliaLang developers.
- ps: if ($env:APPVEYOR_PULL_REQUEST_NUMBER -and $env:APPVEYOR_BUILD_NUMBER -ne ((Invoke-RestMethod `
https://ci.appveyor.com/api/projects/$env:APPVEYOR_ACCOUNT_NAME/$env:APPVEYOR_PROJECT_SLUG/history?recordsNumber=50).builds | `
Where-Object pullRequestId -eq $env:APPVEYOR_PULL_REQUEST_NUMBER)[0].buildNumber) { `
throw "There are newer queued builds for this pull request, failing early." }
# setup conda environment for building
- cmd: set "PATH=%CONDA_INSTALL_LOCN%;%CONDA_INSTALL_LOCN%\scripts;%PATH%"
- cmd: set PYTHONUNBUFFERED=1
# update mysy2
- C:\msys64\usr\bin\bash -lc "pacman --needed --noconfirm -Sy pacman-mirrors"
- C:\msys64\usr\bin\bash -lc "pacman --noconfirm -Sy"
- C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S autoconf automake bison flex"
- C:\msys64\usr\bin\bash -lc "pacman --noconfirm -S libxml2-devel zip"
# also install a msvc build environment -> use libxml2 from conda-forge
# updating conda always updates python, even with "no-update-deps" and
# updating python takes ages on appveyor... So just keep the shorter PATH
# workaround for the activate failure and don't update conda itself...
#- cmd: conda update conda --no-update-dependencies
- cmd: conda config --add channels conda-forge
- cmd: conda config --set show_channel_urls yes
- cmd: conda config --set always_yes true
- cmd: if [%PYTHON_VERSION%] NEQ [NONE] conda install --quiet libxml2 python=%PYTHON_VERSION%
- cmd: conda info -a
# Now start with the build: first the msys2 based one
- cmd: bash bootstrap.sh
- cmd: bash configure
# for testing purpose removed, takes ages...
- cmd: if %PYTHON_VERSION%==NONE make
# now make the msvc builds
- cmd: if [%PYTHON_VERSION%] NEQ [NONE] make msvc
# now build the with the right compiler for each python version
- cmd: if [%PYTHON_VERSION%] NEQ [NONE] cd igraph-*-msvc
- cmd: if %PYTHON_VERSION%==2.7 call "C:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\bin\vcvars64.bat"
- cmd: if %PYTHON_VERSION%==2.7 vcbuild.exe /upgrade
- cmd: if %PYTHON_VERSION%==2.7 vcbuild.exe igraph.vcproj "Release|%TARGET_ARCH%"
- cmd: if %PYTHON_VERSION%==3.4 call "%VS100COMNTOOLS%\vsvars32.bat"
- cmd: if %PYTHON_VERSION%==3.4 VCUpgrade.exe /overwrite igraph.vcproj
- cmd: if %PYTHON_VERSION%==3.4 msbuild.exe igraph.vcxproj /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
- cmd: if %PYTHON_VERSION%==3.5 call "%VS140COMNTOOLS%\vsvars32.bat"
- cmd: if %PYTHON_VERSION%==3.5 devenv /upgrade igraph.vcproj
- cmd: if %PYTHON_VERSION%==3.5 msbuild.exe igraph.vcxproj /logger:"C:\Program Files\AppVeyor\BuildAgent\Appveyor.MSBuildLogger.dll"
test_script:
- cmd: cd "%APPVEYOR_BUILD_FOLDER%"
- cmd: set "PATH=%APPVEYOR_BUILD_FOLDER%\src\.libs;%PATH%"
- cmd: path
- cmd: if [%PYTHON_VERSION%]==[NONE] make check
on_failure:
- cmd: echo zipping everything after a failure...
- cmd: cd "%APPVEYOR_BUILD_FOLDER%"
- cmd: 7z a failed_state.zip . |grep -v "Compressing"
- cmd: appveyor PushArtifact failed_state.zip