/
appveyor.yml
152 lines (121 loc) · 4.92 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
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
#---------------------------------#
# general configuration #
#---------------------------------#
# version format
version: 1.0.{build}-{branch}
# branches to build
branches:
# whitelist
only:
- dev
- master
# Including commits with particular message or from specific user
only_commits:
message: /build/ # Start a new build if message contains 'build'
author: marcsllite@gmail.com
#---------------------------------#
# environment configuration #
#---------------------------------#
# environment variables
environment:
# Linux Debugging
# APPVEYOR_SSH_KEY: ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDGx6AiZps++og4I04DyhDXp6ExBV68jkrGzqvWw9mqu03vHW4KIglXjiTm+WXb0wkpisiQCmnQLXYh6QgMzgA24QZ8PZS8KTzqqb/5xlAl4HoIu4yTXzi/cxfc0+WqjpSRRfC1GPD2OXsXvfufzl3RDKV6YeYaetVpYuc+OZpCsuDm01c6mKmwuzK0+QaaQKL3MLLwYdLNm0XIRatvXuEwiDl4IlEAwLMJqVCs/+JFxThSSt95VuLG2HrGdwQ4jCi2mK28Udw1u/ae5SPDSz1KhfoBZqv03kfAJmzjYZ9Ro4NMPQVCz26jYHYWHOKcP0CfQre6VaZBDF6CeM3sR2vcrb+oDmL+UYDHyVVMQlhuklU5CJhd9BQKqYonJPCWynVNVgN6vght8gTERRSL956ywSj/RKQNPISTf2zRTCfR0uK6AT33ZEQXDkJ0B8F0tIkz4V672KjJaQT6fDS/grOV4/SxaEKrKHauOcDAOHhLXDKRcpM2Ne1yAh7kiP7BgG0= marcsllite@marcsllte-linux
# APPVEYOR_SSH_BLOCK: true
# Mac Debugging
# APPVEYOR_VNC_BLOCK: true
MAVEN_VERSION: 3.6.3
WIN_JDK: C:\Program Files\Java\jdk11
GITHUB_TOKEN:
secure: SikYTKBlWZ9T6Ep9yw85sLN3+5ryqKyc8YzjTZgnK5adhMWMPvme0gMrLTgtG8ah
CODECOV_TOKEN:
secure: zQd1mZd+Bl9Ev/rUgtx5eozOVW79Hcpp2+a8U01ij4hESsUrYJIuK29ZPmlmS3ql
matrix:
- job_name: Windows build
appveyor_build_worker_image: Visual Studio 2019
- job_name: Mac build
appveyor_build_worker_image: macos-monterey
- job_name: Linux build
appveyor_build_worker_image: Ubuntu2004
stack: jdk 11
for:
# WINDOWS BUILD #
-
matrix:
only:
- job_name: Windows build
install:
- set JDK_HOME=%WIN_JDK%
# JAVA_HOME is used by Maven
- set JAVA_HOME=%WIN_JDK%
- set PATH=%JDK_HOME%;%JDK_HOME%\bin;%PATH%
build_script:
- cmd: mvn clean verify -e -X
test_script:
- ps: $wc = New-Object 'System.Net.WebClient';
foreach($file in get-childItem $env:APPVEYOR_BUILD_FOLDER/target/surefire-reports -include TEST-*.xml -name) { `
$wc.UploadFile("https://ci.appveyor.com/api/testresults/junit/$env:APPVEYOR_JOB_ID", (Resolve-Path .\target\surefire-reports\$file)); }
on_success:
- ps: Invoke-WebRequest -Uri https://uploader.codecov.io/latest/windows/codecov.exe -Outfile codecov.exe;
.\codecov.exe -t $CODECOV_TOKEN
cache:
- '%MAVEN_HOME% -> pom.xml'
- '%UserProfile%\.m2 -> pom.xml'
# MAC BUILD #
-
matrix:
only:
- job_name: Mac build
install:
- sh: export HOMEBREW_NO_INSTALL_CLEANUP=1 &&
export HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK=1
- sh: brew install mvnvm &&
mvn -d clean package
build_script:
# - sh: curl -sflL 'https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-vnc.sh' | bash -e -
- sh: mvn clean verify
test_script:
- sh: |
find "$APPVEYOR_BUILD_FOLDER/target/surefire-reports" -type f -name 'TEST-*.xml' -print0 | xargs -0 -I '{}' curl -F 'file=@{}' "https://ci.appveyor.com/api/testresults/junit/$APPVEYOR_JOB_ID"
on_success:
- sh: curl -Os https://uploader.codecov.io/latest/macos/codecov &&
chmod +x codecov &&
./codecov -t $CODECOV_TOKEN
cache:
- $HOME/.m2 -> pom.xml
# LINUX BUILD #
-
matrix:
only:
- job_name: Linux build
install:
- sh: sudo apt-get -y install libcanberra-gtk-module
- sh: wget https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.tar.gz -P /tmp &&
sudo tar xf /tmp/apache-maven-*.tar.gz -C /opt &&
sudo update-alternatives --install /usr/bin/mvn mvn /opt/apache-maven-3.6.3/bin/mvn 363
- sh: Xvfb :99 &>/dev/null &
export DISPLAY=:99
build_script:
# - sh: curl -sflL 'https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-ssh.sh' | bash -e -
- sh: mvn clean verify
test_script:
- sh: |
find "$APPVEYOR_BUILD_FOLDER/target/surefire-reports" -type f -name 'TEST-*.xml' -print0 | xargs -0 -I '{}' curl -F 'file=@{}' "https://ci.appveyor.com/api/testresults/junit/$APPVEYOR_JOB_ID"
on_success:
- sh: curl -Os https://uploader.codecov.io/latest/linux/codecov &&
chmod +x codecov &&
./codecov -t $CODECOV_TOKEN
cache:
- $HOME/.m2 -> pom.xml
#---------------------------------#
# deployment configuration #
#---------------------------------#
deploy: off
#---------------------------------#
# notifications #
#---------------------------------#
notifications:
# Email
- provider: Email
to:
- marcsllite@gmail.com
on_build_status_changed: true