Skip to content

Commit

Permalink
Merge branch 'apache:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
lizhimins committed Jan 13, 2023
2 parents 9dd3ee1 + 253a340 commit 3129dc7
Show file tree
Hide file tree
Showing 1,237 changed files with 111,593 additions and 9,653 deletions.
44 changes: 44 additions & 0 deletions .asf.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# 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.

github:
description: "Apache RocketMQ is a cloud native messaging and streaming platform, making it simple to build event-driven applications."
homepage: https://rocketmq.apache.org/
labels:
- messaging
- streaming
- eventing
- cloud-native
- rocketmq
- java
enabled_merge_buttons:
# Enable squash button
squash: true
# Disable merge button
merge: false
# Enable rebase button
rebase: true
protected_branches:
master: {}
develop:
required_pull_request_reviews:
dismiss_stale_reviews: true
require_code_owner_reviews: false
required_approving_review_count: 1
required_status_checks:
contexts:
- misspell-check
- check-license
- maven-compile (ubuntu-18.04, JDK-8)
73 changes: 73 additions & 0 deletions .bazelrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
#
# 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.
#
startup --host_jvm_args=-Xmx2g

run --color=yes

build --color=yes
build --enable_platform_specific_config

test --action_env=TEST_TMPDIR=/tmp

test --experimental_strict_java_deps=warn
build --experimental_strict_java_deps=warn


# This .bazelrc file contains all of the flags required for the provided
# toolchain with Remote Build Execution.
# Note your WORKSPACE must contain an rbe_autoconfig target with
# name="rbe_default" to use these flags as-is.

# Depending on how many machines are in the remote execution instance, setting
# this higher can make builds faster by allowing more jobs to run in parallel.
# Setting it too high can result in jobs that timeout, however, while waiting
# for a remote machine to execute them.
build:remote --jobs=150

# Set several flags related to specifying the platform, toolchain and java
# properties.
# These flags should only be used as is for the rbe-ubuntu16-04 container
# and need to be adapted to work with other toolchain containers.
build:remote --java_runtime_version=rbe_jdk
build:remote --tool_java_runtime_version=rbe_jdk
build:remote --extra_toolchains=@rbe_default//java:all

build:remote --crosstool_top=@rbe_default//cc:toolchain
build:remote --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1
# Platform flags:
# The toolchain container used for execution is defined in the target indicated
# by "extra_execution_platforms", "host_platform" and "platforms".
# More about platforms: https://docs.bazel.build/versions/master/platforms.html
build:remote --extra_toolchains=@rbe_default//config:cc-toolchain
build:remote --extra_execution_platforms=@rbe_default//config:platform
build:remote --host_platform=@rbe_default//config:platform
build:remote --platforms=@rbe_default//config:platform

# Starting with Bazel 0.27.0 strategies do not need to be explicitly
# defined. See https://github.com/bazelbuild/bazel/issues/7480
build:remote --define=EXECUTOR=remote

# Enable remote execution so actions are performed on the remote systems.
build:remote --remote_executor=grpcs://remote.buildbuddy.io

# Enforce stricter environment rules, which eliminates some non-hermetic
# behavior and therefore improves both the remote cache hit rate and the
# correctness and repeatability of the build.
build:remote --incompatible_strict_action_env=true

# Set a higher timeout value, just in case.
build:remote --remote_timeout=3600
1 change: 1 addition & 0 deletions .bazelversion
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5.2.0
22 changes: 22 additions & 0 deletions .github/workflows/bazel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Build and Run Tests by Bazel
on:
pull_request_target:
types: [opened, reopened, synchronize]
push:
branches:
- master
- develop
- bazel
jobs:
build:
name: "bazel-compile (${{ matrix.os }})"
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04]
steps:
- uses: actions/checkout@v2
- name: Build
run: bazel build --config=remote --remote_header=x-buildbuddy-api-key=${{ secrets.BUILD_BUDDY_API_KEY }} //...
- name: Run Tests
run: bazel test --config=remote --remote_header=x-buildbuddy-api-key=${{ secrets.BUILD_BUDDY_API_KEY }} //...
28 changes: 28 additions & 0 deletions .github/workflows/codeql_analysis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: CodeQL Analysis

