Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 23 additions & 17 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,14 @@
version: 2.1

jobs:
test_tool_and_runtime_java:
test_tool:
docker:
- image: cimg/openjdk:11.0
steps:
- checkout
- run:
name: build tool
name: Build ANTLR4
command: mvn -B -V -DskipTests=true -Dmaven.javadoc.skip=true install
- run:
name: test runtime
command: |
cd runtime-testsuite
mvn -Dtest=java.** test
cd ..
- run:
name: test tool
command: |
Expand All @@ -38,27 +32,39 @@ jobs:
parallelism: 4
resource_class: large
environment:
TARGET: << parameters.target >>
GROUP: << parameters.test-group >>
TARGET: <<parameters.target>>
GROUP: <<parameters.test-group>>
steps:
- checkout
- run:
name: Install << parameters.target >> pre-requisites
name: Install <<parameters.target>> pre-requisites
command: |
f=".circleci/scripts/install-linux-<< parameters.target >>.sh"; ! [ -x "$f" ] || "$f"
set -euo pipefail
f=".circleci/scripts/install-linux-<<parameters.target>>.sh"; ! [ -x "$f" ] || "$f"
- run:
name: Build ANTLR4 tool
name: Build ANTLR4
command: mvn -B -V -DskipTests=true -Dmaven.javadoc.skip=true install
- run:
name: Test << parameters.target >> runtime
name: Test <<parameters.target>> runtime
command: |
set -euo pipefail
if [ "<<parameters.target>>" == "swift" ]
then
export PATH=$PATH:/usr/share/swift/usr/bin
fi
pushd runtime-testsuite
mvn -Dtest=<<parameters.target>>.** test
popd
- run:
name: Extra tests of <<parameters.target>> runtime
command: |
.circleci/scripts/run-tests-<< parameters.target >>.sh
f=".circleci/scripts/run-tests-<<parameters.target>>.sh"; ! [ -x "$f" ] || "$f"

workflows:
build:
jobs:
- test_tool_and_runtime_java
- test_tool
- test_runtime:
matrix:
parameters:
target: [ dart, go, python2, python3, javascript, php, cpp, dotnet ]
target: [ java, csharp, python2, python3, javascript, cpp, go, swift, php, dart ]
2 changes: 0 additions & 2 deletions .circleci/scripts/install-linux-cpp.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/bash

set -euo pipefail

echo "installing cpp SDK..."

sudo apt-get update -y
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
#!/bin/bash

set -euo pipefail

echo "installing .Net SDK..."
wget https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get update; \
sudo apt-get install -y apt-transport-https && \
sudo apt-get update && \
sudo apt-get install -y dotnet-sdk-3.1
export PATH=$PATH:~/.dotnet
echo "done installing .Net SDK"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably OK, but it looks like this is missing a new line on the end, which annoys UNIX.


sudo apt-get install -y dotnet-sdk-6.0
echo "done installing .Net SDK"
3 changes: 0 additions & 3 deletions .circleci/scripts/install-linux-dart.sh
Original file line number Diff line number Diff line change
@@ -1,14 +1,11 @@
#!/bin/bash

set -euo pipefail

echo "installing dart SDK..."
sudo apt-get update
sudo apt-get install apt-transport-https
sudo sh -c 'wget -qO- https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add -'
sudo sh -c 'wget -qO- https://storage.googleapis.com/download.dartlang.org/linux/debian/dart_stable.list > /etc/apt/sources.list.d/dart_stable.list'
sudo apt-get update
sudo apt-get install dart=2.12.1-1
export PATH="$PATH:/usr/lib/dart/bin"
echo "done installing dart SDK"
sudo apt-get install -f
2 changes: 0 additions & 2 deletions .circleci/scripts/install-linux-go.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/bash

set -euo pipefail

echo "installing go SDK..."
sudo apt update
sudo apt install golang-go
Expand Down
6 changes: 2 additions & 4 deletions .circleci/scripts/install-linux-javascript.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/bash

set -euo pipefail

# use v14 and check
echo "installing nodejs..."
curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
Expand All @@ -10,8 +8,8 @@ echo node version: $(node --version)
echo "done installing nodejs"

echo "packaging javascript runtime..."
pushd runtime/JavaScript
pushd runtime/JavaScript || exit
sudo npm install
sudo npm link
popd
popd || exit
echo "done packaging javascript runtime"
24 changes: 0 additions & 24 deletions .circleci/scripts/install-linux-libcurl3.sh

This file was deleted.

7 changes: 1 addition & 6 deletions .circleci/scripts/install-linux-php.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/bash

set -euo pipefail

sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
Expand All @@ -15,8 +13,5 @@ sudo apt install php8.0-mbstring
sudo apt install php8.0-xml
php -v


git clone https://github.com/antlr/antlr-php-runtime.git runtime/PHP
composer install -d runtime/PHP

mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
composer install -d runtime/PHP
2 changes: 0 additions & 2 deletions .circleci/scripts/install-linux-python2.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/bash

set -euo pipefail

echo "installing python 2..."
sudo apt-get update -y
sudo apt-get install python2
Expand Down
2 changes: 0 additions & 2 deletions .circleci/scripts/install-linux-python3.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#!/bin/bash

