Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
ericvergnaud authored Feb 8, 2022
2 parents 548986c + 9e04c9f commit fcab02c
Show file tree
Hide file tree
Showing 855 changed files with 16,446 additions and 39,778 deletions.
128 changes: 0 additions & 128 deletions .appveyor/workflow.yml

This file was deleted.

19 changes: 8 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ version: 2.1
jobs:
test_tool_and_runtime_java:
docker:
- image: cimg/openjdk:8.0
- image: cimg/openjdk:11.0
steps:
- checkout
- run:
Expand All @@ -13,13 +13,13 @@ jobs:
name: test runtime
command: |
cd runtime-testsuite
mvn -q -Dparallel=methods -DthreadCount=4 -Dtest=java.* test
mvn -Dparallel=classes -DthreadCount=4 -Dtest=java.** test
cd ..
- run:
name: test tool
command: |
cd tool-testsuite
mvn -q -Dparallel=methods -DthreadCount=4 test
mvn -Dparallel=classes -DthreadCount=4 test
cd ..
test_runtime:
parameters:
Expand All @@ -32,7 +32,10 @@ jobs:
type: string
default: java
docker:
- image: cimg/openjdk:8.0
- image: cimg/openjdk:11.0
environment:
MAVEN_OPTS: -Xmx512m
resource_class: large
environment:
TARGET: << parameters.target >>
GROUP: << parameters.test-group >>
Expand All @@ -57,10 +60,4 @@ workflows:
- test_runtime:
matrix:
parameters:
target: [ dart, go, python2, python3, javascript, php ]
- test_runtime:
matrix:
parameters:
# target: [ cpp, dotnet, swift ]
target: [ cpp, dotnet, dart ]
test-group: [ LEXER, PARSER, RECURSION ]
target: [ dart, go, python2, python3, javascript, php, cpp, dotnet ]
4 changes: 0 additions & 4 deletions .circleci/scripts/install-linux-javascript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,6 @@ sudo apt-get install -y nodejs
echo node version: $(node --version)
echo "done installing nodejs"

echo "installing yarn..."
sudo npm install -g [email protected]
echo "done installing yarn"

echo "packaging javascript runtime..."
pushd runtime/JavaScript
sudo npm install
Expand Down
12 changes: 1 addition & 11 deletions .circleci/scripts/run-tests-cpp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,5 @@
set -euo pipefail

pushd runtime-testsuite
echo "running maven tests..."
if [ $GROUP == "LEXER" ]; then
mvn -q -Dgroups="org.antlr.v4.test.runtime.category.LexerTests" -Dtest=cpp.* test
elif [ $GROUP == "PARSER" ]; then
mvn -q -Dgroups="org.antlr.v4.test.runtime.category.ParserTests" -Dtest=cpp.* test
elif [ $GROUP == "RECURSION" ]; then
mvn -q -Dgroups="org.antlr.v4.test.runtime.category.LeftRecursionTests" -Dtest=cpp.* test
else
mvn -q -Dtest=cpp.* test
fi
mvn -Dparallel=classes -DthreadCount=4 -Dtest=cpp.** test
popd

3 changes: 1 addition & 2 deletions .circleci/scripts/run-tests-dart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,5 @@ dart --version

pushd runtime-testsuite
echo "running maven tests..."
# mvn -q -Dparallel=classes -DthreadCount=4 -Dtest=dart.* test
mvn -q -Dtest=dart.* test
mvn -Dparallel=classes -DthreadCount=4 -Dtest=dart.** test
popd
13 changes: 2 additions & 11 deletions .circleci/scripts/run-tests-dotnet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,6 @@

set -euo pipefail

pushd runtime-testsuite/
echo "running maven tests..."
if [ $GROUP == "LEXER" ]; then
mvn -q -Dgroups="org.antlr.v4.test.runtime.category.LexerTests" -Dtest=csharp.* test
elif [ $GROUP == "PARSER" ]; then
mvn -q -Dgroups="org.antlr.v4.test.runtime.category.ParserTests" -Dtest=csharp.* test
elif [ $GROUP == "RECURSION" ]; then
mvn -q -Dgroups="org.antlr.v4.test.runtime.category.LeftRecursionTests" -Dtest=csharp.* test
else
mvn -q -Dtest=csharp.* test
fi
pushd runtime-testsuite
mvn -Dparallel=classes -DthreadCount=4 -Dtest=csharp.** test
popd
4 changes: 2 additions & 2 deletions .circleci/scripts/run-tests-go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ go version

pushd runtime-testsuite
echo "running maven tests..."
mvn -q -Dparallel=methods -DthreadCount=4 -Dtest=go.* test
popd
mvn -Dparallel=classes -DthreadCount=4 -Dtest=go.** test
popd
8 changes: 4 additions & 4 deletions .circleci/scripts/run-tests-javascript.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@ declare -i RESULT=0

