Merge pull request #340 from JohT/renovate/patch-equalsverifier.version #966
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
name: GraalVM Community Edition Continuous Integration | |
on: | |
push: | |
branches: | |
- master | |
# Ignore changes in documentation and native image agent results | |
# Need to contain git add parameters below. | |
paths-ignore: | |
- 'showcase-quarkus-eventsourcing/native-image-agent-results/**' | |
- '**/*.md' | |
- '**/*.txt' | |
- '.gitignore' | |
- '.gitattributes' | |
- 'renovate.json' | |
- 'changelogTemplate.mustache' | |
pull_request: | |
branches: | |
- master | |
# Ignore changes in documentation and native image agent results | |
paths-ignore: | |
- 'showcase-quarkus-eventsourcing/native-image-agent-results/**' | |
- '**/*.md' | |
- '**/*.txt' | |
- '.gitignore' | |
- '.gitattributes' | |
- 'renovate.json' | |
- 'changelogTemplate.mustache' | |
jobs: | |
native-image-build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
java: ['java17'] | |
env: | |
CI_COMMIT_MESSAGE: Automated native image agent results (CI) | |
CI_COMMIT_AUTHOR: ${{ github.event.repository.name }} Continuous Integration | |
GRAALVM_VERSION: 22.3.3 | |
steps: | |
- name: Checkout git repository | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.WORKFLOW_GIT_ACCESS_TOKEN }} | |
# Cache maven repository | |
- uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
# Download and prepare GraalVM Community Edition including native image tools | |
- name: Setup GraalVM Community Edition | |
uses: DeLaGuardo/[email protected] | |
with: | |
graalvm: ${{ env.GRAALVM_VERSION }} | |
java: ${{ matrix.java }} | |
- name: Install Native Image | |
run: gu install native-image | |
# Build the native image of the application. | |
- name: Build native image with Maven | |
working-directory: showcase-quarkus-eventsourcing | |
run: mvn verify --activate-profiles native --file pom.xml --batch-mode | |
# Disable native image agent traces since it produces corrupt JSON trace files. | |
# Details see: https://github.com/JohT/showcase-quarkus-eventsourcing/pull/247 | |
# | |
# # Run integration tests with activated native image agent to get trace and report files about e.g. reflection usage | |
# - name: Run integration tests on GraalVM with activated native-image-agent for trace file generation | |
# working-directory: showcase-quarkus-eventsourcing | |
# run: mvn verify --activate-profiles native-image-agent-trace --file pom.xml --batch-mode && sleep 4 | |
# - name: Generate configuration json files out of the native-image-agent trace output | |
# working-directory: showcase-quarkus-eventsourcing | |
# run: $GRAALVM_HOME/bin/native-image-configure generate --trace-input=target/native-image-agent-trace.json --output-dir=target/native-image-agent-trace-configs --caller-filter-file=native-image-caller-filter-rules.json | |
# # Assemble the name of the native image agent results directory based on Java, Axon, Quarkus and GraalVM version | |
# - name: Get the axon version from the maven pom variable and set the environment variable "axon-version" | |
# working-directory: showcase-quarkus-eventsourcing | |
# run: echo "axon-version=$(mvn -q help:evaluate -Dexpression=axon.version -DforceStdout | tr . -)" >> $GITHUB_ENV | |
# - name: Get the quarkus version from the maven pom variable and set the environment variable "quarkus-version" | |
# working-directory: showcase-quarkus-eventsourcing | |
# run: echo "quarkus-version=$(mvn -q help:evaluate -Dexpression=quarkus.platform.version -DforceStdout | tr . -)" >> $GITHUB_ENV | |
# - name: Get the GraalVM version with "-" instead of "." delimiters | |
# run: echo "graalvm-version-string=$(echo ${{ env.GRAALVM_VERSION }} | tr . -)" >> $GITHUB_ENV | |
# - name: Assemble the name of the directory for the native image agent output files and set the environment variable "native-image-agent-results-directory" | |
# run: echo "native-image-agent-results-directory=native-image-agent-results/${{ matrix.java }}-axon-${{ env.axon-version }}-quarkus-${{ env.quarkus-version }}-graalvm-${{ env.graalvm-version-string }}" >> $GITHUB_ENV | |
# # Create the directory with the previously assembled name within "native-image-agent-results" and fill in the result files. | |
# - name: Create the native image agent results directory | |
# working-directory: showcase-quarkus-eventsourcing | |
# run: mkdir -p ${{ env.native-image-agent-results-directory }} | |
# - name: Copy the native image agent trace file into the native image agent results directory | |
# working-directory: showcase-quarkus-eventsourcing | |
# run: cp target/native-image-agent-trace.json ${{ env.native-image-agent-results-directory }} | |
# - name: Copy the native image agent configuration files into the native image agent results directory | |
# working-directory: showcase-quarkus-eventsourcing | |
# run: cp --recursive target/native-image-agent-trace-configs/* ${{ env.native-image-agent-results-directory }} | |
# # Upload the native image agent results in case they are needed for troubleshooting for a couple of days | |
# - name: Archive native image agent results | |
# uses: actions/upload-artifact@v4 | |
# with: | |
# name: native-image-agent-results-${{ matrix.java }} | |
# path: showcase-quarkus-eventsourcing/${{ env.native-image-agent-results-directory }} | |
# if-no-files-found: error | |
# retention-days: 5 | |
# # Commit and push the native image agent results | |
# - name: Display environment variable "github.event_name" | |
# run: echo "github.event_name=${{ github.event_name }}" | |
# - name: Commit native image agent results | |
# working-directory: showcase-quarkus-eventsourcing | |
# # Only run when a pull request gets merged or a commit is pushed to the main branch | |
# # git add parameters need to match paths-ignore parameters above | |
# # Git pull before add/commit/push to reduce race conditions on parallel builds | |
# if: github.event_name == 'push' | |
# run: | | |
# git config --global user.name '${{ env.CI_COMMIT_AUTHOR }}' | |
# git config --global user.email '[email protected]' | |
# git pull | |
# git add ${{ env.native-image-agent-results-directory }} | |
# git commit -m "${{ env.CI_COMMIT_MESSAGE }}" | |
# git push |