You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by sj...@apache.org on 2024/05/11 13:43:33 UTC

(maven-gh-actions-shared) branch extract-verify-steps updated (5da8350 -> 406ec3e)

This is an automated email from the ASF dual-hosted git repository.

sjaranowski pushed a change to branch extract-verify-steps
in repository https://gitbox.apache.org/repos/asf/maven-gh-actions-shared.git


 discard 5da8350  Extract verify steps to separate action - preparation for Maven 4
     new 406ec3e  Extract verify steps to separate action - preparation for Maven 4

This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version.  This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:

 * -- * -- B -- O -- O -- O   (5da8350)
            \
             N -- N -- N   refs/heads/extract-verify-steps (406ec3e)

You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.

Any revisions marked "omit" are not gone; other references still
refer to them.  Any revisions marked "discard" are gone forever.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .github/workflows/maven-verify.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


(maven-gh-actions-shared) 01/01: Extract verify steps to separate action - preparation for Maven 4

Posted by sj...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

sjaranowski pushed a commit to branch extract-verify-steps
in repository https://gitbox.apache.org/repos/asf/maven-gh-actions-shared.git

commit 406ec3e4569890d9a33197fef1c08c9cfb6b29d3
Author: Slawomir Jaranowski <s....@gmail.com>
AuthorDate: Sat May 11 15:35:24 2024 +0200

    Extract verify steps to separate action - preparation for Maven 4
    
    It allows us to use next verify job with Maven 4
---
 .github/actions/verify/action.yml  | 110 +++++++++++++++++++++++++++++++++++++
 .github/workflows/maven-verify.yml |  76 +++----------------------
 2 files changed, 118 insertions(+), 68 deletions(-)

diff --git a/.github/actions/verify/action.yml b/.github/actions/verify/action.yml
new file mode 100644
index 0000000..3b1683f
--- /dev/null
+++ b/.github/actions/verify/action.yml
@@ -0,0 +1,110 @@
+# 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: 'Verify'
+description: 'Shared steps for verify'
+inputs:
+  install-mercurial:
+    required: true
+
+  install-gpg:
+    required: true
+
+  jdk:
+    required: true
+
+  distribution:
+    required: true
+
+  maven:
+    required: true
+
+  maven-args:
+    required: true
+
+  verify-goal:
+    required: true
+
+  failure-upload-path:
+    required: true
+
+runs:
+  using: composite
+
+  steps:
+    # Some projects (like Maven SCM) need the command-line tools for all SCMs installed.
+    # Git and Subversion are installed on all by default.
+    # Mercurial is not installed on macOS.
+    # https://docs.github.com/en/actions/using-github-hosted-runners/customizing-github-hosted-runners#installing-software-on-macos-runners
+    - name: Install Mercurial (hg) on macOS
+      if: >
+        inputs.install-mercurial &&
+        runner.os == 'macOS'
+      run: |
+        brew install mercurial
+
+    - name: Install GnuPG
+      if: >
+        inputs.install-gpg &&
+        runner.os == 'Windows'
+      run: |
+        $env:PATH = "C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\chocolatey\bin"
+        [Environment]::SetEnvironmentVariable("Path", $env:PATH, "Machine")
+        choco install --yes gpg4win
+        echo "C:\Program Files (x86)\Gpg4win\..\GnuPG\bin" >> $env:GITHUB_PATH
+
+    - name: Check GnuPG
+      if: >
+        inputs.install-gpg
+      run: gpg --version
+
+    - name: Show free disk space
+      run: df -h
+      shell: bash
+
+    - name: Checkout
+      uses: actions/checkout@v4
+      with:
+        persist-credentials: false
+
+    - name: Set up JDK
+      uses: actions/setup-java@v4
+      with:
+        java-version: ${{ inputs.jdk }}
+        distribution: ${{ inputs.distribution }}
+        cache: 'maven'
+
+    - name: Set up Maven
+      run: mvn --errors --batch-mode --show-version org.apache.maven.plugins:maven-wrapper-plugin:3.3.1:wrapper "-Dmaven=${{ inputs.maven }}"
+
+    - name: Build with Maven
+      run: ./mvnw --errors --batch-mode --show-version ${{ inputs.maven-args }} ${{ inputs.verify-goal }}
+
+    - name: Upload artifact on failure
+      uses: actions/upload-artifact@v4
+      if: failure() && inputs.failure-upload-path != ''
+      with:
+        name: ${{ github.run_number }}-failure-${{ runner.os }}-${{ inputs.jdk }}-${{ inputs.distribution }}
+        path: ${{ inputs.failure-upload-path }}
+
+    - name: Show free disk space
+      if: always()
+      run: df -h
+      shell: bash
+
+    - name: Clean Ensuring no file handle remains open on windows
+      run: ./mvnw clean --errors --batch-mode --show-version
diff --git a/.github/workflows/maven-verify.yml b/.github/workflows/maven-verify.yml
index aaaf0cc..d3f6937 100644
--- a/.github/workflows/maven-verify.yml
+++ b/.github/workflows/maven-verify.yml
@@ -256,74 +256,14 @@ jobs:
           inputs.verify-goal != inputs.ff-goal
         run: echo ok
 