set -euo pipefail

echo "installing python 3..."
sudo apt-get update -y
sudo apt-get install python3
Expand Down
29 changes: 6 additions & 23 deletions .circleci/scripts/install-linux-swift.sh
Original file line number Diff line number Diff line change
@@ -1,36 +1,19 @@
#!/bin/bash

set -euo pipefail

echo "installing swift SDK..."

.circleci/scripts/install-linux-libcurl3.sh
sudo apt update && sudo apt upgrade
sudo apt install binutils git gnupg2 libc6-dev libcurl4 libedit2 libgcc-9-dev libpython2.7 libsqlite3-0 libstdc++-9-dev libxml2 libz3-dev pkg-config tzdata zlib1g-dev

# see https://tecadmin.net/install-swift-ubuntu-1604-xenial/
sudo apt-get update -y
sudo apt-get install clang libicu-dev
sudo apt-get install libpython2.7 libpython2.7-dev
wget https://download.swift.org/swift-5.6.2-release/ubuntu2004/swift-5.6.2-RELEASE/swift-5.6.2-RELEASE-ubuntu20.04.tar.gz

export SWIFT_VERSION=swift-5.3.2
echo "installing gpg key..."
wget -q -O - https://swift.org/keys/all-keys.asc | sudo gpg --import -
echo "downloading SDK gpg key..."
SWIFT_SDK=https://swift.org/builds/$SWIFT_VERSION-release/ubuntu1604/$SWIFT_VERSION-RELEASE/$SWIFT_VERSION-RELEASE-ubuntu16.04.tar.gz
echo $SWIFT_SDK
wget -q $SWIFT_SDK
sudo tar xzf $SWIFT_VERSION-RELEASE-ubuntu16.04.tar.gz
mv $SWIFT_VERSION-RELEASE-ubuntu16.04 $PWD/swift
tar xzf swift-5.6.2-RELEASE-ubuntu20.04.tar.gz

export SWIFT_HOME=$PWD/swift/$SWIFT_VERSION-RELEASE-ubuntu16.04/usr/bin/
export PATH=$PWD/swift/usr/bin:$PATH
sudo mv swift-5.6.2-RELEASE-ubuntu20.04 /usr/share/swift

# This would fix a know linker issue mentioned in: # https://bugs.swift.org/browse/SR-2299
sudo ln -sf ld.gold /usr/bin/ld
# This would fix missing libtinfo.so.5
sudo apt install libncurses5
export PATH=$PATH:/usr/share/swift/usr/bin

echo "done installing swift SDK..."

# check swift
swift --version
swift build --version
8 changes: 0 additions & 8 deletions .circleci/scripts/run-tests-cpp.sh

This file was deleted.

11 changes: 0 additions & 11 deletions .circleci/scripts/run-tests-dart.sh

This file was deleted.

8 changes: 0 additions & 8 deletions .circleci/scripts/run-tests-dotnet.sh

This file was deleted.

11 changes: 0 additions & 11 deletions .circleci/scripts/run-tests-go.sh

This file was deleted.

17 changes: 2 additions & 15 deletions .circleci/scripts/run-tests-javascript.sh
Original file line number Diff line number Diff line change
@@ -1,24 +1,11 @@
#!/bin/bash

set -euo pipefail

declare -i RESULT=0

pushd runtime/JavaScript

pushd runtime/JavaScript || exit
echo "running jasmine tests..."
npm test
RESULT+=$?

popd

pushd runtime-testsuite

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

popd
popd || exit

exit $RESULT
12 changes: 0 additions & 12 deletions .circleci/scripts/run-tests-php.sh

This file was deleted.

10 changes: 0 additions & 10 deletions .circleci/scripts/run-tests-python2.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#!/bin/bash

set -euo pipefail

python2 --version

# TODO: https://github.com/antlr/antlr4/issues/3521
#
# pushd runtime/Python2/tests
Expand All @@ -14,9 +10,3 @@ python2 --version
# echo "failed running native tests"
# fi
# popd

pushd runtime-testsuite
echo "running maven tests..."
export MAVEN_OPTS="-Xmx8g"
mvn -Dtest=python2.** test
popd
10 changes: 0 additions & 10 deletions .circleci/scripts/run-tests-python3.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#!/bin/bash

set -euo pipefail

python3 --version

# TODO: https://github.com/antlr/antlr4/issues/3521
#
# pushd runtime/Python3/tests
Expand All @@ -14,9 +10,3 @@ python3 --version
# echo "failed running native tests"
# fi
# popd

pushd runtime-testsuite
echo "running maven tests..."
export MAVEN_OPTS="-Xmx8g"
mvn -Dtest=python3.** test
popd
10 changes: 0 additions & 10 deletions .circleci/scripts/run-tests-swift.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#!/bin/bash

# Appears to be unused

set -euo pipefail

# TODO: https://github.com/antlr/antlr4/issues/3521
#
# pushd runtime/Swift
Expand All @@ -14,9 +10,3 @@ set -euo pipefail
# echo "failed running native tests"
# fi
# popd

pushd runtime-testsuite
echo "running maven tests..."
export MAVEN_OPTS="-Xmx8g"
mvn -Dtest=swift.** test
popd
Loading