Merge pull request #2465 from bsig-gh-bot/8.32.1-snapshot-sf0qqz77h6 #6
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
# Tests PRs on multiple operating systems and Java versions | |
name: Build Chain | |
on: | |
push: | |
branches: | |
- main | |
- 8.* | |
paths-ignore: | |
- 'LICENSE*' | |
- '.gitignore' | |
- '**.md' | |
- '**.adoc' | |
- '*.txt' | |
- '.ci/**' | |
pull_request: | |
types: [opened, synchronize, reopened, labeled] | |
branches: | |
- main | |
- 8.* | |
paths-ignore: | |
- 'LICENSE*' | |
- '.gitignore' | |
- '**.md' | |
- '**.adoc' | |
- '*.txt' | |
- '.ci/**' | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
os-prep: | |
runs-on: ubuntu-latest | |
outputs: | |
os: ${{ steps.set-os.outputs.operating-systems }} | |
steps: | |
- name: OS Preparation | |
id: set-os | |
uses: kiegroup/kogito-pipelines/.ci/actions/os-preparation@main | |
build-chain: | |
needs: os-prep | |
concurrency: | |
group: pull_request-${{ github.event_name }}-${{ github.head_ref }}-${{ matrix.os }}-${{ matrix.java-version }} | |
cancel-in-progress: true | |
strategy: | |
matrix: | |
os: ${{ fromJSON(needs.os-prep.outputs.os) }} | |
java-version: [ 11, 17, 19 ] | |
maven-version: [ '3.8.6' ] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
name: ${{ matrix.os }} - Java ${{ matrix.java-version }} - Maven | |
timeout-minutes: 120 | |
steps: | |
- name: Clean Disk Space | |
uses: kiegroup/kogito-pipelines/.ci/actions/ubuntu-disk-space@main | |
if: ${{ matrix.os == 'ubuntu-latest' }} | |
- name: Support long paths | |
if: ${{ matrix.os == 'windows-latest' }} | |
uses: kiegroup/kogito-pipelines/.ci/actions/long-paths@main | |
- name: Java and Maven Setup | |
uses: kiegroup/kogito-pipelines/.ci/actions/maven@main | |
with: | |
java-version: ${{ matrix.java-version }} | |
maven-version: ${{ matrix.maven-version }} | |
cache-key-prefix: ${{ runner.os }}-${{ matrix.java-version }}-maven${{ matrix.maven-version }} | |
- name: Set FLOW_TYPE to pull-request | |
if: github.event_name == 'pull_request' | |
run: echo "FLOW_TYPE=pull-request" >> $GITHUB_ENV | |
- name: Set FLOW_TYPE to branch | |
if: github.event_name == 'push' | |
run: echo "FLOW_TYPE=branch" >> $GITHUB_ENV | |
- name: Build Chain | |
uses: kiegroup/kogito-pipelines/.ci/actions/build-chain@main | |
with: | |
definition-file: https://raw.githubusercontent.com/${GROUP:kiegroup}/optaplanner/${BRANCH:main}/.ci/buildchain-config.yaml | |
annotations-prefix: ${{ runner.os }}-${{ matrix.java-version }}/${{ matrix.maven-version }} | |
starting-project: kiegroup/optaplanner | |
flow-type: ${{ env.FLOW_TYPE }} | |
github-token: "${{ secrets.GITHUB_TOKEN }}" | |
- name: Surefire Report | |
uses: kiegroup/kogito-pipelines/.ci/actions/surefire-report@main | |
if: ${{ always() }} | |
with: | |
report_paths: '**/*-reports/TEST-*.xml' |