pushd runtime/JavaScript

echo "running jest tests..."
yarn test
echo "running jasmine tests..."
npm test
RESULT+=$?

popd

pushd runtime-testsuite

echo "running maven tests..."
mvn -q -Dtest=javascript.* test
mvn -Dtest=javascript.** test
RESULT+=$?

popd

exit $RESULT
exit $RESULT
2 changes: 1 addition & 1 deletion .circleci/scripts/run-tests-php.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ php -v
php_path=$(which php)
pushd runtime-testsuite
echo "running maven tests..."
mvn -q -DPHP_PATH="${php_path}" -Dparallel=methods -DthreadCount=4 -Dtest=php.* test
mvn -DPHP_PATH="${php_path}" -Dparallel=classes -DthreadCount=4 -Dtest=php.** test
popd
4 changes: 2 additions & 2 deletions .circleci/scripts/run-tests-python2.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ popd
if [ $rc == 0 ]; then
pushd runtime-testsuite
echo "running maven tests..."
mvn -q -Dtest=python2.* test
mvn -Dparallel=classes -DthreadCount=4 -Dtest=python2.** test
rc=$?
popd
fi

# return $rc
# return $rc
4 changes: 2 additions & 2 deletions .circleci/scripts/run-tests-python3.sh
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ popd
if [ $rc == 0 ]; then
pushd runtime-testsuite
echo "running maven tests..."
mvn -q -Dtest=python3.* test
mvn -Dparallel=classes -DthreadCount=4 -Dtest=python3.** test
rc=$?
popd
fi

# return $rc
# return $rc
13 changes: 4 additions & 9 deletions .circleci/scripts/run-tests-swift.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#!/bin/bash

# Appears to be unused

set -euo pipefail

pushd runtime/Swift
Expand All @@ -11,17 +13,10 @@ pushd runtime/Swift
fi
popd


if [ $rc == 0 ]; then
pushd runtime-testsuite
echo "running maven tests..."
if [ $GROUP == "LEXER" ]; then
mvn -q -Dgroups="org.antlr.v4.test.runtime.category.LexerTests" -Dtest=swift.* test
elif [ $GROUP == "PARSER" ]; then
mvn -q -Dgroups="org.antlr.v4.test.runtime.category.ParserTests" -Dtest=swift.* test
elif [ $GROUP == "RECURSION" ]; then
mvn -q -Dgroups="org.antlr.v4.test.runtime.category.LeftRecursionTests" -Dtest=swift.* test
else
mvn -q -Dtest=swift.* test
fi
mvn -Dparallel=classes -DthreadCount=4 -Dtest=swift.** test
popd
fi
20 changes: 20 additions & 0 deletions .clang-format
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
# This section defines defaults for all languages. Currently we derive ANTLR style from LLVM.
BasedOnStyle: LLVM
# Only use clang-format for C++ for now.
DisableFormat: true

---
# This section configures C++ formatting.
Language: Cpp
DisableFormat: false
Standard: c++17
# Prevent clang-format from attempting to pick the alignment and always use right alignment.
DerivePointerAlignment: false
# ANTLR existing style is to right align pointers and references.
PointerAlignment: Right
ReferenceAlignment: Right
# Some of ANTLR existing code is longer than the default 80, so use 100 for now.
ColumnLimit: 100
# Historically ANTLR has used indentation within namespaces, so replicate it.
NamespaceIndentation: Inner
1 change: 1 addition & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true
indent_style = tab
ij_java_else_on_new_line = true
2 changes: 1 addition & 1 deletion .gitattributes
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# This rule applies to all files which don't match another line below
* text=auto
* text=auto
File renamed without changes.
7 changes: 7 additions & 0 deletions .github/scripts-macosx/run-tests-cpp.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/bash

set -euo pipefail

pushd runtime-testsuite
mvn -Dparallel=classes -DthreadCount=4 -Dtest=cpp.** test
popd
17 changes: 17 additions & 0 deletions .github/scripts-macosx/run-tests-dotnet.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

# Appears not to be used at moment

set -euo pipefail

export PATH=$PATH:~/.dotnet

# we need to build the runtime before test run, since we used "--no-dependencies"
# when we call dotnet cli for restore and build, in order to speed up

dotnet build -c Release -f netstandard2.0 runtime/CSharp/Antlr4.csproj

# run tests
pushd runtime-testsuite/
mvn -Dparallel=classes -DthreadCount=4 -Dtest=csharp.** test
popd
Loading

0 comments on commit fcab02c

Please sign in to comment.