mirror of https://github.com/apache/nifi.git
320 lines
9.4 KiB
YAML
320 lines
9.4 KiB
YAML
# 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: ci-workflow
|
|
|
|
on: [push, pull_request]
|
|
|
|
env:
|
|
MAVEN_COMMAND: ./mvnw
|
|
MAVEN_COMMAND_WINDOWS: ./mvnw.cmd
|
|
DEFAULT_MAVEN_OPTS: >-
|
|
-Xmx4g
|
|
-XX:ReservedCodeCacheSize=1g
|
|
-XX:+UseG1GC
|
|
-Dorg.slf4j.simpleLogger.defaultLogLevel=WARN
|
|
-Daether.connector.http.retryHandler.count=5
|
|
-Daether.connector.http.connectionMaxTtl=30
|
|
COMPILE_MAVEN_OPTS: >-
|
|
-Xmx3g
|
|
-Daether.connector.http.retryHandler.count=5
|
|
-Daether.connector.http.connectionMaxTtl=30
|
|
MAVEN_COMPILE_COMMAND: >-
|
|
test-compile
|
|
--show-version
|
|
--no-snapshot-updates
|
|
--no-transfer-progress
|
|
--fail-fast
|
|
-pl -:minifi-c2-integration-tests
|
|
-pl -:minifi-integration-tests
|
|
-pl -:minifi-c2-assembly
|
|
-pl -:minifi-assembly
|
|
-pl -:nifi-assembly
|
|
-pl -:nifi-kafka-connector-assembly
|
|
-pl -:nifi-kafka-connector-tests
|
|
-pl -:nifi-toolkit-assembly
|
|
-pl -:nifi-registry-assembly
|
|
-pl -:nifi-registry-toolkit-assembly
|
|
-pl -:nifi-runtime-manifest
|
|
-pl -:nifi-runtime-manifest-test
|
|
-pl -:nifi-stateless-assembly
|
|
-pl -:nifi-stateless-processor-tests
|
|
-pl -:nifi-stateless-system-test-suite
|
|
-pl -:nifi-system-test-suite
|
|
-pl -:nifi-nar-provider-assembly
|
|
-pl -:nifi-py4j-integration-tests
|
|
-pl -:nifi-python-extensions-bundle
|
|
-P include-new-ui
|
|
MAVEN_VERIFY_COMMAND: >-
|
|
verify
|
|
--show-version
|
|
--no-snapshot-updates
|
|
--no-transfer-progress
|
|
--fail-fast
|
|
-D dir-only
|
|
MAVEN_BUILD_PROFILES: >-
|
|
-P skip-nifi-bin-assembly
|
|
-P include-new-ui
|
|
MAVEN_PROJECTS: >-
|
|
-pl -minifi/minifi-assembly
|
|
-pl -minifi/minifi-c2/minifi-c2-assembly
|
|
-pl -minifi/minifi-toolkit/minifi-toolkit-assembly
|
|
-pl -nifi-registry/nifi-registry-assembly
|
|
-pl -nifi-registry/nifi-registry-toolkit/nifi-registry-toolkit-assembly
|
|
-pl -nifi-stateless/nifi-stateless-assembly
|
|
-pl -nifi-toolkit/nifi-toolkit-assembly
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
permissions:
|
|
security-events: write
|
|
contents: read
|
|
|
|
jobs:
|
|
static-analysis:
|
|
timeout-minutes: 120
|
|
name: Static Analysis
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v4
|
|
- name: Cache Maven Modules
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
~/.m2/repository
|
|
# Cache Maven modules using a cache key different from setup-java steps
|
|
key: ${{ runner.os }}-maven-static-analysis-${{ hashFiles('**/pom.xml') }}
|
|
- name: Set up Java 21
|
|
uses: actions/setup-java@v3
|
|
with:
|
|
distribution: 'zulu'
|
|
java-version: '21'
|
|
- name: Maven Build
|
|
run: >
|
|
${{ env.MAVEN_COMMAND }}
|
|
validate
|
|
--no-snapshot-updates
|
|
--no-transfer-progress
|
|
--fail-fast
|
|
-P contrib-check
|
|
-P include-new-ui
|
|
- name: Initialize CodeQL
|
|
uses: github/codeql-action/init@v2
|
|
with:
|
|
languages: java
|
|
- name: Maven Compile
|
|
env:
|
|
MAVEN_OPTS: >-
|
|
${{ env.COMPILE_MAVEN_OPTS }}
|
|
run: >
|
|
${{ env.MAVEN_COMMAND }}
|
|
${{ env.MAVEN_COMPILE_COMMAND }}
|
|
- name: Perform CodeQL Analysis
|
|
uses: github/codeql-action/analyze@v2
|
|
|
|
ubuntu-build-en:
|
|
timeout-minutes: 120
|
|
runs-on: ubuntu-latest
|
|
name: Ubuntu Corretto JDK 21 EN
|
|
steps:
|
|
- name: System Information
|
|
run: |
|
|
hostname
|
|
cat /proc/cpuinfo
|
|
cat /proc/meminfo
|
|
df
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v4
|
|
- name: Cache Node Modules
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
~/.npm
|
|
**/node_modules
|
|
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
|
|
- name: Set up Java 21
|
|
uses: actions/setup-java@v3
|
|
with:
|
|
distribution: 'corretto'
|
|
java-version: '21'
|
|
cache: 'maven'
|
|
- name: Maven Compile
|
|
env:
|
|
MAVEN_OPTS: >-
|
|
${{ env.COMPILE_MAVEN_OPTS }}
|
|
run: >
|
|
${{ env.MAVEN_COMMAND }}
|
|
${{ env.MAVEN_COMPILE_COMMAND }}
|
|
- name: Maven Verify
|
|
env:
|
|
MAVEN_OPTS: >-
|
|
${{ env.DEFAULT_MAVEN_OPTS }}
|
|
run: >
|
|
${{ env.MAVEN_COMMAND }}
|
|
jacoco:prepare-agent
|
|
${{ env.MAVEN_VERIFY_COMMAND }}
|
|
${{ env.MAVEN_BUILD_PROFILES }}
|
|
-P report-code-coverage
|
|
${{ env.MAVEN_PROJECTS }}
|
|
- name: Codecov
|
|
uses: codecov/codecov-action@v3
|
|
with:
|
|
files: ./nifi-code-coverage/target/site/jacoco-aggregate/jacoco.xml
|
|
- name: Upload Test Reports
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: surefire-reports-ubuntu-21
|
|
path: |
|
|
./**/target/surefire-reports/*.txt
|
|
./**/target/surefire-reports/*.xml
|
|
retention-days: 3
|
|
if: failure()
|
|
- name: Post Disk Usage
|
|
run: df
|
|
if: ${{ always() }}
|
|
|
|
macos-build-jp:
|
|
timeout-minutes: 150
|
|
runs-on: macos-latest
|
|
name: MacOS Zulu JDK 21 JP
|
|
steps:
|
|
- name: System Information
|
|
run: |
|
|
hostname
|
|
top -l 1 | grep PhysMem
|
|
sysctl machdep.cpu
|
|
df
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v4
|
|
- name: Cache Node Modules
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
~/.npm
|
|
**/node_modules
|
|
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
|
|
- name: Set up Java 21
|
|
uses: actions/setup-java@v3
|
|
with:
|
|
distribution: 'zulu'
|
|
java-version: '21'
|
|
cache: 'maven'
|
|
- name: Maven Compile
|
|
env:
|
|
MAVEN_OPTS: >-
|
|
${{ env.COMPILE_MAVEN_OPTS }}
|
|
run: >
|
|
${{ env.MAVEN_COMMAND }}
|
|
${{ env.MAVEN_COMPILE_COMMAND }}
|
|
- name: Maven Verify
|
|
env:
|
|
NIFI_CI_LOCALE: >-
|
|
-Duser.language=ja
|
|
-Duser.country=JP
|
|
SUREFIRE_OPTS: >-
|
|
-Duser.language=ja
|
|
-Duser.country=JP
|
|
-Duser.region=JP
|
|
-Duser.timezone=Asia/Tokyo
|
|
MAVEN_OPTS: >-
|
|
${{ env.DEFAULT_MAVEN_OPTS }}
|
|
-DargLine=${env.SUREFIRE_OPTS}
|
|
run: >-
|
|
${{ env.MAVEN_COMMAND }}
|
|
${{ env.MAVEN_VERIFY_COMMAND }}
|
|
${{ env.MAVEN_BUILD_PROFILES }}
|
|
${{ env.MAVEN_PROJECTS }}
|
|
- name: Upload Test Reports
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: surefire-reports-macos-jp
|
|
path: |
|
|
./**/target/surefire-reports/*.txt
|
|
./**/target/surefire-reports/*.xml
|
|
retention-days: 3
|
|
if: failure()
|
|
- name: Post Disk Usage
|
|
run: df
|
|
if: ${{ always() }}
|
|
|
|
windows-build:
|
|
timeout-minutes: 150
|
|
runs-on: windows-latest
|
|
name: Windows Zulu JDK 21 FR
|
|
steps:
|
|
- name: System Information
|
|
run: |
|
|
systeminfo
|
|
df
|
|
- name: Setup Git
|
|
run: |
|
|
git config --global core.autocrlf false
|
|
git config --global core.longpaths true
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v4
|
|
- name: Cache Node Modules
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: |
|
|
~\AppData\npm-cache
|
|
**\node_modules
|
|
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
|
|
- name: Set up Java 21
|
|
uses: actions/setup-java@v3
|
|
with:
|
|
distribution: 'zulu'
|
|
java-version: '21'
|
|
cache: 'maven'
|
|
- name: Maven Compile
|
|
env:
|
|
MAVEN_OPTS: >-
|
|
${{ env.COMPILE_MAVEN_OPTS }}
|
|
run: >
|
|
${{ env.MAVEN_COMMAND_WINDOWS }}
|
|
${{ env.MAVEN_COMPILE_COMMAND }}
|
|
- name: Maven Verify
|
|
env:
|
|
NIFI_CI_LOCALE: >-
|
|
-Duser.language=fr
|
|
-Duser.country=FR
|
|
SUREFIRE_OPTS: >-
|
|
-Duser.language=fr
|
|
-Duser.country=FR
|
|
-Duser.region=FR
|
|
-Duser.timezone=Europe/Paris
|
|
MAVEN_OPTS: >-
|
|
${{ env.DEFAULT_MAVEN_OPTS }}
|
|
-DargLine=${env.SUREFIRE_OPTS}
|
|
run: >-
|
|
${{ env.MAVEN_COMMAND_WINDOWS }}
|
|
${{ env.MAVEN_VERIFY_COMMAND }}
|
|
${{ env.MAVEN_BUILD_PROFILES }}
|
|
${{ env.MAVEN_PROJECTS }}
|
|
- name: Upload Test Reports
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: surefire-reports-windows-fr
|
|
path: |
|
|
./**/target/surefire-reports/*.txt
|
|
./**/target/surefire-reports/*.xml
|
|
retention-days: 3
|
|
if: failure()
|
|
- name: Post Disk Usage
|
|
run: df
|
|
if: ${{ always() }}
|