Commit 2ced9252 authored by Victor Zverovich's avatar Victor Zverovich

Move logic from travis.yml to a Python script

parent dd2e8b98
environment: environment:
CTEST_OUTPUT_ON_FAILURE: 1 CTEST_OUTPUT_ON_FAILURE: 1
matrix: matrix:
- Build: msvc - BUILD: msvc
Config: Debug CONFIG: Debug
- Build: msvc - BUILD: msvc
Config: Release CONFIG: Release
- Build: mingw - BUILD: mingw
Config: Debug CONFIG: Debug
- Build: mingw - BUILD: mingw
Config: Release CONFIG: Release
install: install:
- ps: | - ps: |
if ($env:Build -eq "mingw") { if ($env:BUILD -eq "mingw") {
# Install MinGW. # Install MinGW.
$url = "http://sourceforge.net/projects/mingw-w64/files/" $url = "http://sourceforge.net/projects/mingw-w64/files/"
$url += "Toolchains%20targetting%20Win64/Personal%20Builds/" $url += "Toolchains%20targetting%20Win64/Personal%20BUILDs/"
$url += "mingw-builds/4.9.0/threads-win32/seh/" $url += "mingw-builds/4.9.0/threads-win32/seh/"
$url += "x86_64-4.9.0-release-win32-seh-rt_v3-rev2.7z/download" $url += "x86_64-4.9.0-release-win32-seh-rt_v3-rev2.7z/download"
Invoke-WebRequest -UserAgent wget -Uri $url -OutFile mingw.7z Invoke-WebRequest -UserAgent wget -Uri $url -OutFile mingw.7z
&7z x -oC:\ mingw.7z > $null &7z x -oC:\ mingw.7z > $null
} }
- set PATH=C:\Program Files (x86)\MSBuild\12.0\bin\;%PATH%;C:\mingw64\bin - set PATH=C:\Program Files (x86)\MSBUILD\12.0\bin\;%PATH%;C:\mingw64\bin
before_build: before_build:
- ps: | - python support/build.py
if ($env:Build -eq "mingw") {
# Remove path to Git bin directory from PATH because it breaks MinGW config.
$env:PATH = $env:PATH -replace "C:\\Program Files \(x86\)\\Git\\bin",""
$generator = "-GMinGW Makefiles"
}
- echo "-DCMAKE_BUILD_TYPE=$env:Config"
- cmake -DFMT_EXTRA_TESTS=ON "-DCMAKE_BUILD_TYPE=$env:Config" "$generator" .
build_script: build_script:
- ps: | - ps: |
if ($env:Build -eq "mingw") { if ($env:BUILD -eq "mingw") {
mingw32-make -j4 mingw32-make -j4
} else { } else {
msbuild /m:4 /p:Config=$env:Config FORMAT.sln msbuild /m:4 /p:Config=$env:CONFIG FORMAT.sln
} }
test_script: test_script:
- ps: | - ps: |
if ($env:Build -eq "mingw") { if ($env:BUILD -eq "mingw") {
mingw32-make test mingw32-make test
} else { } else {
msbuild RUN_TESTS.vcxproj msbuild RUN_TESTS.vcxproj
......
#!/usr/bin/env python
# Build the project on AppVeyor.
from subprocess import check_call
import os
env = os.environ
build = env['BUILD']
if build == 'mingw':
# Remove path to Git bin directory from $PATH because it breaks MinGW config.
env['PATH'] = env['PATH'].replace(r'C:\Program Files (x86)\Git\bin', '')
generator = ['-GMinGW Makefiles']
check_call(['cmake', '-DFMT_EXTRA_TESTS=ON', '-DCMAKE_BUILD_TYPE=' + env['CONFIG']] + generator, env=env)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment