blob: 5e3d76bff16d9315a0f26810515bfefbe700f268 [file] [log] [blame]
environment:
ANDROID_HOME: "C:\\android-sdk-windows"
ANDROID_NDK_HOME: "C:\\android-sdk-windows\\ndk-bundle"
JAVA_HOME: "C:\\Program Files\\Java\\jdk1.8.0"
BORINGSSL_HOME: "C:\\boringssl"
ANDROID_TOOLS_URL: "https://dl.google.com/android/repository/sdk-tools-windows-4333796.zip"
NINJA_URL: "https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip"
CMAKE_URL: "https://cmake.org/files/v3.11/cmake-3.11.1-win32-x86.zip"
MSVC_HOME: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community"
clone_folder: "C:\\projects\\conscrypt"
shallow_clone: true
os: Visual Studio 2017
platform:
# - x86
- x64
version: '{branch}.{build}'
pull_requests:
do_not_increment_build_number: true
build:
verbosity: minimal
init:
# Download the Android SDK
- appveyor DownloadFile %ANDROID_TOOLS_URL% -FileName android-tools.zip
- 7z x android-tools.zip -o"%ANDROID_HOME%" > nul
# Get Ninja
- appveyor DownloadFile %NINJA_URL% -FileName ninja.zip
- 7z x ninja.zip -oC:\ninja > nul
- set PATH=C:\ninja;%PATH%
- ninja --version
# Get CMake
- appveyor DownloadFile %CMAKE_URL% -FileName cmake.zip
- 7z x cmake.zip -oC:\cmake > nul
- set PATH=C:\cmake\bin;%PATH%
- cmake --version
# Install NASM
- choco install -y --allow-empty-checksums nasm
# Clone BoringSSL
- git clone --depth 1 https://boringssl.googlesource.com/boringssl.git "%BORINGSSL_HOME%"
# Work around gradle bug https://github.com/gradle/gradle/issues/929
- set PATH=C:\Program Files (x86)\Windows Kits\8.1\bin\x86;%PATH%
before_build:
# Build BoringSSL in 64-bit
- call "%MSVC_HOME%\VC\Auxiliary\Build\vcvarsall.bat" x64
- cd "%BORINGSSL_HOME%"
- mkdir build64
- cd build64
- cmake -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE -DCMAKE_BUILD_TYPE=Release "-DCMAKE_C_FLAGS_RELEASE=/MT -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING" "-DCMAKE_CXX_FLAGS_RELEASE=/MT -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING" -GNinja ..
- ninja
# Build BoringSSL in 32-bit
- call "%MSVC_HOME%\VC\Auxiliary\Build\vcvarsall.bat" x86
- cd "%BORINGSSL_HOME%"
- mkdir build32
- cd build32
- cmake -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE -DCMAKE_BUILD_TYPE=Release "-DCMAKE_C_FLAGS_RELEASE=/MT -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING" "-DCMAKE_CXX_FLAGS_RELEASE=/MT -D_SILENCE_TR1_NAMESPACE_DEPRECATION_WARNING" -GNinja ..
- ninja
# Go to project directory
- cd C:\projects\conscrypt
install:
- yes 2> nul | "%ANDROID_HOME%\tools\bin\sdkmanager.bat" --licenses
- '%ANDROID_HOME%\tools\bin\sdkmanager.bat tools'
- '%ANDROID_HOME%\tools\bin\sdkmanager.bat platform-tools'
- '%ANDROID_HOME%\tools\bin\sdkmanager.bat build-tools;29.0.2'
- '%ANDROID_HOME%\tools\bin\sdkmanager.bat platforms;android-26'
- '%ANDROID_HOME%\tools\bin\sdkmanager.bat extras;android;m2repository'
- '%ANDROID_HOME%\tools\bin\sdkmanager.bat ndk-bundle'
- '%ANDROID_HOME%\tools\bin\sdkmanager.bat cmake;3.10.2.4988404'
build_script:
- gradlew.bat assemble
test_script:
- gradlew.bat check --info
after_test:
- ps: |
$url = "https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)"
$files = Get-ChildItem '.\openjdk\build\test-results\test\TEST-*.xml'
ForEach ($file in $files) {
(New-Object 'System.Net.WebClient').UploadFile($url, (Resolve-Path $file))
}
artifacts:
- path: openjdk\build\reports\
name: Test reports
- path: openjdk\build\libs\*.jar
name: OpenJDK binaries
- path: android\build\outputs\aar\*.aar
name: Android binaries
cache:
- "%USERPROFILE%\\.m2"
- "%USERPROFILE%\\.gradle"
- C:\ProgramData\chocolatey\bin
- C:\ProgramData\chocolatey\lib
# Debug
#on_finish:
# - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))