-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.appveyor.yml
195 lines (152 loc) · 4.94 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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
version: '0.2.0-{build}'
skip_branch_with_pr: true
skip_tags: true
platform:
- x64
image:
- Ubuntu
- macOS
- Visual Studio 2019
stack:
- jdk 8
- jdk 11
- jdk 15
environment:
APPVEYOR_SAVE_CACHE_ON_ERROR: true
PUBLISH_TO_URL: 'file:published'
artifacts:
- path: 'published.zip'
type: zip
build_script:
- sh: 'export'
- sh: 'echo "JAVA_HOME=$JAVA_HOME"'
- cmd: 'echo "JAVA_HOME=%JAVA_HOME%"'
- 'java -version'
- 'sbt faker-plugins/Test/compile'
- 'sbt faker-plugins/IntegrationTest/compile'
- 'sbt +Test/compile'
test_script:
- 'sbt faker-plugins/Test/test'
- 'sbt faker-plugins/IntegrationTest/test'
- 'sbt +Test/test'
# https://appveyor.com/docs/packaging-artifacts/#packaging-multiple-files-in-different-locations-into-a-single-archive
after_test:
- 'sbt faker-plugins/publish'
- 'sbt +publish'
- sh: '7z a published.zip "$APPVEYOR_BUILD_FOLDER/published/*"'
- cmd: '7z a published.zip "%APPVEYOR_BUILD_FOLDER%\published\*"'
for:
- matrix:
only:
- image: macOS
stack: jdk 8
environment:
JAVA_VERSION: 1.8
install: &install-macos
- '/usr/libexec/java_home -V'
- 'export JAVA_HOME=$(/usr/libexec/java_home)'
- 'export PATH=$JAVA_HOME/bin:$PATH'
- 'brew install sbt'
# https://get-coursier.io/docs/cache
cache: &cache-macos
# - '$HOME/Library/Caches/Homebrew -> .appveyor.yml'
- '$HOME/Library/Caches/Coursier/v1 -> **/dependencies.sbt, project/*'
- '$HOME/.ivy2 -> **/dependencies.sbt, project/*'
- '$HOME/.sbt -> **/dependencies.sbt, project/*'
- matrix:
only:
- image: macOS
stack: jdk 11
environment:
JAVA_VERSION: 11
PUBLISH_TO_URL: 'file:published'
install: *install-macos
cache: *cache-macos
- matrix:
only:
- image: macOS
stack: jdk 15
environment:
JAVA_VERSION: 15
PUBLISH_TO_URL: 'file:published'
install: *install-macos
cache: *cache-macos
- matrix:
only:
- image: Ubuntu
stack: jdk 8
environment:
PUBLISH_TO_URL: 'file:published'
# https://scala-sbt.org/1.x/docs/Installing-sbt-on-Linux.html
install: &install-linux
- 'echo "deb https://repo.scala-sbt.org/scalasbt/debian all main" | sudo tee /etc/apt/sources.list.d/sbt.list'
- 'echo "deb https://repo.scala-sbt.org/scalasbt/debian /" | sudo tee /etc/apt/sources.list.d/sbt_old.list'
- 'curl -sL "https://keyserver.ubuntu.com/pks/lookup?op=get&search=0x2EE0EA64E40A89B84B2DF73499E82A75642AC823" | sudo apt-key add'
- 'sudo apt-get update'
- 'sudo apt-get install sbt'
# https://get-coursier.io/docs/cache
cache: &cache-linux
# - '/var/cache/apt/archives -> .appveyor.yml'
- '$HOME/.cache/coursier/v1 -> **/dependencies.sbt, project/*'
- '$HOME/.ivy2 -> **/dependencies.sbt, project/*'
- '$HOME/.sbt -> **/dependencies.sbt, project/*'
# https://appveyor.com/docs/deployment/amazon-s3/
deploy:
- provider: S3
access_key_id:
secure: z8mEVIKfSkpmq+WaQpy55p4MwJ4/cH7d2rEHbr+DVZQ=
secret_access_key:
secure: n6Vac0IBz5K1GYM5b9ZNR/cbtm+vznGhiIsB/hXXv96WyT2+00nIqX/61ZgBMw/m
bucket: artifacts.ahlers.consulting
# folder: $(APPVEYOR_PROJECT_SLUG)/$(APPVEYOR_BUILD_VERSION)
folder: /maven2
set_public: true
unzip: true
- matrix:
only:
- image: Ubuntu
environment:
PUBLISH_TO_URL: 'file:published'
install: *install-linux
cache: *cache-linux
- matrix:
only:
- image: Visual Studio 2019
stack: jdk 8
environment:
JAVA_VERSION: '1.8'
JAVA_HOME: 'C:\Program Files\Java\jdk1.8.0'
PUBLISH_TO_URL: 'file:published'
# https://scala-sbt.org/1.x/docs/Installing-sbt-on-Windows.html
install: &install-windows
- 'SET PATH=%JAVA_HOME%\bin;%PATH%'
- 'SET PATH=%PROGRAMFILES(X86)%\sbt\bin;%PATH%'
- 'choco install sbt'
# https://appveyor.com/docs/build-cache/
# https://docs.microsoft.com/en-us/windows/deployment/usmt/usmt-recognized-environment-variables
# https://get-coursier.io/docs/cache
cache: &cache-windows
# - '%ALLUSERSAPPDATA%\chocolatey\lib -> .appveyor.yml'
- '%LOCALAPPDATA%\Coursier\Cache\v1 -> **\dependencies.sbt, project\*'
- '%USERPROFILE%\.ivy2 -> **\dependencies.sbt, project\*'
- '%USERPROFILE%\.sbt -> **\dependencies.sbt, project\*'
- matrix:
only:
- image: Visual Studio 2019
stack: jdk 11
environment:
JAVA_VERSION: '11'
JAVA_HOME: 'C:\Program Files\Java\jdk11'
PUBLISH_TO_URL: 'file:published'
install: *install-windows
cache: *cache-windows
- matrix:
only:
- image: Visual Studio 2019
stack: jdk 15
environment:
JAVA_VERSION: '15'
JAVA_HOME: 'C:\Program Files\Java\jdk15'
PUBLISH_TO_URL: 'file:published'
install: *install-windows
cache: *cache-windows