forked from igraph/igraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
107 lines (88 loc) · 4.49 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# 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:
PATH: C:\msys64\usr\bin;C:\msys64\mingw64\bin;C:\Windows\System32;C:\Windows;%PATH%
MSYSTEM: MINGW64
TARGET_ARCH: "x64"
matrix:
-
PYTHON_VERSION: "2.7"
CONDA_INSTALL_LOCN: "C:\\Miniconda-x64"
-
PYTHON_VERSION: "3.5"
CONDA_INSTALL_LOCN: "C:\\Miniconda35-x64"
-
PYTHON_VERSION: "3.6"
CONDA_INSTALL_LOCN: "C:\\Miniconda36-x64"
-
PYTHON_VERSION: "3.7"
CONDA_INSTALL_LOCN: "C:\\Miniconda37-x64"
-
PYTHON_VERSION: "NONE"
CONDA_INSTALL_LOCN: "C:\\Miniconda37-x64"
# 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