This is an automated email from the ASF dual-hosted git repository. pcongiusti pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel-k.git
The following commit(s) were added to refs/heads/main by this push: new 59149c032 feat(ci): Run specific action for java code 59149c032 is described below commit 59149c032ed0db064508ca003a865d6193303f78 Author: Gaelle Fournier <gaelle.fournier.w...@gmail.com> AuthorDate: Thu Jan 18 16:44:19 2024 +0100 feat(ci): Run specific action for java code * Add java-build workflow on /java and /config * Remove /java path from other workflows --- .github/actions/java-build/action.yml | 45 +++++++++++++++++++++++++++++ .github/workflows/build.yml | 2 ++ .github/workflows/builder.yml | 2 ++ .github/workflows/common.yml | 2 ++ .github/workflows/install.yml | 2 ++ .github/workflows/{build.yml => java.yml} | 47 +++++++++++-------------------- .github/workflows/knative.yml | 2 ++ .github/workflows/native.yml | 1 + .github/workflows/telemetry.yml | 2 ++ 9 files changed, 74 insertions(+), 31 deletions(-) diff --git a/.github/actions/java-build/action.yml b/.github/actions/java-build/action.yml new file mode 100644 index 000000000..14743f7ff --- /dev/null +++ b/.github/actions/java-build/action.yml @@ -0,0 +1,45 @@ +# --------------------------------------------------------------------------- +# 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: java-builder +description: "Build java modules" +inputs: + javaVersion: + description: "Java version" + required: true + javaDistribution: + description: "Java distribution" + required: true + +runs: + using: "composite" + steps: + - name: Set up JDK ${{ inputs.javaVersion }} + uses: actions/setup-java@v3 + with: + distribution: ${{ inputs.javaDistribution }} + java-version: ${{ inputs.javaVersion }} + - name: Build java/crds + working-directory: java/crds + shell: bash + run: | + mvn clean install + - name: Build java/maven-logging + working-directory: java/maven-logging + shell: bash + run: | + mvn clean install diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index eb9872181..0917b2006 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,6 +27,7 @@ on: - "release-*" paths-ignore: - 'docs/**' + - 'java/**' - 'proposals/**' - '**.adoc' - '**.md' @@ -39,6 +40,7 @@ on: - "release-*" paths-ignore: - 'docs/**' + - 'java/**' - 'proposals/**' - '**.md' - '**.adoc' diff --git a/.github/workflows/builder.yml b/.github/workflows/builder.yml index 759873174..e650cf7a4 100644 --- a/.github/workflows/builder.yml +++ b/.github/workflows/builder.yml @@ -27,6 +27,7 @@ on: - "release-*" paths-ignore: - 'docs/**' + - 'java/**' - 'proposals/**' - '**.adoc' - '**.md' @@ -39,6 +40,7 @@ on: - "release-*" paths-ignore: - 'docs/**' + - 'java/**' - 'proposals/**' - '**.adoc' - '**.md' diff --git a/.github/workflows/common.yml b/.github/workflows/common.yml index 627ea36e7..41ede9c0e 100644 --- a/.github/workflows/common.yml +++ b/.github/workflows/common.yml @@ -27,6 +27,7 @@ on: - "release-*" paths-ignore: - 'docs/**' + - 'java/**' - 'proposals/**' - '**.adoc' - '**.md' @@ -39,6 +40,7 @@ on: - "release-*" paths-ignore: - 'docs/**' + - 'java/**' - 'proposals/**' - '**.adoc' - '**.md' diff --git a/.github/workflows/install.yml b/.github/workflows/install.yml index 3575b29da..48858ad36 100644 --- a/.github/workflows/install.yml +++ b/.github/workflows/install.yml @@ -27,6 +27,7 @@ on: - "release-*" paths-ignore: - 'docs/**' + - 'java/**' - 'proposals/**' - '**.adoc' - '**.md' @@ -39,6 +40,7 @@ on: - "release-*" paths-ignore: - 'docs/**' + - 'java/**' - 'proposals/**' - '**.adoc' - '**.md' diff --git a/.github/workflows/build.yml b/.github/workflows/java.yml similarity index 64% copy from .github/workflows/build.yml copy to .github/workflows/java.yml index eb9872181..418e82bd4 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/java.yml @@ -15,7 +15,7 @@ # limitations under the License. # --------------------------------------------------------------------------- -name: build +name: java env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -25,28 +25,17 @@ on: branches: - main - "release-*" - paths-ignore: - - 'docs/**' - - 'proposals/**' - - '**.adoc' - - '**.md' - - 'KEYS' - - 'LICENSE' - - 'NOTICE' + paths: + - "java/**" + - "config/crd/**" push: branches: - main - "release-*" - paths-ignore: - - 'docs/**' - - 'proposals/**' - - '**.md' - - '**.adoc' - - 'KEYS' - - 'LICENSE' - - 'NOTICE' + paths: + - "java/**" + - "config/crd/**" workflow_dispatch: - inputs: concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} @@ -54,18 +43,14 @@ concurrency: jobs: build: - strategy: - matrix: - # TODO: test an all the supported OS - # [ubuntu-latest, macos-latest, windows-latest] - os: [ubuntu-latest] + runs-on: ubuntu-latest - runs-on: ${{ matrix.os }} steps: - - name: Checkout code - uses: actions/checkout@v3 - with: - persist-credentials: false - submodules: recursive - - name: Execute Build (make) - uses: ./.github/actions/e2e-build + - uses: actions/checkout@v4 + with: + persist-credentials: false + - name: Build java modules ${{ matrix.ref-branch }} branch + uses: ./.github/actions/java-build + with: + javaVersion: "17" + javaDistribution: "temurin" diff --git a/.github/workflows/knative.yml b/.github/workflows/knative.yml index 543c9e8a9..be0840b7b 100644 --- a/.github/workflows/knative.yml +++ b/.github/workflows/knative.yml @@ -27,6 +27,7 @@ on: - "release-*" paths-ignore: - 'docs/**' + - 'java/**' - 'proposals/**' - '**.adoc' - '**.md' @@ -39,6 +40,7 @@ on: - "release-*" paths-ignore: - 'docs/**' + - 'java/**' - 'proposals/**' - '**.adoc' - '**.md' diff --git a/.github/workflows/native.yml b/.github/workflows/native.yml index a8d5151e3..a57c7c640 100644 --- a/.github/workflows/native.yml +++ b/.github/workflows/native.yml @@ -32,6 +32,7 @@ on: - "release-*" paths-ignore: - 'docs/**' + - 'java/**' - 'proposals/**' - '**.adoc' - '**.md' diff --git a/.github/workflows/telemetry.yml b/.github/workflows/telemetry.yml index b930c19f6..02fea22b7 100644 --- a/.github/workflows/telemetry.yml +++ b/.github/workflows/telemetry.yml @@ -27,6 +27,7 @@ on: - "release-*" paths-ignore: - 'docs/**' + - 'java/**' - 'proposals/**' - '**.adoc' - '**.md' @@ -39,6 +40,7 @@ on: - "release-*" paths-ignore: - 'docs/**' + - 'java/**' - 'proposals/**' - '**.adoc' - '**.md'