Commit Graph

82 Commits

Author SHA1 Message Date
Ken Domino 4b649103f3
Restructure C# runtime and fix Issue #2693 (#3057)
* Fixes for https://github.com/antlr/antlr4/issues/2693

* Adding script for comparing Java and C# profile output.

* Update lexer grammar.

Tightening up the grammar rules. Still Java9.

* Tighten up grammar.

* Adding in new base classes for C# runtime tests for profiling.

* Complete test for Profile = true.

Update ProfileDescriptor to now parse and output profile. The grammar is asm8080 from grammars-v4, tightened up. The input is the example provided there, truncated to included fewer lines as that causes a null-ptr crash with the older runtime. I verified by modifying the .csproj in /tmp.

* Restructuring the Antlr C# runtime so that it is consistent with all other runtimes, a source directory (now antlr4/runtime/CSharp/src), and a test directory (antlr4/runtime/CSharp). In the test area, I added a test for profiling in issue-2593. This test requires the Antlr tool and Antlr C# tool to be build. The path is assumed in a relative path to the test, ../../../../tool/target/antlr4-*-SNAPSHOT-complete.jar, with globbing performed. The test simply checks the return result, output not important. There are no changes to the runtime C# source files other than placing them under src/. Several other build files were changed to reflect the new location of the Antlr C# runtime. I updated the instructions for users on how to build the runtime, including information on checking the environment--now explicitly specified here so people know what to install!
2021-02-02 09:51:41 +08:00
parrt 615d76dcda add clone for php to travis script 2021-01-03 13:18:27 -08:00
Ivan Kochurkin 925c0a6b8b Fix CI scripts; use dotnet everywhere for testing; remove before-install-linux-csharp.sh, run-tests-csharp.sh 2020-12-28 16:17:00 +03:00
Eric Vergnaud 263eb29a82 run npm install and link once before tests 2020-10-04 11:23:54 +08:00
Eric Vergnaud c35b258c59 more feedback 2020-10-04 10:09:24 +08:00
Camilo Roca 3d7b314a76 rollback travis.sh changes 2020-10-03 21:02:50 +02:00
Eric Vergnaud 0536e72504 try fix travis 2020-10-04 00:42:34 +08:00
Eric Vergnaud 292811ce81 try fix travis 2020-10-04 00:19:54 +08:00
Eric Vergnaud 47d1332249 try fix travis 2020-10-04 00:07:30 +08:00
Eric Vergnaud d5e2e4b4f3 try fix travis 2020-10-04 00:01:56 +08:00
Eric Vergnaud 596267d6a4 try fix travis 2020-10-03 23:55:58 +08:00
Eric Vergnaud f9927c0a90 try fix travis 2020-10-03 23:50:12 +08:00
Eric Vergnaud 90e78a9cb5 try fix travis 2020-10-03 23:41:29 +08:00
Eric Vergnaud fd89fccfa6 try fix travis 2020-10-03 20:37:13 +08:00
Eric Vergnaud f71a1fd205 try fix travis 2020-10-03 20:34:13 +08:00
Eric Vergnaud 8ae36fd0d4 try fix travis 2020-10-03 20:05:59 +08:00
Eric Vergnaud bdf3329581 try fix travis 2020-10-03 19:59:35 +08:00
Eric Vergnaud 215d57abff try fix travis 2020-10-03 19:57:57 +08:00
Eric Vergnaud a788b860c2 try fix travis 2020-10-03 19:26:34 +08:00
Eric Vergnaud a12539651e Fix travis js build 2020-10-03 19:14:53 +08:00
Eric Vergnaud 6df2ec7c3b use node 14.12 2020-10-03 17:19:24 +08:00
Larry Li 0b34136a44 fix dart sdk url 2020-08-19 13:31:32 +10:00
Larry Li d47db45180 fix travis ci for pinned dart sdk version 2020-08-19 12:31:02 +10:00
Larry Li 1eb6c3ee52 pin dart version to 2.8.4 2020-08-19 07:16:58 +10:00
Larry Li c8571060f0 pin dart version to 2.8.4 to get unit tests passing 2020-08-19 06:36:32 +10:00
Larry Li 62d56d83ae Merge branch 'master' of github.com:antlr/antlr4 into dart-clean 2020-05-25 21:01:46 +10:00
Eric Vergnaud ddf38ec88f fix failing tests 2020-02-22 10:35:42 +08:00
Camilo Roca 18f5f3cd27 fix: bump nodejs test version to support classes 2020-02-03 20:31:57 +01:00
Larry Li 46bd9e5569 add dart target 2020-01-19 18:22:06 +11:00
Terence Parr a75c3e9318
Merge pull request #2686 from ewanmellor/swift-5
[Swift] Migrate Swift runtime to Swift 5.
2019-12-08 16:13:51 -08:00
Terence Parr 1ae00bed84
Merge pull request #2599 from ewanmellor/remove-unnecessary-travis-files
Remove unnecessary Travis files.
2019-12-08 16:11:08 -08:00
Ewan Mellor 509eeefa4a
[Swift] Migrate Swift runtime to Swift 5.
This switches from using the deprecated hashValue to hash(into:).
It also switches from using index to firstIndex (matching the change in
the standard library).

In the test template, we switch to using String directly instead of
String.characters.

