Skip to content

Commit

Permalink
#229 - Switch from Jenkins to GH actions
Browse files Browse the repository at this point in the history
- Upgrade DKPro Parent POM
- Allow building with Java 11+
- Add GH actions

(cherry picked from commit 7d8b6c3)
  • Loading branch information
rzo1 authored Oct 19, 2023
1 parent 0a0304b commit 4b5d2d2
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 9 deletions.
44 changes: 44 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Java CI

on: [push, pull_request]

jobs:
build:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
strategy:
matrix:
os: [ubuntu-latest]
java: [ 11, 17, 21 ]
experimental: [false]

steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{ matrix.java }}
- name: Build with Maven
run: mvn -V clean test --no-transfer-progress
11 changes: 7 additions & 4 deletions de.tudarmstadt.ukp.wikipedia.api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,10 @@
<groupId>com.neovisionaries</groupId>
<artifactId>nv-i18n</artifactId>
</dependency>

<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
</dependency>
<!-- logger dependencies -->
<dependency>
<groupId>org.slf4j</groupId>
Expand Down Expand Up @@ -179,7 +182,7 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<forkMode>once</forkMode>
<argLine>@{jacoco.argLine} -Xms256m -Xmx384m -XX:+CMSClassUnloadingEnabled -Dfile.encoding=UTF-8</argLine>
<argLine>@{jacoco.argLine} -Xms256m -Xmx384m -Dfile.encoding=UTF-8 --add-opens=java.base/java.lang=ALL-UNNAMED</argLine>
<!-- Show 100% of the lines from the stack trace (doesn't work) -->
<trimStackTrace>false</trimStackTrace>
<includes>
Expand Down Expand Up @@ -260,7 +263,7 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<forkMode>once</forkMode>
<argLine>-Xms256m -Xmx256m -XX:+CMSClassUnloadingEnabled -Dfile.encoding=UTF-8</argLine>
<argLine>-Xms256m -Xmx256m -Dfile.encoding=UTF-8 --add-opens=java.base/java.lang=ALL-UNNAMED</argLine>
<!-- Show 100% of the lines from the stack trace (doesn't work) -->
<trimStackTrace>false</trimStackTrace>
<includes>
Expand All @@ -278,7 +281,7 @@
<artifactId>maven-failsafe-plugin</artifactId>
<version>${maven.failsafe.plugin}</version>
<configuration>
<argLine>-Xms256m -Xmx384m -XX:+CMSClassUnloadingEnabled -Dfile.encoding=UTF-8</argLine>
<argLine>-Xms256m -Xmx384m -Dfile.encoding=UTF-8</argLine>
</configuration>
<executions>
<execution>
Expand Down
12 changes: 12 additions & 0 deletions de.tudarmstadt.ukp.wikipedia.parser/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,16 @@ Please use the SWEBLE parser (http://sweble.org/) for parsing MediaWiki markup.
<scope>test</scope>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Xms256m -Xmx256m -Dfile.encoding=UTF-8 --add-opens=java.base/java.lang=ALL-UNNAMED</argLine>
</configuration>
</plugin>
</plugins>
</build>
</project>
13 changes: 10 additions & 3 deletions de.tudarmstadt.ukp.wikipedia.revisionmachine/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@
<artifactId>mysql-connector-java</artifactId>
</dependency>
</dependencies>
<build>
<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
Expand All @@ -89,8 +89,15 @@
</descriptors>
</configuration>
</execution>
</executions>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Xms256m -Xmx256m -Dfile.encoding=UTF-8 --add-opens=java.base/java.lang=ALL-UNNAMED</argLine>
</configuration>
</plugin>
</plugins>
</build>
</build>
</project>
9 changes: 7 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
<parent>
<groupId>org.dkpro</groupId>
<artifactId>dkpro-parent-pom</artifactId>
<version>19</version>
<version>29</version>
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down Expand Up @@ -264,7 +264,7 @@
<dependency>
<groupId>org.javassist</groupId>
<artifactId>javassist</artifactId>
<version>3.22.0-GA</version>
<version>3.29.2-GA</version>
</dependency>
<dependency>
<groupId>org.sweble.wikitext</groupId>
Expand Down Expand Up @@ -296,6 +296,11 @@
<artifactId>commons-lang</artifactId>
<version>2.6</version>
</dependency>
<dependency>
<groupId>jakarta.xml.bind</groupId>
<artifactId>jakarta.xml.bind-api</artifactId>
<version>2.3.3</version>
</dependency>
</dependencies>
</dependencyManagement>
<profiles>
Expand Down

0 comments on commit 4b5d2d2

Please sign in to comment.