-
Notifications
You must be signed in to change notification settings - Fork 465
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5648 from chengfang/manual-ci
WFCORE-6478 Enable manual start of github actions CI workflow
- Loading branch information
Showing
1 changed file
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
# Manually start a build and/or testing with maven | ||
# For more information, see https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven | ||
name: Manual Build and Test | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
os: | ||
description: 'OS' | ||
required: false | ||
default: 'ubuntu-latest' | ||
type: choice | ||
options: | ||
- ubuntu-latest | ||
- windows-latest | ||
jdk-distribution: | ||
description: 'JDK Distribution' | ||
required: false | ||
default: 'temurin' | ||
type: choice | ||
options: | ||
- temurin | ||
- semeru | ||
- microsoft | ||
- oracle | ||
- zulu | ||
- corretto | ||
- liberica | ||
jdk-version: | ||
description: 'JDK Version' | ||
required: true | ||
type: string | ||
args: | ||
description: 'Arguments like -DskipTests -pl testbom,threads -am' | ||
required: false | ||
type: string | ||
timeout: | ||
description: 'Job Timeout Minutes' | ||
required: false | ||
default: 120 | ||
type: number | ||
|
||
jobs: | ||
build: | ||
name: Build and Test | ||
runs-on: ${{ inputs.os }} | ||
timeout-minutes: ${{ fromJSON(inputs.timeout) }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up JDK ${{ inputs.jdk-distribution }} ${{ inputs.jdk-version }} | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: ${{ inputs.jdk-distribution }} | ||
java-version: ${{ inputs.jdk-version }} | ||
cache: 'maven' | ||
- name: Build and test with Maven | ||
run: mvn -B -ntp clean install ${{ inputs.args }} | ||
- uses: actions/upload-artifact@v3 | ||
if: failure() | ||
with: | ||
name: ${{ inputs.jdk-distribution }}-${{ inputs.jdk-version }}-${{ inputs.os }} | ||
path: '**/surefire-reports/*.txt' |