• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1environment:
2  ANDROID_HOME: "C:\\android-sdk-windows"
3  ANDROID_NDK_HOME: "C:\\android-sdk-windows\\ndk-bundle"
4  JAVA_HOME: "C:\\Program Files\\Java\\jdk1.8.0"
5  BORINGSSL_HOME: "C:\\boringssl"
6  ANDROID_TOOLS_URL: "https://dl.google.com/android/repository/sdk-tools-windows-4333796.zip"
7  NINJA_URL: "https://github.com/ninja-build/ninja/releases/download/v1.8.2/ninja-win.zip"
8  CMAKE_URL: "https://cmake.org/files/v3.11/cmake-3.11.1-win32-x86.zip"
9  MSVC_HOME: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community"
10
11clone_folder: "C:\\projects\\conscrypt"
12shallow_clone: true
13
14os: Visual Studio 2017
15
16platform:
17  # - x86
18  - x64
19
20version: '{branch}.{build}'
21
22pull_requests:
23    do_not_increment_build_number: true
24
25build:
26    verbosity: minimal
27
28init:
29  # Download the Android SDK
30  - appveyor DownloadFile %ANDROID_TOOLS_URL% -FileName android-tools.zip
31  - 7z x android-tools.zip -o"%ANDROID_HOME%" > nul
32
33  # Get Ninja
34  - appveyor DownloadFile %NINJA_URL% -FileName ninja.zip
35  - 7z x ninja.zip -oC:\ninja > nul
36  - set PATH=C:\ninja;%PATH%
37  - ninja --version
38
39  # Get CMake
40  - appveyor DownloadFile %CMAKE_URL% -FileName cmake.zip
41  - 7z x cmake.zip -oC:\cmake > nul
42  - set PATH=C:\cmake\bin;%PATH%
43  - cmake --version
44
45  # Install NASM
46  - choco install -y --allow-empty-checksums nasm
47
48  # Clone BoringSSL
49  - git clone --depth 1 https://boringssl.googlesource.com/boringssl.git "%BORINGSSL_HOME%"
50
51  # Work around gradle bug https://github.com/gradle/gradle/issues/929
52  - set PATH=C:\Program Files (x86)\Windows Kits\8.1\bin\x86;%PATH%
53
54before_build:
55  # Build BoringSSL in 64-bit
56  - call "%MSVC_HOME%\VC\Auxiliary\Build\vcvarsall.bat" x64
57  - cd "%BORINGSSL_HOME%"
58  - mkdir build64
59  - cd build64
60  - 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 ..
61  - ninja
62
63  # Build BoringSSL in 32-bit
64  - call "%MSVC_HOME%\VC\Auxiliary\Build\vcvarsall.bat" x86
65  - cd "%BORINGSSL_HOME%"
66  - mkdir build32
67  - cd build32
68  - 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 ..
69  - ninja
70
71  # Go to project directory
72  - cd C:\projects\conscrypt
73
74install:
75  - yes 2> nul | "%ANDROID_HOME%\tools\bin\sdkmanager.bat" --licenses
76  - '%ANDROID_HOME%\tools\bin\sdkmanager.bat tools'
77  - '%ANDROID_HOME%\tools\bin\sdkmanager.bat platform-tools'
78  - '%ANDROID_HOME%\tools\bin\sdkmanager.bat build-tools;27.0.3'
79  - '%ANDROID_HOME%\tools\bin\sdkmanager.bat platforms;android-26'
80  - '%ANDROID_HOME%\tools\bin\sdkmanager.bat extras;android;m2repository'
81  - '%ANDROID_HOME%\tools\bin\sdkmanager.bat ndk-bundle'
82  - '%ANDROID_HOME%\tools\bin\sdkmanager.bat cmake;3.6.4111459'
83
84build_script:
85  - gradlew.bat assemble
86
87test_script:
88  - gradlew.bat check --info
89
90after_test:
91  - ps: |
92      $url = "https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)"
93      $files = Get-ChildItem '.\openjdk\build\test-results\windows_x86_64Test\TEST-*.xml'
94      ForEach ($file in $files) {
95          (New-Object 'System.Net.WebClient').UploadFile($url, (Resolve-Path $file))
96      }
97
98artifacts:
99  - path: openjdk\build\reports\
100    name: Test reports
101  - path: openjdk\build\libs\*.jar
102    name: OpenJDK binaries
103  - path: android\build\outputs\aar\*.aar
104    name: Android binaries
105
106cache:
107  - "%USERPROFILE%\\.m2"
108  - "%USERPROFILE%\\.gradle"
109  - C:\ProgramData\chocolatey\bin
110  - C:\ProgramData\chocolatey\lib
111
112# Debug
113#on_finish:
114#  - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
115