Test GraalVM native image #641
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: Test GraalVM native image | |
on: | |
schedule: | |
- cron: '0 4 * * *' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-24.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Checkout tls-gen | |
uses: actions/checkout@v4 | |
with: | |
repository: rabbitmq/tls-gen | |
path: './tls-gen' | |
- name: Checkout GraalVM test project | |
uses: actions/checkout@v4 | |
with: | |
repository: rabbitmq/rabbitmq-stream-graal-vm-test | |
path: './rabbitmq-stream-graal-vm-test' | |
- name: Set up GraalVM | |
uses: graalvm/setup-graalvm@v1 | |
with: | |
version: 'latest' | |
java-version: '21' | |
cache: 'maven' | |
- name: Start broker | |
run: ci/start-broker.sh | |
- name: Install client JAR file | |
run: | | |
./mvnw clean install -Psnapshots -DskipITs -DskipTests -Dgpg.skip=true --no-transfer-progress | |
export ARTEFACT_VERSION=$(cat pom.xml | grep -oPm1 "(?<=<version>)[^<]+") | |
echo "artefact_version=$ARTEFACT_VERSION" >> $GITHUB_ENV | |
- name: Package test application | |
working-directory: rabbitmq-stream-graal-vm-test | |
run: | | |
./mvnw --version | |
echo "Using RabbitMQ Stream Java Client ${{ env.artefact_version }}" | |
./mvnw clean package -Dstream-client.version=${{ env.artefact_version }} --no-transfer-progress | |
- name: Use native image program | |
working-directory: rabbitmq-stream-graal-vm-test | |
run: target/rabbitmq-stream-graal-vm-test | |
- name: Stop broker | |
run: docker stop rabbitmq && docker rm rabbitmq |