This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch release-2.x in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit 45138174ea99f246a6223c0c9cdd2666714821f8 Author: Volkan Yazıcı <volkan.yaz...@gmail.com> AuthorDate: Thu Aug 20 15:58:49 2020 +0200 Add GitHub Actions CI support to release-2.x branch. --- .github/workflows/maven-toolchains.xml | 37 +++++++++++++++ .github/workflows/maven.yml | 87 ++++++++++++++++++++++++++++++++++ 2 files changed, 124 insertions(+) diff --git a/.github/workflows/maven-toolchains.xml b/.github/workflows/maven-toolchains.xml new file mode 100644 index 0000000..066a50f --- /dev/null +++ b/.github/workflows/maven-toolchains.xml @@ -0,0 +1,37 @@ +<?xml version="1.0" encoding="UTF8"?> +<!-- + ~ 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. + --> +<toolchains> + <toolchain> + <type>jdk</type> + <provides> + <version>1.8</version> + </provides> + <configuration> + <jdkHome>${env.JAVA_HOME_8_X64}</jdkHome> + </configuration> + </toolchain> + <toolchain> + <type>jdk</type> + <provides> + <version>11</version> + </provides> + <configuration> + <jdkHome>${env.JAVA_HOME_11_X64}</jdkHome> + </configuration> + </toolchain> +</toolchains> diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml new file mode 100644 index 0000000..b99a32e --- /dev/null +++ b/.github/workflows/maven.yml @@ -0,0 +1,87 @@ +name: Maven + +on: [push] + +jobs: + build: + + runs-on: ${{ matrix.os }} + + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macos-latest] + + steps: + + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Setup Maven caching + uses: actions/cache@v2 + with: + path: ~/.m2/repository + key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} + restore-keys: | + ${{ runner.os }}-maven- + + - name: Setup JDK 11 + uses: actions/setup-java@v1 + with: + java-version: 11 + java-package: jdk + architecture: x64 + + - name: Setup JDK 8 + uses: actions/setup-java@v1 + with: + java-version: 8 + java-package: jdk + architecture: x64 + + - name: Inspect environment (Linux) + if: runner.os == 'Linux' + run: env | grep '^JAVA' + + - name: Build with Maven (Linux) + if: runner.os == 'Linux' + run: ./mvnw -V -B -e -DtrimStackTrace=false -Dmaven.test.failure.ignore=true -Dsurefire.rerunFailingTestsCount=1 --global-toolchains .github/workflows/maven-toolchains.xml verify + + - name: Publish Test Results (Linux) + if: runner.os == 'Linux' + uses: scacap/action-surefire-report@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + check_name: 'Test Report (Linux)' + report_paths: '**/*-reports/TEST-*.xml' + + - name: Inspect environment (Windows) + if: runner.os == 'Windows' + run: set java + + - name: Build with Maven (Windows) + if: runner.os == 'Windows' + run: ./mvnw -V -B -e -DtrimStackTrace=false "-Dmaven.test.failure.ignore=true" "-Dsurefire.rerunFailingTestsCount=1" --global-toolchains ".github\workflows\maven-toolchains.xml" verify + + - name: Publish Test Results (Windows) + if: runner.os == 'Windows' + uses: scacap/action-surefire-report@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + check_name: 'Test Report (Windows)' + report_paths: '**/*-reports/TEST-*.xml' + + - name: Inspect environment (MacOS) + if: runner.os == 'macOS' + run: env | grep '^JAVA' + + - name: Build with Maven (MacOS) + if: runner.os == 'macOS' + run: ./mvnw -V -B -e -DtrimStackTrace=false -Dmaven.test.failure.ignore=true -Dsurefire.rerunFailingTestsCount=1 --global-toolchains .github/workflows/maven-toolchains.xml verify + + - name: Publish Test Results (MacOS) + if: runner.os == 'macOS' + uses: scacap/action-surefire-report@v1 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + check_name: 'Test Report (MacOS)' + report_paths: '**/*-reports/TEST-*.xml'