-      # Some projects (like Maven SCM) need the command-line tools for all SCMs installed.
-      # Git and Subversion are installed on all by default.
-      # Mercurial is not installed on macOS.
-      # https://docs.github.com/en/actions/using-github-hosted-runners/customizing-github-hosted-runners#installing-software-on-macos-runners
-      - name: Install Mercurial (hg) on macOS
-        if: >
-          inputs.install-mercurial &&
-          steps.should-run.conclusion == 'success' &&
-          matrix.os == 'macos-latest'
-        run: |
-          brew install mercurial
-
-      - name: Install GnuPG
-        if: >
-          inputs.install-gpg &&
-          steps.should-run.conclusion == 'success' &&
-          matrix.os == 'windows-latest'
-        run: |
-          $env:PATH = "C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\ProgramData\chocolatey\bin"
-          [Environment]::SetEnvironmentVariable("Path", $env:PATH, "Machine")
-          choco install --yes gpg4win
-          echo "C:\Program Files (x86)\Gpg4win\..\GnuPG\bin" >> $env:GITHUB_PATH
-
-      - name: Check GnuPG
-        if: >
-          inputs.install-gpg &&
-          steps.should-run.conclusion == 'success'
-        run: gpg --version
-
-      - name: Show free disk space
+      - uses: apache/maven-gh-actions-shared/.github/actions/verify@extract-verify-steps
         if: steps.should-run.conclusion == 'success'
-        run: df -h
-        shell: bash
-
-      - name: Checkout
-        if: steps.should-run.conclusion == 'success'
-        uses: actions/checkout@v4
         with:
-          persist-credentials: false
-
-      - name: Set up JDK
-        if: steps.should-run.conclusion == 'success'
-        uses: actions/setup-java@v4
-        with:
-          java-version: ${{ matrix.jdk }}
+          install-mercurial: ${{ inputs.install-mercurial }}
+          install-gpg: ${{ inputs.install-gpg }}
+          jdk: ${{ matrix.jdk }}
           distribution: ${{ matrix.distribution }}
-          cache: 'maven'
-
-      - name: Set up Maven
-        if: steps.should-run.conclusion == 'success'
-        run: mvn --errors --batch-mode --show-version org.apache.maven.plugins:maven-wrapper-plugin:3.2.0:wrapper "-Dmaven=${{ matrix.maven }}"
-
-      - name: Build with Maven
-        if: steps.should-run.conclusion == 'success'
-        run: ./mvnw --errors --batch-mode --show-version ${{ inputs.maven-args }} ${{ inputs.verify-goal }}
-
-      - name: Upload artifact on failure
-        uses: actions/upload-artifact@v4
-        if: steps.should-run.conclusion == 'success' && failure() && inputs.failure-upload-path != ''
-        with:
-          name: ${{ github.run_number }}-failure-${{ matrix.os }}-${{ matrix.jdk }}-${{ matrix.distribution }}
-          path: ${{ inputs.failure-upload-path }}
-
-      - name: Show free disk space
-        if: steps.should-run.conclusion == 'success' && always()
-        run: df -h
-        shell: bash
-
-      - name: Clean Ensuring no file handle remains open on windows
-        if: steps.should-run.conclusion == 'success'
-        run: ./mvnw clean --errors --batch-mode --show-version
+          maven: ${{ matrix.maven }}
+          maven-args: ${{ inputs.maven-args }}
+          verify-goal: ${{ inputs.verify-goal }}
+          failure-upload-path: ${{ inputs.failure-upload-path }}