on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches:
- master

jobs:
CodeQL-Build:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
with:
languages: java

- name: Autobuild
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
24 changes: 24 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Coverage
on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches: [master, develop]
jobs:
calculate-coverage:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Set up JDK 8
uses: actions/setup-java@v2
with:
java-version: "8"
distribution: "adopt"
cache: "maven"
- name: Generate coverage report
run: mvn -B test -T 2C --file pom.xml
- name: Upload to Codecov
uses: codecov/codecov-action@v3
with:
fail_ci_if_error: true
verbose: true
29 changes: 0 additions & 29 deletions .github/workflows/greetings.yml

This file was deleted.

1 change: 0 additions & 1 deletion .github/workflows/license-checker.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ on:
jobs:
check-license:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Check License Header
Expand Down
26 changes: 26 additions & 0 deletions .github/workflows/maven.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Build and Run Tests by Maven
on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches: [master, develop, bazel]
jobs:
java_build:
name: "maven-compile (${{ matrix.os }}, JDK-${{ matrix.jdk }})"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-18.04, windows-2022, macos-11]
jdk: [8]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up JDK ${{ matrix.jdk }}
uses: actions/setup-java@v2
with:
java-version: ${{ matrix.jdk }}
distribution: "adopt"
cache: "maven"
- name: Build with Maven
run: mvn -B package -T 2C --file pom.xml
17 changes: 17 additions & 0 deletions .github/workflows/misspell_check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
name: Misspell Check
on:
pull_request:
types: [opened, reopened, synchronize]
push:
branches: [master, develop]
jobs:
misspell-check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Install misspell
run: |
curl -L -o ./install-misspell.sh https://git.io/misspell
sh ./install-misspell.sh
- name: Run misspell
run: find . -type f -print0 | xargs -0 bin/misspell -error -i transfered,derivate
30 changes: 30 additions & 0 deletions .github/workflows/stale.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Close Stale Issues/PRs

permissions:
issues: write
pull-requests: write

on:
schedule:
- cron: "0 0 * * *"

jobs:
stale:
runs-on: ubuntu-latest
steps:
- uses: actions/stale@v5
with:
days-before-issue-stale: 365
days-before-issue-close: 3
exempt-issue-labels: "no stale"
stale-issue-label: "stale"
stale-issue-message: "This issue is stale because it has been open for 365 days with no activity. It will be closed in 3 days if no further activity occurs."
close-issue-message: "This issue was closed because it has been inactive for 3 days since being marked as stale."
remove-issue-stale-when-updated: true
days-before-pr-stale: 365
days-before-pr-close: 3
exempt-pr-labels: "no stale"
stale-pr-label: "stale"
stale-pr-message: "This PR is stale because it has been open for 365 days with no activity. It will be closed in 3 days if no further activity occurs. If you wish not to mark it as stale, please leave a comment in this PR."
close-pr-message: "This PR was closed because it has been inactive for 3 days since being marked as stale."
remove-pr-stale-when-updated: true
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,3 +13,8 @@ devenv
.DS_Store
localbin
nohup.out
bazel-out
bazel-bin
bazel-rocketmq
bazel-testlogs
.vscode
4 changes: 4 additions & 0 deletions .licenserc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,16 @@ header:
- 'src/test/**/*.log'
- '*/src/test/resources/META-INF/service/*'
- '*/src/main/resources/META-INF/service/*'
- '*/src/test/resources/rmq-proxy-home/conf/rmq-proxy.json'
- '*/src/test/resources/mockito-extensions/*'
- '**/target/**'
- '**/*.iml'
- 'docs/**'
- 'localbin/**'
- 'distribution/LICENSE-BIN'
- 'distribution/NOTICE-BIN'
- 'distribution/conf/rmq-proxy.json'
- '.bazelversion'


comment: on-failure
Loading

0 comments on commit 3129dc7

Please sign in to comment.