Skip to content

Merge pull request #967 from gsmet/quarkus-3.3.2 #2294

Merge pull request #967 from gsmet/quarkus-3.3.2

Merge pull request #967 from gsmet/quarkus-3.3.2 #2294

Workflow file for this run

name: "CI Build"
on:
push:
branches-ignore:
- 'dependabot/**'
paths-ignore:
- '.gitignore'
- '*.md'
- '*.adoc'
- '*.txt'
- '.github/ISSUE_TEMPLATE/**'
pull_request:
paths-ignore:
- '.gitignore'
- '*.md'
- '*.adoc'
- '*.txt'
- '.github/ISSUE_TEMPLATE/**'
env:
LANG: en_US.UTF-8
jobs:
# This is a hack to work around a GitHub API limitation:
# when the PR is coming from another fork, the pull_requests field of the
# workflow_run payload is empty.
# For more details, see
# https://github.community/t/pull-request-attribute-empty-in-workflow-run-event-object-for-pr-from-forked-repo/154682
attach-pr-number:
runs-on: ubuntu-latest
name: Attach pull request number
if: github.event_name == 'pull_request'
steps:
- name: Create file
shell: bash
run: |
echo -n ${{ github.event.number }} > pull-request-number
- name: Upload pull request number
uses: actions/upload-artifact@v3
with:
name: pull-request-number-${{ github.event.number }}
path: pull-request-number
retention-days: 1
build:
name: Build - JDK ${{ matrix.java }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
java: [ 17 ]
steps:
- uses: actions/checkout@v3
- name: Reclaim Disk Space
run: .github/ci-prerequisites.sh
- name: Get Date
id: get-date
run: |
echo "date=$(/bin/date -u "+%Y-%m")" >> $GITHUB_OUTPUT
shell: bash
- name: Cache Maven Repository
id: cache-maven
uses: actions/cache@v3
with:
path: ~/.m2/repository
# refresh cache every month to avoid unlimited growth
key: maven-repo-pr-${{ runner.os }}-${{ steps.get-date.outputs.date }}
- name: Install JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: ${{ matrix.java }}
- name: Build with Maven
run: MAVEN_OPTS=-Xmx4096m && ./mvnw -B clean install --settings .github/mvn-settings.xml --fail-at-end
- name: Delete Local Artifacts From Cache
shell: bash
run: rm -rf ~/.m2/repository/io/quarkus/quarkus-universe-bom*
- name: Upload build reports (if build failed)
uses: actions/upload-artifact@v3
if: ${{ failure() || cancelled() }}
with:
name: "build-reports-Build - JDK ${{ matrix.java }}"
path: |
**/target/*-reports/TEST-*.xml
target/build-report.json
LICENSE
retention-days: 2
refresh:
name: Check generated project has been updated
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Get Date
id: get-date
run: |
echo "date=$(/bin/date -u "+%Y-%m")" >> $GITHUB_OUTPUT
shell: bash
- name: Cache Maven Repository
id: cache-maven
uses: actions/cache@v3
with:
path: ~/.m2/repository
# refresh cache every month to avoid unlimited growth
key: maven-repo-pr-${{ runner.os }}-${{ steps.get-date.outputs.date }}
- name: Install JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
distribution: temurin
java-version: 17
- name: Build with Maven
run: MAVEN_OPTS=-Xmx3072m && ./mvnw -B clean process-resources --settings .github/mvn-settings.xml
- name: Get changes
id: get-changes
run: |
echo "::set-output name=changes::$(git status -s | wc -l)"
shell: bash
- name: Display changes
run: |
git status
git --no-pager diff
shell: bash
- name: Check that generated project is properly updated
uses: actions/github-script@v6
if: ${{ steps.get-changes.outputs.changes > 0 }}
with:
script: |
throw new Error('Generated project needs an update. Please run ./mvnw -Dsync and include the result in your pull request.')