Skip to content

Commit

Permalink
Merge pull request #36 from matsim-scenarios/develop
Browse files Browse the repository at this point in the history
Merge for release 2.0
  • Loading branch information
paulheinr authored Nov 7, 2024
2 parents f6e65b8 + e929194 commit 0914f46
Show file tree
Hide file tree
Showing 106 changed files with 7,205 additions and 1,367 deletions.
21 changes: 21 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

root = true

[*]
charset = utf-8
end_of_line = lf


[*.java]
indent_style = tab
insert_final_newline = true
trim_trailing_whitespace = true
max_line_length = 150


[*.{xml, xsd, dtd}]
max_line_length = off
indent_style = tab
trim_trailing_whitespace = true
insert_final_newline = true
indent_size = 4
85 changes: 72 additions & 13 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,97 @@
name: build

on: [ push, pull_request ]
on: push

jobs:
build:

checkstyle:
#run if push or pull_requests from fork
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
name: Checkstyle

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 21
architecture: x64
distribution: adopt
cache: maven

- name: Checkstyle
run: mvn --batch-mode --update-snapshots checkstyle:checkstyle

enforce:
#run if push or pull_requests from fork
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
name: Maven Dependencies

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 21
architecture: x64
distribution: adopt
cache: maven

- name: Package
run: mvn --batch-mode --update-snapshots enforcer:enforce

test:
#run if push or pull_requests from fork
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
name: Tests

runs-on: ubuntu-latest
timeout-minutes: 45

strategy:
fail-fast: false
matrix:
java: [ 17 ]
java: [21]

steps:
- uses: actions/checkout@v3
- name: Set up JDK
uses: actions/setup-java@v3
- uses: actions/setup-java@v3
with:
java-version: ${{ matrix.java }}
architecture: x64
distribution: zulu
distribution: adopt
cache: maven

- name: Test
run: mvn --batch-mode --update-snapshots test -Dmatsim.preferLocalDtds=true -Dmaven.javadoc.skip -e
- uses: actions/upload-artifact@v3
with:
name: test-coverage
path: target/site/jacoco/

- name: Cache Maven packages
uses: actions/cache@v3
package:
#run if push or pull_requests from fork
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
needs: [checkstyle, enforce, test]
name: Package

runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2
java-version: 21
architecture: x64
distribution: adopt
cache: maven

- name: Package
run: mvn -B package --file pom.xml -Dmatsim.preferLocalDtds=true -Dmaven.javadoc.skip -e
run: mvn --batch-mode --update-snapshots package -DskipTests -Dmatsim.preferLocalDtds=true -Dmaven.javadoc.skip -e
- run: mkdir staging && cp *.jar staging
- uses: actions/upload-artifact@v3
with:
name: Package
path: staging

env:
MAVEN_OPTS: -Xmx10G
MAVEN_OPTS: -Xmx512m
12 changes: 7 additions & 5 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
name: Publish package to GitHub Packages
name: Publish package
on:
release:
types: [ created ]
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 17
distribution: zulu
java-version: 21
architecture: x64
distribution: adopt

- name: Publish package
run: mvn --batch-mode deploy
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

env:
MAVEN_OPTS: -Xmx10G
MAVEN_OPTS: -Xmx512m
117 changes: 0 additions & 117 deletions .mvn/wrapper/MavenWrapperDownloader.java

This file was deleted.

20 changes: 18 additions & 2 deletions .mvn/wrapper/maven-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,2 +1,18 @@
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.6.3/apache-maven-3.6.3-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/io/takari/maven-wrapper/0.5.6/maven-wrapper-0.5.6.jar
# 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.
distributionUrl=https://repo.maven.apache.org/maven2/org/apache/maven/apache-maven/3.9.5/apache-maven-3.9.5-bin.zip
wrapperUrl=https://repo.maven.apache.org/maven2/org/apache/maven/wrapper/maven-wrapper/3.2.0/maven-wrapper-3.2.0.jar
Loading

0 comments on commit 0914f46

Please sign in to comment.