You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by pk...@apache.org on 2024/08/30 19:24:50 UTC
(logging-log4j-samples) 02/02: Add GraalVM integration test
This is an automated email from the ASF dual-hosted git repository.
pkarwasz pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/logging-log4j-samples.git
commit 8c5f41c52a448506b55606cc18d728e325e43d2d
Author: Piotr P. Karwasz <pi...@karwasz.org>
AuthorDate: Fri Aug 30 21:18:29 2024 +0200
Add GraalVM integration test
Add a test that verifies if the snapshots work with GraalVM.
Part of apache/logging-log4j2#2830.
---
.github/workflows/graalvm-test.yaml | 65 +++++++++++++++++++++++++++++++++++++
1 file changed, 65 insertions(+)
diff --git a/.github/workflows/graalvm-test.yaml b/.github/workflows/graalvm-test.yaml
new file mode 100644
index 0000000..73521a1
--- /dev/null
+++ b/.github/workflows/graalvm-test.yaml
@@ -0,0 +1,65 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to you under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+name: graalvm-test
+
+on:
+ workflow_dispatch:
+
+permissions: read-all
+
+jobs:
+
+ build:
+
+ runs-on: ${{ matrix.os }}
+
+ strategy:
+ fail-fast: false
+ matrix:
+ backend: [ jul, log4j-core, logback, simple ]
+ os: [ macos-latest, ubuntu-latest, windows-latest ]
+ version: [ "2.24.0-SNAPSHOT" ]
+
+ steps:
+
+ - name: Checkout repository
+ uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # 4.1.7
+ with:
+ # When running on `pull_request` use the PR branch, not the target branch
+ ref: ${{ github.event_name == 'pull_request_target' && github.head_ref || github.ref }}
+
+ - name: Setup GraalVM
+ uses: graalvm/setup-graalvm@22cc13fe88ef133134b3798e128fb208df55e1f5 # 1.2.3
+ with:
+ java-version: '21'
+
+
+ # We could have used `verify`, but `clean install` is required while generating the build reproducibility report, which is performed in the next step.
+ # For details, see: https://maven.apache.org/guides/mini/guide-reproducible-builds.html#how-to-test-my-maven-build-reproducibility
+ - name: Build
+ id: build
+ shell: bash
+ env:
+ LOG4J_VERSION: ${{ matrix.version }}
+ MAVEN_PROFILE: use-${{ matrix.backend }}
+ run: |
+ ./mvnw -f log4j-samples-graalvm \
+ --show-version --batch-mode --errors --no-transfer-progress \
+ -Dlog4j.version=$LOG4J_VERSION \
+ -P$MAVEN_PROFILE
+ clean verify