mirror of
https://github.com/Xahau/xahaud.git
synced 2025-11-04 10:45:50 +00:00
Fixes: RIPD-1648 - use ExternalProject for snappy, lz4, SOCI, and sqlite3 - use FetchContent for NuDB - update SOCI from 79e222e3c2278e6108137a2d26d3689418b37544 to 3a1f602b3021b925d38828e3ff95f9e7f8887ff7 - update lz4 from c10863b98e1503af90616ae99725ecd120265dfb to v1.8.2 - update sqlite3 from 3.21 to 3.24 - update snappy from b02bfa754ebf27921d8da3bd2517eab445b84ff9 to 1.1.7 - update NuDB from 00adc6a4f16679a376f40c967f77dfa544c179c1 to 1.0.0
96 lines
3.2 KiB
YAML
96 lines
3.2 KiB
YAML
# Set environment variables.
|
|
environment:
|
|
|
|
# We bundle up protoc.exe and only the parts of boost and openssl we need so
|
|
# that it's a small download. We also use appveyor's free cache, avoiding fees
|
|
# downloading from S3 each time.
|
|
# TODO: script to create this package.
|
|
RIPPLED_DEPS_PATH: rippled_deps17.04
|
|
RIPPLED_DEPS_URL: https://ripple.github.io/Downloads/appveyor/%RIPPLED_DEPS_PATH%.zip
|
|
|
|
# CMake honors these environment variables, setting the include/lib paths.
|
|
BOOST_ROOT: C:/%RIPPLED_DEPS_PATH%/boost
|
|
OPENSSL_ROOT: C:/%RIPPLED_DEPS_PATH%/openssl
|
|
NIH_CACHE_ROOT: C:/%RIPPLED_DEPS_PATH%/
|
|
|
|
# We've had trouble with AppVeyor apparently not having a stack as large
|
|
# as the *nix CI platforms. AppVeyor support suggested that we try
|
|
# GCE VMs. The following line is supposed to enable that VM type.
|
|
appveyor_build_worker_cloud: gce
|
|
|
|
matrix:
|
|
- build: cmake
|
|
target: msvc.debug
|
|
buildconfig: Debug
|
|
|
|
os: Visual Studio 2017
|
|
|
|
# At the end of each successful build we cache this directory.
|
|
# https://www.appveyor.com/docs/build-cache/
|
|
# Resulting archive should not exceed 100 MB.
|
|
cache:
|
|
- 'C:\%RIPPLED_DEPS_PATH%'
|
|
|
|
# This means we'll download a zip of the branch we want, rather than the full
|
|
# history.
|
|
shallow_clone: true
|
|
|
|
install:
|
|
# We want protoc.exe on PATH.
|
|
- SET PATH=C:/%RIPPLED_DEPS_PATH%;%PATH%
|
|
|
|
# Download dependencies if appveyor didn't restore them from the cache.
|
|
# Use 7zip to unzip.
|
|
- ps: |
|
|
if (-not(Test-Path 'C:/$env:RIPPLED_DEPS_PATH')) {
|
|
echo "Download from $env:RIPPLED_DEPS_URL"
|
|
Start-FileDownload "$env:RIPPLED_DEPS_URL"
|
|
7z x "$($env:RIPPLED_DEPS_PATH).zip" -oC:\ -y > $null
|
|
if ($LastExitCode -ne 0) { throw "7z failed" }
|
|
}
|
|
|
|
# Newer DEPS include a versions file.
|
|
# Dump it so we can verify correct behavior.
|
|
- ps: |
|
|
if (Test-Path "C:/$env:RIPPLED_DEPS_PATH/versions.txt") {
|
|
cat "C:/$env:RIPPLED_DEPS_PATH/versions.txt"
|
|
}
|
|
|
|
# TODO: This is giving me grief
|
|
# artifacts:
|
|
# # Save rippled.exe in the cloud after each build.
|
|
# - path: "build\\rippled.exe"
|
|
|
|
build_script:
|
|
# We set the environment variables needed to put compilers on the PATH.
|
|
- '"%VS140COMNTOOLS%../../VC/vcvarsall.bat" x86_amd64'
|
|
# Show which version of the compiler we are using.
|
|
- cl
|
|
- ps: |
|
|
# Build with cmake
|
|
cmake --version
|
|
$cmake_target="$($env:target).ci"
|
|
"$cmake_target"
|
|
New-Item -ItemType Directory -Force -Path "build/$cmake_target"
|
|
Push-Location "build/$cmake_target"
|
|
cmake -G"Visual Studio 15 2017 Win64" ../..
|
|
if ($LastExitCode -ne 0) { throw "CMake failed" }
|
|
cmake --build . --config $env:buildconfig --parallel 3
|
|
if ($LastExitCode -ne 0) { throw "CMake build failed" }
|
|
Pop-Location
|
|
|
|
after_build:
|
|
- ps: |
|
|
$exe="build/$cmake_target/$env:buildconfig/rippled"
|
|
"Exe is at $exe"
|
|
|
|
test_script:
|
|
- ps: |
|
|
& {
|
|
# Run the rippled unit tests
|
|
& $exe --unittest --unittest-log --unittest-jobs 2
|
|
# https://connect.microsoft.com/PowerShell/feedback/details/751703/option-to-stop-script-if-command-line-exe-fails
|
|
if ($LastExitCode -ne 0) { throw "Unit tests failed" }
|
|
}
|
|
|