forked from google/conscrypt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
121 lines (97 loc) · 4.01 KB
/
appveyor.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
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/tools_r25.2.3-windows.zip"
NINJA_URL: "https://github.com/ninja-build/ninja/releases/download/v1.6.0/ninja-win.zip"
CMAKE_URL: "https://cmake.org/files/v3.4/cmake-3.4.0-win32-x86.zip"
MSVC: "14.0"
clone_folder: "C:\\projects\\conscrypt"
shallow_clone: true
os: Visual Studio 2015
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 yasm
- choco install -y yasm
# 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:
# Set up Visual Studio in 64-bit mode
- call "C:\Program Files (x86)\Microsoft Visual Studio %MSVC%\VC\vcvarsall.bat" x64
# Build BoringSSL in 64-bit
- cd "%BORINGSSL_HOME%"
- mkdir build64
- cd build64
- cmake -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS_RELEASE=/MT -DCMAKE_CXX_FLAGS_RELEASE=/MT -GNinja ..
- ninja
# Set up Visual Studio in 32-bit mode
- call "C:\Program Files (x86)\Microsoft Visual Studio %MSVC%\VC\vcvarsall.bat"
# TODO(nathanmittler): Need to figure out how to make 32-bit builds work
# Build BoringSSL in 32-bit
# - cd "%BORINGSSL_HOME%"
# - mkdir build32
# - cd build32
# - cmake -DCMAKE_POSITION_INDEPENDENT_CODE=TRUE -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_FLAGS_RELEASE=/MT -DCMAKE_CXX_FLAGS_RELEASE=/MT -GNinja ..
# - ninja
# Go to project directory
- cd C:\projects\conscrypt
install:
- mkdir %ANDROID_HOME%\licenses
- ps: 'Add-Content -Value "`n8933bad161af4178b1185d1a37fbf41ea5269c55" -Path $env:ANDROID_HOME\licenses\android-sdk-license -Encoding ASCII'
- ps: 'Add-Content -Value "`n84831b9409646a918e30573bab4c9c91346d8abd`n504667f4c0de7af1a06de9f4b1727b84351f2910" -Path $env:ANDROID_HOME\licenses\android-sdk-preview-license -Encoding ASCII'
- '%ANDROID_HOME%\tools\bin\sdkmanager.bat tools'
- '%ANDROID_HOME%\tools\bin\sdkmanager.bat platform-tools'
- '%ANDROID_HOME%\tools\bin\sdkmanager.bat build-tools;25.0.0'
- '%ANDROID_HOME%\tools\bin\sdkmanager.bat platforms;android-25'
- '%ANDROID_HOME%\tools\bin\sdkmanager.bat extras;android;m2repository'
- '%ANDROID_HOME%\tools\bin\sdkmanager.bat --channel=1 ndk-bundle'
- '%ANDROID_HOME%\tools\bin\sdkmanager.bat cmake;3.6.3155560'
build_script:
- gradlew.bat assemble
test_script:
- gradlew.bat check
after_test:
- ps: |
$url = "https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)"
$files = Get-ChildItem '.\openjdk\build\test-results\windows_x86_64Test\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'))