Skip to content

Commit

Permalink
4.0.0-preview.1 (#6575)
Browse files Browse the repository at this point in the history
* Actually disable the tests

* [java/cs] Make sure that cast new NativeArray uses the right type parameters

Closes #5751

* Fix test

* [cs] Only generate casts on NativeArray if the type parameters are not the same

Fixes fast_cast define

* Fix #6375 (#6376)

* also check tempvar'd this field access when typing getter/setter (closes #6375)

* add test

* [java/cs] Make sure to collect the right type parameters on anonymous functions

Closes #5793

* [neko] fix Sys.programPath() in nekotools booted exe (close #5708)

* don't remove enumIndex optimizations because EnumFlags is super important

* [TravisCI] fix boolean logic for neko installation

* [TravisCI] Fix neko installation on OSX

* Treat object array sets as having gc references

* [appveyor] merge php tests with the others

* [php7] fix haxe.io.Input.readAll() with disabled analyzer optimizations (closes #6387)

* changelog

* [php7] fix accessing static methods of String class stored into a variable (#4667)

* [php7] replace `Syntax.binop(.=)` with more analyzer-friendly `= Syntax.binop(.)`

* fixed stacks not being correctly reset in case of not unify detection (close #6235)

* add native mysqli error message when throwing an exception (#6390)

* use one-based error format, add -D old-error-format to keep zero-based behavior (#6391)

* [lua] old string metatable index is a function, not a table. fixes #6377

* [lua] previous string __index can be a table or a function

* fix position tests (see #6391)

* fix import.hx diagnostics condition (closes #6382)

* deal with EDisplay in assignment patterns (closes #6381)

* small toplevel collector cleanup (is going to help with #6341)

* filter duplicate toplevel identifiers (closes #6341)

* [eval] catch Failure on all Process calls (closes #6333)

* [eval] implement missing Date.fromString formats (closes #6323)

* print usage to stdout instead of stderr (closes #6363)

* [make] try to fix build directory dependency problem

* [lexer] count braces in code strings (closes #6369)

* [dce] keep everything if a class extends an extern (closes #6168)

* [display] delay metadata check behind field typing (closes #6162)

* fix test

* [matcher] fix assignment pattern display differently (closes #6395)

* fix json range column positions (back to zero-based after nicolas change)

gotta look into eval position stuff and check there too

* [java] Initial support for treating Null<BasicType> as their actual Java counterparts

* [java] java.lang.Long is also a boxed type

* [java] Properly rewrite basic type parameters as their boxed counterparts

Closes #784
Related #3728

* [java/cs] Add test

Closes #2688

* [cs] Automatically set nativegen to structs, and enforce that they cannot be subclassed, nor contain a constructor with no arguments

Closes #5399

* [java/cs] Make sure to reset old values when resizing a map

Closes #5862

* [java/cs] Avoid boxing with Runtime.compare expressions on dynamic field access

Closes #4047

* [java/cs] Avoid boxing when comparing Null<> basic types

Closes #4048

* [cs] Add C# optional arguments on Haxe-defined functions that have optional arguments

Closes #4147

* [java/cs] Prepare the code for the abstract null type PR

* [java/cs] Cast field field accesses to type parameters to their implementation instead of going through reflection

Closes #3790

* [cpp] No FastIterator for cppia

* [TravisCI] fix "Please check that the PPA name or format is correct."

* add test (closes #6215)

* [hl] disable failing test

* [java] disable failing test

* [parser] don't make reification call positions span the entire expression (closes #6396)

* Revert "[cs] Add C# optional arguments on Haxe-defined functions that have optional arguments"

This reverts commit 261e73c.

* don't use global status var for newly created anon types (closes #6400)

* [lua] fix lazy function type handling for anon method binding (#6368)

* Make _build source directory on demand

* [Makefile] always generate version.ml

such that the version info is always up-to-date

* ignore haxelib run.n changes

* [macro] add haxe.macro.Expr.TypeDefinition.doc field and support printing it with haxe.macro.Printer (#6401)

* Change Null<T> to an abstract (#6380)

* use abstract instead of typedef for Null<T>

* make Null<T> a @:coreType (broken on C#/Java)

* fix infinite recursion

* fix flash

* fix overloads

* Do not dce fields which override extern fields (discussion in 23f94bf) (#6168)

* [eval] fix inconsistent error formatting (#6410)

see vshaxe/vshaxe#138

* [cs/java] add an expr filter that optimizes Type.createEmptyInstace when the type is known

this helps avoid redundant casting overhead on c# when type parameters are involved (e.g. `(Type.createInstance(C) : C<Int>)` becomes `new C<int>(EMPTY)`

* Changed is_extern_field to is_physical_field (#6404)

* changed is_extern_field to is_physical_field

* fix is_extern_field->is_physical_field change in genlua

* [js] reserve flattened paths for variable renaming (closes #6409)

* [inliner] only unify_min if we go from no-type to some type (closes #6406)

* [display] don't show Module.platform.hx in import completion (closes #6408)

* [java] disable failing test

* fix comments in php7.Syntax

* [macro] flush pass in typing-timer

Also make `cast_of_unify` go through typing-timer. Closes #6402

* [parser] fix binop position spanning (closes #6399)

* [display] respect `@:noCompletion` for toplevel (closes #6407)

* Use Meta.Pos instead of Meta.Custom ":pos" (#6419)

That way, it shows up in --help-metas.

* [parser] fix more positions (closes #6416) (closes #6417)

* [display] don't show non-static abstract fields via using (closes #6421)

* [typer] disallow accessing non-static abstract field statically (closes #5940)

* [display] do not generate property accessor calls if we are displaying the property (closes #6422)

* TIdent (#6424)

* add TIdent

* remove Meta.Unbound and break everything

* first replacement batch

* fix neko/hl

* fix java/cs

* fix cpp/php and maybe lua

* fix cppia and maybe fix lua (again)

* remove unused NoPatternMatching define

* support specifying platforms for defines (so they are mentioned in --help-defines)

* [dce] don't add @:directlyUsed to a class if it's used from within its methods (fixes #6425)

* add some platform tags to define info

* [gencommon] remove unused fix_tparam_access argument

* [lua] introduce @:luaDotMethod for using dot-style invocation on appropriate extern instances

* [cpp] Split CppGlobal to allow untyped identifiers as externs. Type the __trace function more strongly

* [cpp] Do not use GC memory for const enums

* support argument names in function type (closes #4799) (#6428)

* [lua] fix inconsistent function assignment (#6426)

* Revert "support argument names in function type (closes #4799) (#6428)"

This reverts commit b225e9f.

* [php7] implemented Lib.mail()

* [php7] php.Lib.rethrow()

* [php7] Global.require(), Global.include()

* [php7] implemented php.Lib.loadLib()

* [php7] implemented php.Lib.getClasses() (closes #6384)

* [lua] generate prototypes with plain field access, rather than through _hx_a(...)

* [lua] drop unused param

* [lua] ocp-indent

* [cpp] Use stack allocations to get class vtables

* [cpp] No need to mark class statics if there are none

* [cpp] Fix hasMarkFunc condition

* [lua] fix multireturn return type

* [TravisCI] move osx_image to matrix

* [eval] catch a Break (closes #6443)

* [eval] support extending special classes (closes #6446)

* [display] check field display on extern function fields (closes #6442)

* [typer] don't lose return expressions even if they error (closes #6445)

* fix test

* make -D old-error-format deal with display completion being sent in bytes instead of chars

* [js] apply var escaping rules to function arguments as well (fixes #6449)

* [TravisCI] use brew bundle to install brew formulae

It avoids getting "xxx already installed" error.

* [lua] use _hx_string_wrapper helper function instead of modifying string prototype

* [lua] wrap string operations so that metatable changes are not necessary

* (HL) Fixed non-blocking SSL Socket connect (#6452)

* added getThis() in jquery event, allow to easily get real this in a callback

* [lua] faster std Math min/max (#6455)

ternary expressions seem to be faster when not part of an inline

* Add jit option to cppia host

* Add alias 'Single' for cpp.Float32.  Closes HaxeFoundation/hxcpp#555

* Check for null object in Reflect.callMethod.  Closes HaxeFoundation/hxcpp#593

* [js] consider @:native type names when collecting reserved names for local vars (see #6448)

* [js] support unqualified static field access for @:native("") classes (see #6448)

* [js] consider statics of @:native("") classes when renaming local vars (closes #6448)

* Disable extra cppia test until I can debug

* oops, add #if

* [hl] fixed Type.getClass with interface/virtual input

* [js] Add compiler switch to generate enums as objects instead of arrays (#6350)

* add -D js_enums_as_objects switch

* add $hxEnums, change __enum__ to String

* whitespace

* resolve genjs.ml conflict

* add -D js-enums-as-objects to tests

* [lua] fix/simplify Rex extern

* [lua] one more Rex tweak

* fix haxe.web.Dispatch

* [cpp] Remove some scalar casts when not requires, and add some to reduce warnings.  Closes HaxeFoundation/hxcpp#485

* [jQuery] regenerate extern with added Event.getThis()

andyli/jQueryExternForHaxe@4a6e3d5

* [TravisCI] install a patched ptmap for Mac builds

* [TravisCI] use the hererocks in python3 in mac builds

* use abstract field resolution instead of "implements Dynamic" for haxe.xml.Fast

this actually makes more lightweight due to less fields/allocations

* move haxe.web.Dispatch to hx3compat

* move magic types support code into their own module

* [java/cs] Fix IntMap implementation when setting 0 keys

Reviewed the whole Map implementations, added a few more comments
Closes #6457

* Disable toString test on C++

* [java] Add `no_map_cache` checks on WeakMap, and reimplement its iterators as classes

* Do not deploy binaries if we're running a PR

This only happened on PRs that were made by HF members, but still
we certainly don't want to submit them as nightlies

* [swf] rewrite safe-casts to if in non-retval mode

This is stupid. But it fixes #6482.

* [inliner] object declarations are _not_ constants

closes #6480

* disable failing test (see #6482)

* [eval] fix FileSystem path patching (closes #6481)

* [js] output file:line for traces (closes #6467)

* update submodule

* Add copy() to DynamicAccess (#5863)

* [xml] mention haxe.rtti.XmlParser (closes #6451)

* [display] allow dots in paths (closes #6435)

* [display] don't show private types in toplevel display (closes #6434)

* remove unused MSub module kind

* [matcher] print deprecation messages for enum (fields) (closes #6485)

* [parser] patch EField positions in reification (closes #6423)

* fix gadt pattern matching bug, closes #6413

* add interface tests

* [display] show constructor signatures on `new` (closes #6275)

* more local #if java for TestInterface

* make `in` a Binop and remove `EIn` (closes #6224) (#6471)

* make `in` a Binop and remove `EIn` (closes #6224)

* use make_binop

* fix enumIndex in tests

* change OpIn precedence to be lessthan OpAssign(Op)

* [js] fix tracing (closes #6492)

* minor

* Update JsonParser.hx (#6493)

haxe.format.JsonParser.parse("{\"\"\"A\":\"B\"}") -- any strings (empty string for sample), that are not separated by commas.

* add test for #6493

* [js] some doc on Symbol, add ofObject utility method and the standard `iterator` static field.

* supposedly fix #6491

* temp fix for #6467

* [js] setup proper keyword list based on selected ES version

* use rev_file_hash instead of rev_hash_s for eval position reporting so that it reports original file instead of unique_full_path

this also fixes positions multibyte utf8 files because original files are stored in lexer cache

* haxe now uses 1-based columns, so no need to +1 that in the eval debugger

* Split the Json parse test from the lambda arrow test until it is fixed.  Add shorcut for cpp on linux

* Add some additional cppia tests

* [make] don't add -native to ocamldep in bytecode mode

* casually walking into Mordor

* more comments

* more comment

* [lua] fix various coroutine-related signatures

* [lua] if dynamic is not table, return empty array for Reflect.fields

* [lua] Table helper methods

* [lua] do not generate function wrapping for explicit nulls (#6484)

* Make cppia use new ast by default.

* Update the docs for @:expose (#6515)

It works for Lua as well, and for both classes and fields.

* Fix duplicated platform in @:phpGlobal docs (#6518)

* [lua] fix Compiler.includeFile() with position = Inline

`haxe.macro.Compiler.includeFile("test.lua", "inline");` made `__js__` appear in the Lua output, leading to a rather funny error:

>attempt to call global '__js__' (a nil value)

* more comments for handle_efield

* remove weird loop from handle_efields. tests still pass, let's see what travis has to say.

* revert 36ea42d. this actually does something for untyped...

* more comments for handle_efield, also move the [] case to the bottom of the match for easier reading

* more comments

* add comment about the weird loop now when I get it :)

* more comments, also move the inner `loop` function closer to its usage

* add a couple more comments to handle_efield, remove unused argument from check_module (as it uses sname)

* add common decl_flag type for parsing common type flags instead of returning tuples of class+enum flag and then mapping it awkwardly

* Update @:selfCall docs to include Lua (#6523)

* Add a VSCode settings.json (#6524)

It's common practice to commit .vscode settings (eventually, it might be good to have a tasks.json and a launch.json too).

The first two are necessary to work with the vscode-ocaml extension. The files.exclude pattern prevents always ending up in _build files instead of the actual source files by accident (for instance via Ctrl+P, which used to show both).
Note that F1 -> Clear Editor History might be necessary for Ctrl+P not to show _build files anymore since it shows recently opened files regardless of the files.exclude setting.

[skip ci]

* Remove spaces around "in" in printBinop (#6527)

* [lua] properly escape reserved keywords when used as prototype declarations (#6528)

* [lua] convert all abort directives to error, in order to emit normalized line number/column info (#6519)

* [lua] change "failwith" to "error" for consistent error reporting

* [lua] speed up some array methods

* Revert "[lua] speed up some array methods"

This reverts commit f11ed3c.

* fix OpIn precedence: it's actually the lowest one. closes #6531

* Date.fromTime expects milliseconds (#6530)

* [matcher] support `@:forward` (closes #6532)

* Update MainLoop.hx (doc) (#6537)

Typo on call event's doc

* fixed generic getFloat to use FPHelper

* [eval] push block scope even for single-element blocks (see #6543)

* [eval] add constructor for haxe.io.Bytes (see #6543)

* [eval] print position for field index errors (#6543)

* [eval] support setting Bytes.length (see #6543)

* [matcher] don't leak `_` extractor variable (closes #6542)

* [js] create directory on setCustomJSGenerator (closes #6539)

* more binary support for js : use dataview for FPHelper, added dataview based BytesBuffer

* [lua] spacing nit

* [lua] do a better job marking haxe modules and classes as local

* [lua] speed up array methods (take 2)

* [TravisCI] ptmap 2.0.2 is compatible with ocaml 4.05

* [lua] fix unshift for empty array

* [lua] fix jit detection in tests

* [lua] de-inline a lengthy filesystem method

* [lua] fix unshift again

* [lua] fix array.shift for lua 5.3

* [lua] revert back to old array.unshift behavior

* [lua] use lua alias instead of luajit on hererocks installation

* [doc] fix Sys.getChar documentation (closes #6139)

* [lua] small std tweaks

* [js] initially grow BytesBuffer

* [inliner] deal with Dynamic returns (closes #6555)

* [matcher] don't let extractors access bindings (closes #6550)

* [matcher] fix extractor pattern offsets (closes #6548)

* [php7] do not throw on Reflect.getProperty(o, field) if field does not exist (fixes #6659, fixes 6554)

* unit test for #6559

* [cpp] Respect no_debug define

* [matcher] don't forget switch type when optimizing single-case matches (closes #6561)

* [tests] dodge C# issue (see #6561)

* unit test for #6502 (closes #6502)

* fixed some specific cases with empty buffer

* changed underlying TLazy implementation + make it a bit more abstract (allow to know if it's already processed or not)

* bugfix

* - error when accessing type currently being typed in macro
- don't assume not-method fields are not lazy typed
- flush core context (enter in PTypeExpr mode) when accessing a TLazy or calling field.expr()

close #683
close #5456

* I should have wait indeed

* fixed warning

* [TravisCI] install hererocks with --user

* force classes to be build after returning from a build call (same as we do when we load a type) close #6505

* partially revert fix for #6505

* better fix for #6505, do not flush if we are in module build (causes assert in typeload)

* don't consider hidden timers for timer alignment

* [eval] fix debug setVariable

* [inliner] don't mess up non-terminal try/catch (closes #6562)

* CHANGES.txt

* merge waneck-changes from nightly-travis branch
  • Loading branch information
Simn authored Sep 12, 2017
1 parent 890f8c7 commit ee42cde
Show file tree
Hide file tree
Showing 664 changed files with 42,356 additions and 26,669 deletions.
5 changes: 3 additions & 2 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Auto detect text files and perform LF normalization
* text=auto

.gitattributes export-ignore
.gitattributes export-ignore
.gitignore export-ignore
.travis.yml export-ignore
appveyor.yml export-ignore
appveyor.yml export-ignore
*.sh eol=lf
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*.exe
.*.swp
/out
/installer

/extra/hxclasses
/extra/*.swf
Expand Down Expand Up @@ -68,6 +69,7 @@ build.bat
/.vscode
tests/unit/compile.php.hxml
/extra/*.xml
!/extra/build-haxesetup.xml
tests/optimization/testopt.js
tests/misc/pythonImport/native_python/__pycache__
tests/unit/unit.py
Expand All @@ -77,6 +79,7 @@ tests/sys/bin/
/tests/sys/dump/
tests/optimization/dump/
tests/misc/projects/*/*.n
tests/misc/*/*/*.lua
tests/unit/bin/
tests/*.n
tests/misc/projects/Issue3756/cpp/
Expand All @@ -94,3 +97,15 @@ tests/misc/projects/Issue4070/cpp/

/tests/sys/temp
*.dll
_build/
Makefile.dependencies
Makefile.modules

/tests/unit/compiler_loops/All.n

/tests/unit/compiler_loops/log.txt
tests/benchs/mandelbrot/bin/
tests/server/test/cases/
tests/server/test.js

tests/unit/pypy3-*
1 change: 1 addition & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
[submodule "extra/haxelib_src"]
path = extra/haxelib_src
url = https://github.com/HaxeFoundation/haxelib.git
ignore = dirty # run.n will be recompiled during make
10 changes: 9 additions & 1 deletion .merlin
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
S src/**
B src/**
B _build/src/**
S libs/**
B libs/**
B +threads
PKG rope
PKG ptmap
PKG sedlex
PKG extlib
PKG camlzip
PKG xml-light
FLG -safe-string
235 changes: 156 additions & 79 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,35 @@
cache:
timeout: 1000
directories:
- $HOME/.opam
- $HOME/neko
- $HOME/apt-cache
- $HOME/hxcache
- $HOME/lua_env
- $HOME/.luarocks

before_cache:
- if [ $TRAVIS_OS_NAME = 'linux' ]; then
sudo apt-get autoclean;
sudo rm -f $HOME/apt-cache/lock || true;
fi
# somehow these files are recreated everytime
- rm -f $HOME/lua_env/lib/liblua51.a
- rm -f $HOME/lua_env/lib/liblua52.a
- rm -f $HOME/lua_env/lib/liblua53.a
- rm -f $HOME/lua_env/lib/libluajit-5.1.a
#- if [ $TRAVIS_OS_NAME = 'osx' ]; then brew cleanup; fi

env:
global:
# make variables
- OCAMLC=ocamlc.opt
- OCAMLOPT=ocamlopt.opt
- ADD_REVISION=1
# nightly builds submit
- secure: "UoGjYvQqt66GWmeLC4Pih1iue5AufVgW8XQOd2Bx839NN/2mQQ9bD1HuONJe+taWBJ+PHInkAjYROYYaiCQUA7B1SXs3oQD7Og6arVcR7kY7XOdAQ2t8ZkxJHTnuYGWW/2gNFBESv+3H17bkXG4rzaSn2LV5PJLOxSjw0ziBUMY="
- secure: "ugpxt+zeYiAiMYKLK96f5TLSxbQAtmDWiumdwaLHl88fIUeefxJJPIF1Xm0AHeYEJE7sD8dLE1dMbRSzOpXFfTmJoQZv19Wjv+2N5B+DaabKjGj1nZG7q3blGa3nUYzWVfFNFiIpM9c5fvW8yiUFzacZE5itEY8+lZQeGsNh+WQ="
# SauceLabs
- secure: SjyKefmjUEXi0IKHGGpcbLAajU0mLHONg8aA8LoY7Q9nAkSN6Aql+fzS38Boq7w1jWn+2FOpr+4jy0l6wVd/bftsF+huFfYpFJmdh8BlKmE0K71zZAral0H1c7YxkuQpPiJCIFGXqtkvev7SWTy0z31u7kuuQeEyW27boXe5cDA=
- secure: sUvWUjCyPuWht4seNa4f2VG9DkvXkhZyLZfjJO9TUAHB2JndS16E2j/qrvKEjycyH6w8tU/B9vnjDRvvGrYXxEXcBEwsJVfkorFnRl9uwGCGIYrzjMhssEl3fMYZK7P304f+gAp5ULrDBX2gIaKeSa8lUNRtz2PsZOieE4kMdhk=
# - secure: SjyKefmjUEXi0IKHGGpcbLAajU0mLHONg8aA8LoY7Q9nAkSN6Aql+fzS38Boq7w1jWn+2FOpr+4jy0l6wVd/bftsF+huFfYpFJmdh8BlKmE0K71zZAral0H1c7YxkuQpPiJCIFGXqtkvev7SWTy0z31u7kuuQeEyW27boXe5cDA=
# - secure: sUvWUjCyPuWht4seNa4f2VG9DkvXkhZyLZfjJO9TUAHB2JndS16E2j/qrvKEjycyH6w8tU/B9vnjDRvvGrYXxEXcBEwsJVfkorFnRl9uwGCGIYrzjMhssEl3fMYZK7P304f+gAp5ULrDBX2gIaKeSa8lUNRtz2PsZOieE4kMdhk=
# Bintray
# - secure: "ETbwZaeRq8wIVZVyUk1IsNctYVuQa/U2biRkF9pQkz3MEXpaneynclVzNjm8rnm8JqfKcjUDUvQJBP1KYrJYq3tAJFhl31YUnS0FsF3sgLIcnHkhbRA24xJdIlCwHP6QUPoiyPbkec43NRwrF0071KOMD51vgUToXRtAe3o/15g="
# - secure: "Fcrrge2f4jFYDOopig2rwkQvgJw6Ra8UK6OwTVk08wecytzVaOJK1TcB22PSvZ+h0ZLJs34T+pXHFjlNuSWm4+CwGSvnltRD1/svjS8zOqK7RzuUdzHz87yruz9PFqV63HTas6qtmgLqp8n/Q6AhtDLF39BTZPyDzEbi9qkwRuI="
Expand All @@ -18,70 +41,138 @@ env:

sudo: required
dist: trusty
osx_image: xcode6.4
addons: &addons
ssh_known_hosts:
- haxe.org
- api.haxe.org

install_linux: &install_linux
# Install neko and haxe dependencies
- if [ ! -d "$HOME/neko" ]; then
export CACHE_AVAILABLE=0;
elif [ ! -d "$HOME/neko/.git" ]; then
export CACHE_AVAILABLE=0;
else
export CACHE_AVAILABLE=1;
fi
# Install dependencies
- export APT_CACHE_DIR=~/apt-cache && mkdir -pv $APT_CACHE_DIR
- sudo apt-get install --reinstall ca-certificates # workaround for "Cannot add PPA: 'ppa:haxe/ocaml'. Please check that the PPA name or format is correct."
- sudo add-apt-repository ppa:haxe/ocaml -y
- sudo apt-get update
- sudo apt-get install -y
- sudo apt-get update -y
- sudo apt-get -o dir::cache::archives="$APT_CACHE_DIR" install -y
ocaml
ocaml-native-compilers
ocaml-findlib
camlp4
pkg-config
libgc-dev
libssl-dev
libpcre3-dev
zlib1g-dev
apache2-dev
libmysqlclient-dev
libsqlite3-dev
libgtk2.0-dev
# Install neko
- travis_retry git clone https://github.com/HaxeFoundation/neko.git ~/neko
- pushd ~/neko
- cmake -DSTATIC_DEPS=MbedTLS
- make
- sudo make install
ninja-build
awscli
$JOB_DEPENDENCIES
- wget https://raw.github.com/ocaml/opam/master/shell/opam_installer.sh -O - | sh -s /usr/local/bin system
- export OPAMYES=1
- opam install sedlex xml-light extlib rope ptmap
# check if we need to install neko
- export REF_CHANGED=1;
- if [ ! -d "$HOME/neko" ]; then
mkdir $HOME/neko;
pushd $HOME/neko;
git clone https://github.com/HaxeFoundation/neko.git .;
git submodule update --init --recursive;
else
pushd $HOME/neko;
if [ ! -d "$HOME/neko/.git" ]; then
git clone https://github.com/HaxeFoundation/neko.git .;
git submodule update --init --recursive;
else
git fetch --all;
export REF_CUR=`git rev-list master | head -n 1`;
export REF_REMOTE=`git rev-list origin/master | head -n 1`;
export REF_CHANGED=`(test $REF_CUR != $REF_REMOTE && echo 1) || echo 0`;
if [ $REF_CHANGED = 1 ]; then
git reset --hard origin/master;
git submodule update --init --recursive;
fi;
fi;
fi;
- env
- test $REF_CHANGED = 0 || cmake . -DSTATIC_DEPS=all -G Ninja || (git clean -dfx && export CACHE_AVAILABLE=0 && cmake . -DSTATIC_DEPS=all -G Ninja)
# download static dependencies before actual build, with 3 chances to deal with network issues
- test $REF_CHANGED = 0 || ninja download_static_deps || ninja download_static_deps || ninja download_static_deps
- test $REF_CHANGED = 0 || (ninja -j 4)
- sudo cmake -P cmake_install.cmake
- popd
# Setup database
- travis_retry sudo apt-get install mysql-server-5.6 -y
- mysql -u root -e "create user travis@localhost identified by '';"
- mysql -u root -e "create database haxe_test;"
- mysql -u root -e "grant all on haxe_test.* to travis@localhost;"
# Setup JDK
- jdk_switcher use oraclejdk7
- java -version
# Build haxe
- make package_src -s
- make -s
- opam config exec -- make -s STATICLINK=1 libs
- opam config exec -- make -s -j STATICLINK=1 haxe
- opam config exec -- make -s haxelib
- make package_bin -s
- ls -l out
- ldd -v ./haxe
- ldd -v ./haxelib
- export PATH="$PATH:$TRAVIS_BUILD_DIR"
- export HAXE_STD_PATH="$TRAVIS_BUILD_DIR/std"

install_osx: &install_osx
# Install haxe dependencies
- if [ ! -d "$HOME/neko" ]; then
export CACHE_AVAILABLE=0;
elif [ ! -d "$HOME/neko/.git" ]; then
export CACHE_AVAILABLE=0;
else
export CACHE_AVAILABLE=1;
fi
# Install dependencies
- travis_retry brew update --merge
- brew uninstall --force brew-cask # https://github.com/caskroom/homebrew-cask/pull/15381
- travis_retry brew update
- travis_retry brew install ocaml camlp4;
# Install neko
- travis_retry brew install neko --HEAD;
# Setup database
- travis_retry brew install mysql
- mysql.server start
- mysql -u root -e "create user if not exists travis@localhost identified by '';"
- mysql -u root -e "create database haxe_test;"
- mysql -u root -e "grant all on haxe_test.* to travis@localhost;"
- travis_retry brew tap Homebrew/bundle
- travis_retry brew bundle --file=tests/Brewfile
- export OPAMYES=1
- opam init
- eval `opam config env`
- opam install camlp4 sedlex ocamlfind xml-light extlib rope ptmap
# check if we need to install neko
- export REF_CHANGED=1;
- if [ ! -d "$HOME/neko" ]; then
mkdir $HOME/neko;
pushd $HOME/neko;
git clone https://github.com/HaxeFoundation/neko.git .;
git submodule update --init --recursive;
else
pushd $HOME/neko;
if [ ! -d "$HOME/neko/.git" ]; then
git clone https://github.com/HaxeFoundation/neko.git .;
git submodule update --init --recursive;
else
git fetch --all;
export REF_CUR=`git rev-list master | head -n 1`;
export REF_REMOTE=`git rev-list origin/master | head -n 1`;
export REF_CHANGED=`(test $REF_CUR != $REF_REMOTE && echo 1) || echo 0`;
if [ $REF_CHANGED = 1 ]; then
git reset --hard origin/master;
git submodule update --init --recursive;
fi;
fi;
fi
- env
- test $REF_CHANGED = 0 || cmake . -DSTATIC_DEPS=all -G Ninja || (git clean -dfx && export CACHE_AVAILABLE=0 && cmake . -DSTATIC_DEPS=all -G Ninja)
# download static dependencies before actual build, with 3 chances to deal with network issues
- test $REF_CHANGED = 0 || ninja download_static_deps || ninja download_static_deps || ninja download_static_deps
- test $REF_CHANGED = 0 || (ninja -j 4)
- sudo cmake -P cmake_install.cmake
- popd
# Build haxe
- make package_src -s
- make -s
- make -s STATICLINK=1 "LIB_PARAMS=/usr/local/opt/zlib/lib/libz.a /usr/local/lib/libpcre.a" libs
- make -s -j STATICLINK=1 "LIB_PARAMS=/usr/local/opt/zlib/lib/libz.a /usr/local/lib/libpcre.a" haxe
- make -s haxelib
- make package_bin -s
- ls -l out
- otool -L ./haxe
- otool -L ./haxelib
- export PATH="$PATH:$TRAVIS_BUILD_DIR"
- export HAXE_STD_PATH="$TRAVIS_BUILD_DIR/std"

Expand All @@ -92,75 +183,61 @@ matrix:
#########
- os: linux
env:
- TEST=macro,neko,js,php,flash9,as3,java,cs,python,hl,lua
- DEPLOY=1
- SAUCE=1
- TEST=macro,neko,js,php,php7,flash9,as3,java,cs,python,hl,lua
- DEPLOY_API_DOCS=1
- DEPLOY_NIGHTLIES=1
# - SAUCE=1
# haxeci_decrypt (Deploy source package to ppa:haxe/snapshots.)
- secure: "Mw3p6bDZuqVQ6u7GrwLQfje5hhIOA4+mdqqLXYHP79UKdhgqb91Dn6IbG9vQ1VXVe64W4YZbQAMBMMRX5kEPDl6JvTVGSBhg00Mi69oO5qrCMcBI6f9FntG72YaVvLf+PA7co+vKrnJzaP2M9pe4SH9Ztbhy0YNxULp7NQ8FLsM="
# deploy_key_decrypt (Deploy doc to api.haxe.org.)
- secure: "A75uYqU0Xz6plIgSewEs0QQWe472dCMb9kf3j7Hx0DS7dApXgx8++189sw9Sv0wam5KPtbcIM292MucjGCb5zocVj9xCUVgajhEA0QpTuDMBjk/cg3ClWCGjfybaCl2E5LLdUs7Zy4b4oNWtVikOWLWJ4sC1kaarR9p6kv8yYZg="
addons:
<<: *addons
sauce_connect: true
# addons:
# <<: *addons
# sauce_connect: true
before_install:
- sudo dpkg --add-architecture i386
- sudo apt-get update -y || true
- travis_retry sudo apt-get install -y
libcurl3:i386
libglib2.0-0:i386
libx11-6:i386
libxext6:i386
libxt6:i386
libxcursor1:i386
libnss3:i386
libgtk2.0-0:i386
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- "export AUDIODEV=null"
install: *install_linux

- os: linux
env:
- TEST=cpp
- HXCPP_COMPILE_THREADS=4
- HXCPP_COMPILE_CACHE=~/hxcache
before_install:
- sudo apt-get update -y || true
- travis_retry sudo apt-get install -y
gcc-multilib
g++-multilib
install: *install_linux

- os: linux
env:
- TEST=php7
before_install:
- phpenv global "7.0"
# - sudo apt-get install php7-cli php7-mysql php7-sqlite -y || (sudo add-apt-repository ppa:ondrej/php -y && sudo apt-get update -y && sudo apt-get install php7.0-cli php7.0-mysql php7.0-sqlite -y)
- php -v || true
- export JOB_DEPENDENCIES="gcc-multilib g++-multilib"
install: *install_linux

#######
# osx #
#######
- os: osx
osx_image: xcode6.4 # to compile binaries that support older versions of Mac
env:
- TEST=macro,neko,js,php,flash9,as3,java,cs,python,hl,lua
- DEPLOY=1
- TEST=macro,neko,js,php,python,hl,lua
- DEPLOY_NIGHTLIES=1
install: *install_osx

- os: osx
osx_image: xcode8.3 # to compile C++ faster
env:
- TEST=cpp
- HXCPP_COMPILE_CACHE=~/hxcache
- HXCPP_COMPILE_THREADS=4
install: *install_osx

script:
- eval `ssh-agent -s` # for deployment to haxe.org
- pushd tests
- mkdir ~/haxelib && haxelib setup ~/haxelib
- haxelib install record-macros
- haxe -version
- haxe RunCi.hxml
- neko RunCi.n
- popd
- export CAN_BUILD=`(test $CACHE_AVAILABLE = 1 || test $TRAVIS_OS_NAME = 'linux') && echo 1`
- if [ ! $CAN_BUILD ]; then
echo "No cache available, but initial cache created, please try restarting this job";
fi
- test $CAN_BUILD && pushd tests
- test $CAN_BUILD && mkdir ~/haxelib && haxelib setup ~/haxelib
- test $CAN_BUILD && haxe -version
- test $CAN_BUILD && haxe RunCi.hxml
- test $CAN_BUILD && neko RunCi.n
- test $CAN_BUILD && popd

branches:
except:
Expand Down
Loading

0 comments on commit ee42cde

Please sign in to comment.