Skip to content

Commit

Permalink
Merge pull request #527 from chuckatkins/use-ninja-on-appveyor
Browse files Browse the repository at this point in the history
Use ninja on AppVeyor for faster builds
  • Loading branch information
Chuck Atkins authored Apr 4, 2018
2 parents 96500f8 + f618f31 commit deabe6f
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 44 deletions.
51 changes: 41 additions & 10 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,34 @@ os:
- Visual Studio 2017

platform:
- x86
- x64

install:
############################################################################
# All external dependencies are installed in C:\projects\deps
############################################################################
- mkdir C:\projects\deps
- cd C:\projects\deps

############################################################################
# Install Ninja
############################################################################
- set NINJA_URL="https://github.com/Kitware/ninja/releases/download/v1.8.2.g972a7.kitware.dyndep-1/ninja-1.8.2.g972a7.kitware.dyndep-1_i686-pc-windows-msvc.zip"
- appveyor DownloadFile %NINJA_URL% -FileName ninja.zip
- 7z e ninja.zip -oC:\projects\deps\ninja > nul
- set PATH=C:\projects\deps\ninja;%PATH%
- ninja --version

############################################################################
# Install a recent CMake
############################################################################
- set CMAKE_URL="https://cmake.org/files/v3.11/cmake-3.11.0-win64-x64.zip"
- appveyor DownloadFile %CMAKE_URL% -FileName cmake.zip
- 7z x cmake.zip -oC:\projects\deps > nul
- move C:\projects\deps\cmake-* C:\projects\deps\cmake
- set PATH=C:\projects\deps\cmake\bin;%PATH%
- cmake --version

# install:
# ### Having trouble with enabling python on windows
# - set PATH=C:\Python27-x64;C:\Python27-x64\Scripts;%PATH%
# - "python.exe -m pip install numpy"
Expand All @@ -18,7 +43,7 @@ platform:
# - ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))

before_build:
- del /q /f "C:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets"
#- del /q /f "C:\Program Files (x86)\MSBuild\14.0\Microsoft.Common.targets\ImportAfter\Xamarin.Common.targets"
- cd C:\projects\adios2
- git reset --hard %APPVEYOR_PULL_REQUEST_HEAD_COMMIT%
- ps: |
Expand All @@ -27,25 +52,31 @@ before_build:
} else {
$env:BUILD_NAME_BRANCH = $env:APPVEYOR_REPO_BRANCH
}
if($env:APPVEYOR_BUILD_WORKER_IMAGE.split()[2] -eq "2015") {
$env:VCVARSALLPATH = 'C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat'
$env:VCVARSALLARGS = "amd64"
} elseif($env:APPVEYOR_BUILD_WORKER_IMAGE.split()[2] -eq "2017") {
$env:VCVARSALLPATH = 'C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Auxiliary\Build\vcvarsall.bat'
$env:VCVARSALLARGS = "amd64"
}
$env:CC = "cl.exe"
$env:CXX = "cl.exe"
$env:CUSTOM_BUILD_NAME = ("{0}_{1}_vs{2}" -f $env:BUILD_NAME_BRANCH, $env:APPVEYOR_BUILD_NUMBER, $env:APPVEYOR_BUILD_WORKER_IMAGE.split()[2] )
$env:DASHBOARD_SCRIPT_SUFFIX = ($ENV:APPVEYOR_BUILD_WORKER_IMAGE -replace '\s', '-').ToLower()
- ctest.exe -VV -S ../adios2/scripts\appveyor\av_%DASHBOARD_SCRIPT_SUFFIX%.cmake
- call "%VCVARSALLPATH%" %VCVARSALLARGS%
- ctest.exe -VV -S ..\adios2\scripts\appveyor\appveyor_ninja.cmake
-Ddashboard_full=OFF
-Ddashboard_do_update=true
-DCTEST_BUILD_NAME=%CUSTOM_BUILD_NAME%

build_script:
- ctest.exe -VV -S ../adios2/scripts\appveyor\av_%DASHBOARD_SCRIPT_SUFFIX%.cmake
- ctest.exe -VV -S ..\adios2\scripts\appveyor\appveyor_ninja.cmake
-Ddashboard_full=OFF
-Ddashboard_do_configure=true
-DCTEST_BUILD_NAME=%CUSTOM_BUILD_NAME%
- ctest.exe -VV -S ../adios2/scripts\appveyor\av_%DASHBOARD_SCRIPT_SUFFIX%.cmake
-Ddashboard_full=OFF
-Ddashboard_do_build=true
-DCTEST_BUILD_NAME=%CUSTOM_BUILD_NAME%

test_script:
- ctest.exe -VV -S ../adios2/scripts\appveyor\av_%DASHBOARD_SCRIPT_SUFFIX%.cmake
- ctest.exe -VV -S ..\adios2\scripts\appveyor\appveyor_ninja.cmake
-Ddashboard_full=OFF
-Ddashboard_do_test=true
-DCTEST_BUILD_NAME=%CUSTOM_BUILD_NAME%
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# Client maintainer: [email protected]
set(CTEST_SITE "AppVeyor")
set(CTEST_BUILD_CONFIGURATION Release)
set(CTEST_CMAKE_GENERATOR "Visual Studio 14 2015 Win64")
set(CTEST_CMAKE_GENERATOR "Ninja")
set(CTEST_TEST_ARGS PARALLEL_LEVEL 4)

message("av_visual-studio-2015.cmake, CTEST_BUILD_NAME=${CTEST_BUILD_NAME}, push build notes is ADIOS_CTEST_SUBMIT_NOTES=${ADIOS_CTEST_SUBMIT_NOTES}")

set(dashboard_model Experimental)
set(dashboard_binary_name "build_visual-studio")
set(dashboard_binary_name "build_ninja")
set(dashboard_track "Continuous Integration")

set(CTEST_GIT_COMMAND "git.exe")
Expand Down
30 changes: 0 additions & 30 deletions scripts/appveyor/av_visual-studio-2017.cmake

This file was deleted.

0 comments on commit deabe6f

Please sign in to comment.