forked from HaxeFoundation/haxe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
appveyor.yml
77 lines (69 loc) · 3.04 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
version: "{build}"
environment:
global:
HAXELIB_ROOT: C:/projects/haxelib
CYG_ROOT: C:/cygwin
ADD_REVISION: 1
OCAMLOPT: ocamlopt.opt
MYSQL_PATH: C:\Program Files\MySQL\MySQL Server 5.7
MYSQL_USER: root
MYSQL_PASSWORD: Password12!
matrix:
- TEST: "neko,python,cs,java,macro,php7"
- TEST: "cpp"
services:
- mysql
skip_tags: true
cache:
- opam32.tar.xz -> appveyor.yml
install:
- 'git submodule update --init --recursive'
- '%CYG_ROOT%/bin/bash -lc "echo initialize"'
# Install ocaml
- curl -fsS -o cygwin-setup.exe --retry 3 https://cygwin.com/setup-x86.exe
- 'cygwin-setup.exe -g -q -R "%CYG_ROOT%" -P make -P git -P mingw64-i686-zlib -P rsync -P patch -P diffutils -P curl -P unzip -P m4 -P perl -P mingw64-i686-gcc-core -P mingw64-i686-pcre'
- if not exist "opam32.tar.xz" (
curl -fsS -o opam32.tar.xz --retry 3 https://dl.dropboxusercontent.com/s/eo4igttab8ipyle/opam32.tar.xz
)
- 7z x "opam32.tar.xz" -so | 7z x -aoa -si -ttar
- '%CYG_ROOT%/bin/bash -lc "cd \"$OLDPWD\" && bash opam32/install.sh"'
- '%CYG_ROOT%/bin/bash -lc "opam init mingw \"https://github.com/fdopen/opam-repository-mingw.git\" --comp 4.02.3+mingw32c --switch 4.02.3+mingw32c --auto-setup --yes"'
- '%CYG_ROOT%/bin/bash -lc "opam install camlp4 --yes"'
# Install neko
- choco install neko --prerelease --ignore-dependencies -s 'https://ci.appveyor.com/nuget/neko' -y
- choco install php --ignore-dependencies
- echo extension=php_mysqli.dll >> C:\tools\php\php.ini
- echo extension=php_sqlite3.dll >> C:\tools\php\php.ini
- echo extension=php_openssl.dll >> C:\tools\php\php.ini
- RefreshEnv
- neko -version
# setup python
- cmd: mklink C:\Python34-x64\python3.exe C:\Python34-x64\python.exe
- set PATH=%PATH%;C:\Python34-x64
# expose the dll files
- set "PATH=%PATH%;%CYG_ROOT%/usr/i686-w64-mingw32/sys-root/mingw/bin"
build_script:
- 'cd %APPVEYOR_BUILD_FOLDER%'
- '%CYG_ROOT%/bin/bash -lc "cd \"$OLDPWD\" && make -s -f Makefile.win"'
- 'set PATH=%PATH%;%APPVEYOR_BUILD_FOLDER%'
- 'set HAXEPATH=%APPVEYOR_BUILD_FOLDER%'
- '%CYG_ROOT%/bin/bash -lc "cd \"$OLDPWD\" && make -s -f Makefile.win package_bin"'
- '%CYG_ROOT%/bin/bash -lc "cd \"$OLDPWD\" && make -s -f Makefile.win package_choco"'
- move out\haxe.*.nupkg .
- dir %APPVEYOR_BUILD_FOLDER%\out
- cd %APPVEYOR_BUILD_FOLDER%/tests/
- mkdir "%HAXELIB_ROOT%"
- haxelib setup "%HAXELIB_ROOT%"
# setup mysql for testing
- set PATH=%MYSQL_PATH%\bin;%PATH%
- mysql --user=%MYSQL_USER% --password=%MYSQL_PASSWORD% -e "create user 'travis'@'localhost';"
- mysql --user=%MYSQL_USER% --password=%MYSQL_PASSWORD% -e "create database haxe_test;"
- mysql --user=%MYSQL_USER% --password=%MYSQL_PASSWORD% -e "grant all on haxe_test.* to 'travis'@'localhost';"
test_script:
- cd %APPVEYOR_BUILD_FOLDER%/tests/
- haxe -version
- haxe RunCi.hxml
- neko RunCi.n
artifacts:
- path: 'out/*.zip'
- path: '*.nupkg'