Home | History | Annotate | Download | only in conscrypt
      1 environment:
      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/tools_r25.2.3-windows.zip"
      7   NINJA_URL: "https://github.com/ninja-build/ninja/releases/download/v1.6.0/ninja-win.zip"
      8   CMAKE_URL: "https://cmake.org/files/v3.4/cmake-3.4.0-win32-x86.zip"
      9   MSVC_HOME: "C:\\Program Files (x86)\\Microsoft Visual Studio\\2017\\Community"
     10 
     11 clone_folder: "C:\\projects\\conscrypt"
     12 shallow_clone: true
     13 
     14 os: Visual Studio 2017
     15 
     16 platform:
     17   # - x86
     18   - x64
     19 
     20 version: '{branch}.{build}'
     21 
     22 pull_requests:
     23     do_not_increment_build_number: true
     24 
     25 build:
     26     verbosity: minimal
     27 
     28 init:
     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 yasm
     46   - choco install -y --allow-empty-checksums yasm
     47 
     48   # Install Go for BoringSSL compile (embedding test data)
     49   - choco install -y --allow-empty-checksums golang
     50 
     51   # Clone BoringSSL
     52   - git clone --depth 1 https://boringssl.googlesource.com/boringssl.git "%BORINGSSL_HOME%"
     53 
     54   # Work around gradle bug https://github.com/gradle/gradle/issues/929
     55   - set PATH=C:\Program Files (x86)\Windows Kits\8.1\bin\x86;%PATH%
     56 
     57 before_build:
     58   # Build BoringSSL in 64-bit
     59   - call "%MSVC_HOME%\VC\Auxiliary\Build\vcvarsall.bat" x64
     60   - cd "%BORINGSSL_HOME%"
     61   - mkdir build64
     62   - cd build64
     63   - 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 ..
     64   - ninja
     65 
     66   # Build BoringSSL in 32-bit
     67   - call "%MSVC_HOME%\VC\Auxiliary\Build\vcvarsall.bat" x86
     68   - cd "%BORINGSSL_HOME%"
     69   - mkdir build32
     70   - cd build32
     71   - 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 ..
     72   - ninja
     73 
     74   # Go to project directory
     75   - cd C:\projects\conscrypt
     76 
     77 install:
     78   - mkdir %ANDROID_HOME%\licenses
     79   - ps: 'Add-Content -Value "`n8933bad161af4178b1185d1a37fbf41ea5269c55`n`nd56f5187479451eabf01fb78af6dfcb131a6481e" -Path $env:ANDROID_HOME\licenses\android-sdk-license -Encoding ASCII'
     80   - ps: 'Add-Content -Value "`n84831b9409646a918e30573bab4c9c91346d8abd`n504667f4c0de7af1a06de9f4b1727b84351f2910" -Path $env:ANDROID_HOME\licenses\android-sdk-preview-license -Encoding ASCII'
     81   - ps: 'Add-Content -Value "`nd975f751698a77b662f1254ddbeed3901e976f5a" -Path $env:ANDROID_HOME\licenses\intel-android-extra-license -Encoding ASCII'
     82   - '%ANDROID_HOME%\tools\bin\sdkmanager.bat tools'
     83   - '%ANDROID_HOME%\tools\bin\sdkmanager.bat platform-tools'
     84   - '%ANDROID_HOME%\tools\bin\sdkmanager.bat build-tools;25.0.0'
     85   - '%ANDROID_HOME%\tools\bin\sdkmanager.bat platforms;android-25'
     86   - '%ANDROID_HOME%\tools\bin\sdkmanager.bat extras;android;m2repository'
     87   - '%ANDROID_HOME%\tools\bin\sdkmanager.bat --channel=1 ndk-bundle'
     88   - '%ANDROID_HOME%\tools\bin\sdkmanager.bat cmake;3.6.4111459'
     89 
     90 build_script:
     91   - gradlew.bat assemble
     92 
     93 test_script:
     94   - gradlew.bat check
     95 
     96 after_test:
     97   - ps: |
     98       $url = "https://ci.appveyor.com/api/testresults/junit/$($env:APPVEYOR_JOB_ID)"
     99       $files = Get-ChildItem '.\openjdk\build\test-results\windows_x86_64Test\TEST-*.xml'
    100       ForEach ($file in $files) {
    101           (New-Object 'System.Net.WebClient').UploadFile($url, (Resolve-Path $file))
    102       }
    103 
    104 artifacts:
    105   - path: openjdk\build\reports\
    106     name: Test reports
    107   - path: openjdk\build\libs\*.jar
    108     name: OpenJDK binaries
    109   - path: android\build\outputs\aar\*.aar
    110     name: Android binaries
    111 
    112 cache:
    113   - "%USERPROFILE%\\.m2"
    114   - "%USERPROFILE%\\.gradle"
    115   - C:\ProgramData\chocolatey\bin
    116   - C:\ProgramData\chocolatey\lib
    117 
    118 # Debug
    119 #on_finish:
    120 #  - ps: $blockRdp = $true; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
    121