From b893dc0ce4b51fa4beed833a9fe338be122db663 Mon Sep 17 00:00:00 2001 From: Robert Stupp Date: Wed, 23 Apr 2025 16:23:09 +0200 Subject: [PATCH] [Benchmarks] Add CI --- .github/workflows/benchmarks-main.yml | 67 +++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 .github/workflows/benchmarks-main.yml diff --git a/.github/workflows/benchmarks-main.yml b/.github/workflows/benchmarks-main.yml new file mode 100644 index 00000000..136ce5e4 --- /dev/null +++ b/.github/workflows/benchmarks-main.yml @@ -0,0 +1,67 @@ +# +# 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: Benchmarks CI + +on: + push: + branches: [ main ] + paths: + - 'benchmarks/**' + pull_request: + paths: + - 'benchmarks/**' + +jobs: + java: + name: Java/Gradle + runs-on: ubuntu-24.04 + strategy: + max-parallel: 4 + matrix: + java-version: [21, 23] + steps: + - uses: actions/checkout@v4 + with: + submodules: 'true' + + - name: Set up JDK + uses: actions/setup-java@v4 + with: + distribution: 'temurin' + java-version: | + 21 + ${{ matrix.java-version != '21' && matrix.java-version || '' }} + + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + + - name: Build & Check + run: | + cd benchmarks + ./gradlew testClasses assemble ${{ env.ADDITIONAL_GRADLE_OPTS }} check + + - name: Capture test results + uses: actions/upload-artifact@v4 + if: failure() + with: + name: test-results + path: | + **/build/reports/* + **/build/test-results/*