blob: be98ce61dedb4fffe5793e59e7fabc9fb78c0f5c [file] [log] [blame]
platform:
- x86
- x64
environment:
global:
MAKEJOBS: 2
matrix:
# - SWIGLANG: csharp
# VSVER: 12
# - SWIGLANG: csharp
# VSVER: 14
# - SWIGLANG: java
# VSVER: 14
# - SWIGLANG: python
# VSVER: 14
# VER: 27
- SWIGLANG: python
VSVER: 15
VER: 38
PY3: 3
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2017
- SWIGLANG: python
VSVER: 16
VER: 39
PY3: 3
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
# - SWIGLANG: python
# OSVARIANT: cygwin
# - SWIGLANG: java
# OSVARIANT: mingw
# APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
# - SWIGLANG: python
# OSVARIANT: mingw
# WITHLANG: python
# VER: 37
# PY3: 3
# APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
# - BUILDSYSTEM: cmake
# VSVER: 14
#matrix:
# allow_failures:
install:
- date /T & time /T
- ps: >-
if ($env:Platform -eq "x86") {
$env:PCRE_PLATFORM="Win32"
$env:JAVA_HOME="C:/Program Files (x86)/Java/jdk1.8.0"
$env:VCVARS_PLATFORM="x86"
$env:LANG_PLATFORM=""
$env:CYGWINBIN="C:\cygwin\bin"
$env:CYGWINSETUP="C:/cygwin/setup-x86.exe"
$env:MSYSBIN="C:\msys64\usr\bin"
$env:MINGWBIN="C:\msys64\mingw32\bin"
$env:MBITS="32"
$env:MARCH="i686"
$env:VSARCH=""
} else {
$env:PCRE_PLATFORM="x64"
$env:JAVA_HOME="C:/Program Files/Java/jdk15"
$env:VCVARS_PLATFORM="amd64"
$env:LANG_PLATFORM="-x64"
$env:CYGWINBIN="C:\cygwin64\bin"
$env:CYGWINSETUP="C:/cygwin64/setup-x86_64.exe"
$env:MSYSBIN="C:\msys64\usr\bin"
$env:MINGWBIN="C:\msys64\mingw64\bin"
$env:MBITS="64"
$env:MARCH="x86_64"
$env:VSARCH=" Win64"
}
- ps: >-
if (!$env:OSVARIANT) {
$env:PATH="$env:CYGWINBIN;$env:PATH"
$env:CYGWIN="nodosfilewarning"
$env:CC="cccl"
$env:CXX="cccl"
if ($env:VSVER -ge 16) {
$env:VCVARSBAT="C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars$env:MBITS.bat"
$env:BOOSTROOT="C:/Libraries/boost_1_73_0"
} elseif ($env:VSVER -eq 15) {
$env:VCVARSBAT="C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvars$env:MBITS.bat"
$env:BOOSTROOT="C:/Libraries/boost_1_69_0"
} else {
$env:VSCOMNTOOLS=(Get-Content ("env:VS" + "$env:VSVER" + "0COMNTOOLS"))
$env:VCVARSBAT="$env:VSCOMNTOOLS..\..\VC\vcvarsall.bat"
$env:VCVARSARG="$env:VCVARS_PLATFORM"
$env:BOOSTROOT="C:/Libraries/boost_1_69_0"
}
} elseif ($env:OSVARIANT -eq "cygwin") {
$env:PATH="$env:CYGWINBIN;$env:PATH"
$env:CYGWIN="nodosfilewarning"
$env:CC="gcc"
$env:CXX="g++"
} elseif ($env:OSVARIANT -eq "mingw") {
# Note mingw setup tests the native Windows Python distribution (not MinGW Python) with gcc
$env:PATH="$env:MINGWBIN;$env:MSYSBIN;$env:PATH"
$env:MSYSTEM="MINGW$env:MBITS" # This is important for msys2
$env:CC="gcc"
$env:CXX="g++"
if ($env:MBITS -eq "64" -and $env:SWIGLANG -eq "python") {
$env:CHECK_OPTIONS2="CFLAGS+=-DMS_WIN64 CXXFLAGS+=-DMS_WIN64"
}
}
- if "%OSVARIANT%"=="" bash -c "cd /usr/bin && curl --retry 15 -s -L https://github.com/swig/cccl/archive/master.tar.gz | tar -xz --strip 1 cccl-master/cccl"
- if "%OSVARIANT%"=="" call "%VCVARSBAT%" %VCVARSARG%
- if "%OSVARIANT%"=="" Tools\nuget-install.cmd pcre -Verbosity quiet -Version 8.33.0.1 -OutputDirectory C:\pcre
- if "%OSVARIANT%"=="" set PCRE_ROOT=C:/pcre/pcre.8.33.0.1/build/native
- if not "%OSVARIANT%"=="cygwin" set PATH=C:\Python%VER%%LANG_PLATFORM%;%PATH%
- if "%OSVARIANT%"=="" bash -c "which cl.exe"
- if "%OSVARIANT%"=="" bash -c "cl.exe /? 2>&1 | head -n 1"
- if "%OSVARIANT%"=="" bash -c "which csc.exe"
- if "%OSVARIANT%"=="" bash -c "csc.exe /? | head -n 1"
- if "%OSVARIANT%"=="cygwin" %CYGWINSETUP% --quiet-mode --packages python2-devel,libpcre-devel,libboost-devel > cygwin-install.txt || bash -c "cat cygwin-install.txt"
- if "%OSVARIANT%"=="mingw" bash -c "pacman --noconfirm --sync mingw%MBITS%/mingw-w64-%MARCH%-pcre mingw%MBITS%/mingw-w64-%MARCH%-boost"
- if not "%WITHLANG%"=="" set SWIGWITHLANG==%WITHLANG%
- if not "%WITHLANG%"=="" where %WITHLANG%
- bash -c "which $CC"
- bash -c "which $CXX"
- bash -c "$CC --version | head -n 1"
- bash -c "$CXX --version | head -n 1"
- bash -c "which python"
- bash -c "python -V"
- bash -c "make --version | head -n 2"
- pwd
- echo MAKEJOBS=%MAKEJOBS%
- uname -a
build_script:
- set CCCL_OPTIONS=--cccl-muffle --cccl-verbose /W3 /EHsc
- set CHECK_OPTIONS=CSHARPOPTIONS=-platform:%Platform%
- if "%BUILDSYSTEM%"=="cmake" cmake --version && cmake -G "Visual Studio 14 2015%VSARCH%" -DCMAKE_INSTALL_PREFIX="%CD:\=/%/install2" -DCMAKE_C_FLAGS="/WX /DPCRE_STATIC" -DCMAKE_CXX_FLAGS="/WX /DPCRE_STATIC" -DPCRE_INCLUDE_DIR=%PCRE_ROOT%/include -DPCRE_LIBRARY=%PCRE_ROOT%/lib/v110/%PCRE_PLATFORM%/Release/static/utf8/pcre8.lib -DBISON_EXECUTABLE=C:/cygwin/bin/bison.exe . && cmake --build . --config Release --target install && ctest --output-on-failure -V -C Release && appveyor exit
# Open dummy file descriptor to fix error on cygwin: ./configure: line 560: 0: Bad file descriptor
- ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
- if "%OSVARIANT%"=="" bash -c "exec 0</dev/null && ./autogen.sh && time ./configure --disable-dependency-tracking --disable-ccache --enable-cpp11-testing CC=$CC CXX=$CXX CFLAGS='-O2' CXXFLAGS='-O2' LDFLAGS='--cccl-link /LTCG' PCRE_CFLAGS='-I%PCRE_ROOT%/include -DPCRE_STATIC' PCRE_LIBS='-L%PCRE_ROOT%/lib/v110/%PCRE_PLATFORM%/Release/static/utf8 -lpcre8' --without-perl5 --without-go --with-boost=%BOOSTROOT% || cat config.log"
- if not "%OSVARIANT%"=="" bash -c "exec 0</dev/null && ./autogen.sh && time ./configure CC=%CC% CXX=%CXX% --without-alllang --with-$SWIGLANG$PY3$SWIGWITHLANG --enable-cpp11-testing || cat config.log"
- bash -c "time make -s -j%MAKEJOBS%"
test_script:
- set CCCL_OPTIONS=--cccl-muffle /W3 /EHsc
- .\swig.exe -version
- if not "%OSVARIANT%"=="" CCache\ccache-swig -V
- bash -c "file ./swig.exe"
- bash -c "make check-%SWIGLANG%-version"
- bash -c "make check-%SWIGLANG%-enabled"
- bash -c "time make -k check-%SWIGLANG%-examples %CHECK_OPTIONS% %CHECK_OPTIONS2%"
- bash -c "time make -k check-%SWIGLANG%-test-suite -j%MAKEJOBS% %CHECK_OPTIONS% %CHECK_OPTIONS2%"
# Do not build on tags (GitHub only)
skip_tags: true
#on_finish: # Display RDP connection information
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))