forked from oss-review-toolkit/ort
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.appveyor.yml
98 lines (91 loc) · 3.93 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
skip_branch_with_pr: true
environment:
HOME: $(HOMEDRIVE)$(HOMEPATH)
ANDROID_HOME: C:\android-sdk
ANDROID_SDK_VERSION: 3859397
BOWER_VERSION: 1.8.8
COMPOSER_VERSION: 4.8.0
CONAN_VERSION: 1.18.0
FLUTTER_HOME: C:\flutter
FLUTTER_VERSION: v1.7.8+hotfix.3-stable
GO_DEP_VERSION: 0.5.0
NPM_VERSION: 6.13.0
PHP_VERSION: 7.2.0
PYTHON_PIPENV_VERSION: 2018.11.26
RUST_VERSION: 1.35.0
SBT_VERSION: 1.0.2
STACK_VERSION: 2.1.3.20190715
VIRTUAL_ENV_VERSION: 15.1.0
YARN_VERSION: 1.21.1
cache:
- $(HOME)\.gradle\caches\build-cache-1
- $(HOME)\.gradle\caches\jars-1
- $(HOME)\.gradle\caches\jars-2
- $(HOME)\.gradle\caches\jars-3
- $(HOME)\.gradle\caches\modules-2
- $(HOME)\.gradle\caches\transforms-1
- $(HOME)\.ivy2
- $(HOME)\.m2\repository
- $(HOME)\.ort\analyzer\cache\http
- $(HOME)\.ort\analyzer\cache\remote_artifacts
- $(HOME)\.ort\downloader\cache\http
- $(HOME)\.ort\scanner\cache\http
clone_depth: 50
install:
- git submodule update --init --recursive
- npm install -g npm@%NPM_VERSION%
- npm install -g bower@%BOWER_VERSION% yarn@%YARN_VERSION%
- pip install virtualenv==%VIRTUAL_ENV_VERSION%
- pip install conan==%CONAN_VERSION%
- conan user # Create the conan data directory. Automatic detection of your arch, compiler, etc.
- cinst haskell-stack --version %STACK_VERSION% -y
- cinst rust --version %RUST_VERSION% -y
- cinst sbt --version %SBT_VERSION% -y
- cinst php --version %PHP_VERSION% -y
- cinst composer --version %COMPOSER_VERSION% -y # The version refers to the installer, not to Composer.
- cd c:\tools\php72 # For some reason pushd / popd does not work.
- copy php.ini-production php.ini
- echo extension_dir=ext>>php.ini
- echo extension=php_mbstring.dll>>php.ini
- echo extension=php_openssl.dll>>php.ini
- cd %APPVEYOR_BUILD_FOLDER%
- cinst dep --version %GO_DEP_VERSION% -y
- refreshenv
- C:\msys64\usr\bin\bash -lc "pacman --noconfirm -Sy cvs"
- set PATH=%PATH%;C:\msys64\usr\bin # For CVS.
- set PATH=C:\Ruby25\bin;%PATH% # For licensee.
# Install git-repo.
- ps: Start-FileDownload 'https://storage.googleapis.com/git-repo-downloads/repo' -FileName "$env:PROGRAMFILES\Git\usr\bin\repo"
# Install the Android SDK.
- ps: Start-FileDownload "https://dl.google.com/android/repository/sdk-tools-windows-$env:ANDROID_SDK_VERSION.zip"
- 7z x sdk-tools-windows-%ANDROID_SDK_VERSION%.zip -o%ANDROID_HOME% > nul
- yes | %ANDROID_HOME%\tools\bin\sdkmanager.bat platform-tools
# Install Flutter.
- ps: Start-FileDownload "https://storage.googleapis.com/flutter_infra/releases/stable/windows/flutter_windows_$env:FLUTTER_VERSION.zip"
- 7z x flutter_windows_%FLUTTER_VERSION%.zip -oC:\ > nul
- set "PATH=%FLUTTER_HOME%\bin;%FLUTTER_HOME%\bin\cache\dart-sdk\bin;%PATH%"
- flutter config --no-analytics
- flutter doctor
- pip install pipenv==%PYTHON_PIPENV_VERSION%
# Work around an issue with GPG failing to connect to its agent in GitRepoTest
# as seen at https://ci.appveyor.com/project/heremaps/oss-review-toolkit/builds/30228453#L3030.
- mv C:\msys64\usr\bin\gpg.exe C:\msys64\usr\bin\gpg.exe.orig
- mv "C:\Program Files\Git\usr\bin\gpg.exe" "C:\Program Files\Git\usr\bin\gpg.exe.orig"
# Do something useful here to override the default MSBuild (which would fail otherwise).
build_script:
- if not exist %HOME%\.gradle mkdir %HOME%\.gradle
- echo org.gradle.java.home=C:/Program Files/Java/jdk9>>%HOME%\.gradle\gradle.properties
- gradlew --stacktrace checkCopyright detekt
test_script:
- if "%APPVEYOR_SCHEDULED_BUILD%"=="True" (
gradlew --stacktrace dokkaJar test funTest
) else (
gradlew --stacktrace -Dkotlintest.tags.exclude=ExpensiveTag test funTest
)
on_finish:
- ps: |
$url = "https://ci.appveyor.com/api/testresults/junit/$env:APPVEYOR_JOB_ID"
$pattern = '**\build\test-results\**\TEST-*.xml'
foreach ($file in (Resolve-Path $pattern)) {
(New-Object 'System.Net.WebClient').UploadFile($url, $file)
}