This is an automated email from the ASF dual-hosted git repository. vy pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/logging-log4j2.git
commit 9588d88980b7e837a2a4d2d11ea8c0e8a5a1ce82 Author: Volkan Yazici <[email protected]> AuthorDate: Fri Jan 21 16:33:42 2022 +0100 Align GitHub Actions workflow with the one in release-2.x. --- .github/workflows/build.yml | 54 ++++++++++++++++++++++++++++++++ .github/workflows/main.yml | 75 --------------------------------------------- 2 files changed, 54 insertions(+), 75 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..3c003f3 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,54 @@ +name: build + +on: + push: + branches: + - master + - release-2.x + pull_request: + +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 JDK 11 + uses: actions/[email protected] + with: + distribution: 'temurin' + java-version: 11 + java-package: jdk + architecture: x64 + cache: 'maven' + + - name: Inspect environment (Linux) + if: runner.os == 'Linux' + run: env | grep '^JAVA' + + - name: Inspect environment (Windows) + if: runner.os == 'Windows' + run: set java + + - name: Inspect environment (MacOS) + if: runner.os == 'macOS' + run: env | grep '^JAVA' + + - name: Build with Maven + timeout-minutes: 60 + shell: bash + run: | + ./mvnw \ + --show-version --batch-mode --errors --no-transfer-progress \ + -DtrimStackTrace=false \ + -Dsurefire.rerunFailingTestsCount=2 \ + -Dlog4j2.junit.fileCleanerSleepPeriodMillis=1000 \ + --global-toolchains ".github/workflows/maven-toolchains.xml" diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index c5ffc27..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,75 +0,0 @@ -name: CI - -on: [push, pull_request] - -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 JDK 11 - uses: actions/[email protected] - with: - distribution: 'temurin' - java-version: 11 - java-package: jdk - architecture: x64 - cache: 'maven' - - - name: Inspect environment (Linux) - if: runner.os == 'Linux' - run: env | grep '^JAVA' - - - name: Build with Maven (Linux) - timeout-minutes: 60 - if: runner.os == 'Linux' - continue-on-error: true - run: ./mvnw -V -B --no-transfer-progress -e -DtrimStackTrace=false -Dmaven.test.failure.ignore=true -Dsurefire.rerunFailingTestsCount=1 - - - name: Inspect environment (Windows) - if: runner.os == 'Windows' - run: set java - - - name: Build with Maven (Windows) - timeout-minutes: 60 - if: runner.os == 'Windows' - continue-on-error: true - run: ./mvnw -V -B --no-transfer-progress -e "-DtrimStackTrace=false" "-Dmaven.test.failure.ignore=true" "-Dsurefire.rerunFailingTestsCount=1" "-Dlog4j2.junit.fileCleanerSleepPeriodMillis=1000" - - - name: Inspect environment (MacOS) - if: runner.os == 'macOS' - run: env | grep '^JAVA' - - - name: Build with Maven (MacOS) - timeout-minutes: 60 - if: runner.os == 'macOS' - continue-on-error: true - run: ./mvnw -V -B --no-transfer-progress -e -DtrimStackTrace=false -Dmaven.test.failure.ignore=true -Dsurefire.rerunFailingTestsCount=1 - - - name: Publish Test Results - # If the CI run is not initiated from the primary repository, it is highly likely that this is a PR from a user who doesn't have commit rights. - # Hence, skip this step to avoid permission failures. - if: github.repository == 'apache/logging-log4j2' - uses: scacap/action-surefire-report@v1 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - check_name: Test Report (${{ matrix.os }}) - report_paths: '**/*-reports/TEST-*.xml' - - - name: Upload Test Reports - # If the CI run is not initiated from the primary repository, it is highly likely that this is a PR from a user who doesn't have commit rights. - # Hence, skip this step to avoid permission failures. - if: github.repository == 'apache/logging-log4j2' - uses: actions/upload-artifact@v2 - with: - name: test-reports-${{ matrix.os }} - path: '**/*-reports'
