forked from google/conscrypt
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
114 lines (92 loc) · 3.77 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
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'))