-
Notifications
You must be signed in to change notification settings - Fork 121
/
appveyor.yml
55 lines (45 loc) · 2.14 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
# # version: "{branch} {build}"
image:
# Windows Server 2019
- Visual Studio 2019
environment:
appveyor_build_worker_cloud: gce
appveyor_rdp_password: Fx8eHPNesxhpmdru
matrix:
- JAVA_HOME: C:\Program Files\Java\jdk17
- JAVA_HOME: C:\Program Files\Java\jdk21
init:
- ps: iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
- ps: Start-Service MySQL80
install:
- set MINGW_HOME=C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64
- set PATH=%MINGW_HOME%\bin;C:\cygwin64\bin;C:\Program Files\MySql\MySQL Server 8.0\bin;%PATH%
# Fix bug for mkdir in AppVeyor
- del "C:\Program Files\Git\usr\bin\mkdir.exe"
# Fix path error for make
- copy "C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin\mingw32-make.exe" "C:\mingw-w64\x86_64-8.1.0-posix-seh-rt_v6-rev0\mingw64\bin\make.exe"
# Fix path error on JNI headers
- copy "C:\Program Files\Java\jdk17\include\win32\jni_md.h" "C:\Program Files\Java\jdk17\include\jni_md.h"
- copy "C:\Program Files\Java\jdk17\include\win32\jawt_md.h" "C:\Program Files\Java\jdk17\include\jawt_md.h"
- copy "C:\Program Files\Java\jdk21\include\win32\jni_md.h" "C:\Program Files\Java\jdk21\include\jni_md.h"
- copy "C:\Program Files\Java\jdk21\include\win32\jawt_md.h" "C:\Program Files\Java\jdk21\include\jawt_md.h"
# Setup test environment for Windows
- copy "judger\src\test\resources\voj-test-windows.properties" "judger\src\test\resources\voj-test.properties"
build: off
before_test:
- mysql -e "SET PASSWORD FOR 'root'@'localhost' = '';" --user=root --password=Password12!
- mysql -e "CREATE DATABASE test;" --user=root
- mysql -e "SET GLOBAL sql_mode=(SELECT REPLACE(@@sql_mode,'ONLY_FULL_GROUP_BY',''));" --user=root
- mysql test < voj.sql --user=root
test_script:
- mvn test -f web\pom.xml
- mvn test -f judger\pom.xml
after_test:
- mysql -e "DROP DATABASE test;" --user=root
on_finish:
- ps: $blockRdp = $false; iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/appveyor/ci/master/scripts/enable-rdp.ps1'))
matrix:
fast_finish: false
cache:
- C:\maven\
- C:\Users\appveyor\.m2