forked from oss-review-toolkit/ort
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.appveyor.yml
91 lines (83 loc) · 3.7 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
skip_branch_with_pr: true
environment:
HOME: $(HOMEDRIVE)$(HOMEPATH)
BOWER_VERSION: 1.8.8
COMPOSER_VERSION: 5.1.0
CONAN_VERSION: 1.18.0
FLUTTER_HOME: C:\flutter
FLUTTER_VERSION: v1.12.13+hotfix.9-stable
GO_DEP_VERSION: 0.5.0
NPM_VERSION: 6.14.1
PHP_VERSION: 7.4.3
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.22.4
cache:
- $(HOME)\.gradle\caches
- $(HOME)\.gradle\wrapper\dists -> gradle\wrapper\gradle-wrapper.properties
- $(HOME)\.ivy2
- $(HOME)\.ort\cache
clone_depth: 50
install:
- ps: |
$range = "$env:APPVEYOR_REPO_BRANCH..$env:APPVEYOR_PULL_REQUEST_HEAD_COMMIT"
if (-not (git diff --name-only --diff-filter=d $range | Where-Object { $_ -NotMatch "\.md$" })) {
Write-Host "Only Markdown files were modified, skipping CI run."
Exit-AppVeyorBuild
}
- 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.
- 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 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/jdk11>>"%HOME%\.gradle\gradle.properties"
- ps: |
$file = 'gradle\wrapper\gradle-wrapper.properties'
Get-Content $file | %{ $_ -replace '(^distributionUrl=)(.+)-all\.zip$', '$1$2-bin.zip' } | Set-Content "${file}.new"
Move-Item -Force "${file}.new" $file
- gradlew --stacktrace detekt
test_script:
- if "%APPVEYOR_SCHEDULED_BUILD%"=="True" (
gradlew --stacktrace -Dkotest.assertions.multi-line-diff=simple dokkaJar test funTest
) else (
gradlew --stacktrace -Dkotest.assertions.multi-line-diff=simple -Dkotest.tags.exclude=ExpensiveTag test funTest
)
after_test:
- gradlew --stop
on_finish:
- ps: |
$url = "https://ci.appveyor.com/api/testresults/junit/$env:APPVEYOR_JOB_ID"
$pattern = '**\build\test-results\flattened\TEST-*.xml'
foreach ($file in (Resolve-Path $pattern)) {
(New-Object 'System.Net.WebClient').UploadFile($url, $file)
}