This also switches all the Travis macOS tests to use the Xcode 10.2 / Mojave
image and changes the Linux Swift tests to download Swift 5.0.1.
2019-11-18 13:24:28 -08:00
Marcos Passos 789d746636 PHP Target 2019-09-14 09:39:58 -03:00
Eric Vergnaud b50635625e add cmd line option 2019-08-19 22:06:58 +08:00
Ewan Mellor 115274e771
Remove unnecessary Travis files.
Remove .travis/before-install-linux-{cpp,java,python2,python3}.sh, and
remove some lines from before-install-linux-{javascript,go}.sh.

These contained apt commands for configuring the Mono project's GPG key,
which is not used in any of these builds, and pointless apt-get update
calls.
2019-07-14 16:03:13 -07:00
Eric Vergnaud 6aa90a2c1d Fixes the mono build, thanks @ewanmellor 2019-07-14 11:48:32 +08:00
You Kaichao 45a4cdc67b update test script 2019-01-04 09:17:36 +08:00
Ewan Mellor 443a1d2454
Make all the Travis test scripts exit in the event of error.
Test scripts that ignore errors aren't very helpful.
2018-11-15 15:33:10 -08:00
Ewan Mellor 481f517fec
[.NET] Make the .NET Travis tests use netstandard1.3.
Add -f netstandard1.3 to the dotnet build command used on Travis.

This has been necessary since PR #2024, and the build has been silently failing
all this time.
2018-11-15 15:33:10 -08:00
Ewan Mellor 23bc423259
Move Travis tests to Swift 4.2 and Xcode 10.1.
Move Travis Swift, .NET, and C++ macOS tests from Xcode 9 to Xcode 10.1.
Move Travis Linux Swift tests from Trusty to Xenial and to Swift 4.2.1.

Remove the dirname call when setting JAVA_HOME, it seems to be incorrect.
Print the JAVA_HOME that Travis ends up with.

Moving to Xcode 10.1 / Swift 4.2 exposes the issue discussed in #2372
so this cset will fail automated tests without the relevant fixes.
2018-11-15 11:25:37 -08:00
Terence Parr 84e9a46932
Merge pull request #2107 from ewanmellor/swift-fix-deprecated-string-methods
Remove use of deprecated String functions
2017-11-29 09:52:27 -08:00
Ewan Mellor 84eca87da2
[CSharp] Switch Travis / macOS to .NET Core 1.1.4.
Switch to .NET Core SDK 1.1.4 for the Travis macOS tests.  This is
the LTS release at the moment.

Issue #2078 is starting to look like a crash (SIGILL) inside the dotnet
runtime, so this upgrade may help with that.
2017-11-14 01:47:33 -08:00
Ewan Mellor ba392be1af
Remove use of deprecated String functions in StringExtension.
Remove some functions that are no longer used, and update the
rest to Swift 4's String API.  lastIndexOf changes to lastIndex(of: ),
matching the standard library naming conventions, and returns a
String.Index? instead of an Int.

Add an implementation of Substring.hasPrefix for Linux; this
is in the Apple standard library but not the Linux one.
https://bugs.swift.org/browse/SR-5627

Add unit tests for StringExtension.

Bump the Swift download for the Travis Linux tests from 4.0
to 4.0.2.  There is a bug in Substring.range(of:) in 4.0.0
(https://bugs.swift.org/browse/SR-5663) that we need to avoid.
2017-11-07 17:06:15 -08:00
Ewan Mellor 376f7384c3
Run the Swift runtime unit tests during the Travis run.
These are the unit tests that are written in Swift, not the more
in-depth runtime-testsuite tests (we were always running those).

I don't know why JAVA_HOME isn't set during run-tests-swift.sh, but it
isn't.  Set it, since runtime/Swift/boot.py expects it as part of the
parser generation.
2017-11-04 11:41:20 -07:00
Ewan Mellor 026c6736dc
Add Travis-side caching of the dotnet package that we download from Microsoft.
This avoids hitting the Microsoft server every time.  The download isn't
super-reliable, so this should help with build reliability.

This extends the cache timeout, because the package is large and the
upload was timing out.
2017-10-28 14:32:33 -07:00
Ewan Mellor 897b4339a3
Switch the Linux Swift tests to Trusty and Swift 4.0.
This uses Travis's new(ish) Ubuntu Trusty image, and changes the
version number of the Swift binaries that we download.

We now install clang-3.6.  This is not the default on Trusty, but
it's required by the Swift 4.0 toolchain.

This also removes the lines to upgrade libicu-dev and sqlite3.  These
are sufficiently up-to-date in the Trusty image.
2017-10-20 10:12:47 -07:00
Ewan Mellor cfb0041328
Switch all the macOS Travis jobs to use the Xcode 9 image.
We require Xcode 9 for the Swift target, and the C++ and .NET tests
shouldn't care either way.

We no longer need to install cmake: this is already in the Travis
Xcode 9.0 image (and it barfs if we try to install it again).

We no longer need the rvm bug workarounds; a newer version of rvm is
in the Xcode 9.0 image so this is no longer a problem.

The openssl package is already installed and up-to-date now, so there is
no need to install that.

These changes mean that we don't need before-install-osx-cpp.sh
or before-install-os-swift.sh at all, and before-install-osx-dotnet.sh
gets a bit shorter.  .travis.yml gets a small change to handle the
fact that some platform / target combos don't need before-install any more.
2017-10-20 10:12:47 -07:00
Eric Vergnaud c15aa4336a dotent also times out 2017-06-28 22:18:19 +08:00
Eric Vergnaud c5eb9cbeef Merge branch 'master' into fix-travis-timeouts 2017-06-28 20:41:32 +08:00
Eric Vergnaud 03e9a012bc fix failing build 2017-06-28 20:40:16 +08:00