manual.yaml 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. # Licensed to the Apache Software Foundation (ASF) under one
  2. # or more contributor license agreements. See the NOTICE file
  3. # distributed with this work for additional information
  4. # regarding copyright ownership. The ASF licenses this file
  5. # to you under the Apache License, Version 2.0 (the
  6. # "License"); you may not use this file except in compliance
  7. # with the License. You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing,
  12. # software distributed under the License is distributed on an
  13. # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  14. # KIND, either express or implied. See the License for the
  15. # specific language governing permissions and limitations
  16. # under the License.
  17. # This workflow will build a Java project with Maven
  18. # See also:
  19. # https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
  20. # https://docs.github.com/en/actions/reference/events-that-trigger-workflows#manual-events
  21. name: Manual Build
  22. on:
  23. workflow_dispatch:
  24. inputs:
  25. buildRef:
  26. description: Ref to build (commit, branch, or refs/pull/1234/head or refs/pull/1234/merge)
  27. required: true
  28. default: refs/pull/1234/merge
  29. mvnOpts:
  30. description: Maven options
  31. required: true
  32. default: --fail-at-end
  33. goals:
  34. description: Maven goals
  35. required: true
  36. default: -Pfull-build apache-rat:check verify -DskipTests spotbugs:check checkstyle:check javadoc:jar
  37. jobs:
  38. mvn:
  39. name: mvn (triggered by ${{ github.event.sender.login }})
  40. timeout-minutes: 360
  41. runs-on: ubuntu-latest
  42. steps:
  43. - uses: actions/checkout@v4
  44. with:
  45. ref: ${{ github.event.inputs.buildRef }}
  46. - name: Set up JDK 11
  47. uses: actions/setup-java@v4
  48. with:
  49. java-version: 11
  50. distribution: temurin
  51. cache: 'maven'
  52. - name: Show the first log message
  53. run: git log -n1
  54. - name: Install C Dependencies
  55. run: |
  56. sudo apt update
  57. sudo apt install -y libcppunit-dev libsasl2-dev
  58. - name: Build with Maven
  59. run: mvn -B -V -e -ntp "-Dstyle.color=always" ${{ github.event.inputs.mvnOpts }} ${{ github.event.inputs.goals }}
  60. env:
  61. MAVEN_OPTS: -Djansi.force=true
  62. - name: Upload unit test results
  63. if: ${{ failure() }}
  64. uses: actions/upload-artifact@v4
  65. with:
  66. name: surefire-reports
  67. path: ./**/target/surefire-reports/
  68. if-no-files-found: ignore
  69. - name: Upload integration test results
  70. if: ${{ failure() }}
  71. uses: actions/upload-artifact@v4
  72. with:
  73. name: failsafe-reports
  74. path: ./**/target/failsafe-reports/
  75. if-no-files-found: ignore