Merge pull request #3048 from antlr/implement-dotnet-ci-omacosx

all MacOSX builds now work using self-hosted Github actions workflow
This commit is contained in:
ericvergnaud 2021-01-24 18:01:01 +08:00 committed by GitHub
commit b2b1793700
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
8 changed files with 34 additions and 34 deletions

View File

@ -23,4 +23,8 @@ JDK (we need a specific JDK):
sudo rm -fr /Library/PreferencePanes/JavaControlPanel.prefpane
C++:
- brew install cmake
- brew install cmake
C#:
- .github/scripts/install-dotnet-on-osx.sh
(you need to repeat this step for each user account)

23
.github/scripts/run-tests-dotnet.sh vendored Executable file
View File

@ -0,0 +1,23 @@
#!/bin/bash
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
cd runtime-testsuite/
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

View File

@ -11,6 +11,7 @@ fi
# run java tests
cd runtime-testsuite/
if [ $GROUP == "LEXER" ]; then
mvn -X -e -q -Dgroups="org.antlr.v4.test.runtime.category.LexerTests" -Dtest="swift.*" test
elif [ $GROUP == "PARSER" ]; then

View File

@ -1,28 +0,0 @@
name: Java/MacOSX
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: [self-hosted, macOS, x64]
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8
- name: Set up Maven
uses: stCarolas/setup-maven@v4
with:
maven-version: 3.5.4
- name: Build tool with Maven
run: mvn install -DskipTests=true -Dmaven.javadoc.skip=true -B -V
- name: Test with Maven
run: .github/scripts/run-tests-java.sh
env:
TARGET: swift
GROUP: ALL

View File

@ -12,10 +12,8 @@ jobs:
strategy:
fail-fast: false
matrix:
# GROUP: [LEXER, PARSER, RECURSION]
# TARGET: [swift, cpp, dotnet]
GROUP: [LEXER]
TARGET: [dotnet]
GROUP: [LEXER, PARSER, RECURSION]
TARGET: [swift, cpp, dotnet]
steps:
- uses: actions/checkout@v2
- name: Set up JDK 1.8

View File

@ -1,6 +1,6 @@
# ANTLR v4
[![Build Travis-CI Status](https://travis-ci.org/antlr/antlr4.svg?branch=master)](https://travis-ci.org/antlr/antlr4) [![Build AppVeyor Status](https://ci.appveyor.com/api/projects/status/5acpbx1pg7bhgh8v/branch/master?svg=true)](https://ci.appveyor.com/project/parrt/antlr4) [![Java 7+](https://img.shields.io/badge/java-7+-4c7e9f.svg)](http://java.oracle.com) [![License](https://img.shields.io/badge/license-BSD-blue.svg)](https://raw.githubusercontent.com/antlr/antlr4/master/LICENSE.txt)
[![Github Build Status (MacOSX)](https://github.com/antlr/antlr4/workflows/MacOSX/badge.svg)](https://github.com/antlr/antlr4/actions) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/5acpbx1pg7bhgh8v/branch/master?svg=true)](https://ci.appveyor.com/project/parrt/antlr4) [![Java 7+](https://img.shields.io/badge/java-7+-4c7e9f.svg)](http://java.oracle.com) [![License](https://img.shields.io/badge/license-BSD-blue.svg)](https://raw.githubusercontent.com/antlr/antlr4/master/LICENSE.txt)
**ANTLR** (ANother Tool for Language Recognition) is a powerful parser generator for reading, processing, executing, or translating structured text or binary files. It's widely used to build languages, tools, and frameworks. From a grammar, ANTLR generates a parser that can build parse trees and also generates a listener interface (or visitor) that makes it easy to respond to the recognition of phrases of interest.

View File

@ -114,6 +114,7 @@ public class BaseCppTest implements RuntimeTestSupport {
@Override
public void beforeTest(RuntimeTestDescriptor descriptor) {
System.out.println(descriptor.getTestName());
}
@Override

View File

@ -142,6 +142,7 @@ public class BaseCSharpTest implements RuntimeTestSupport {
@Override
public void beforeTest(RuntimeTestDescriptor descriptor) {
System.out.println(descriptor.getTestName());
}
@Override