Skip to content

Commit

Permalink
Merge branch 'master' into fix-2627
Browse files Browse the repository at this point in the history
  • Loading branch information
imbajin authored Oct 24, 2024
2 parents dd2549e + 0cb6115 commit a0941ae
Show file tree
Hide file tree
Showing 443 changed files with 40,629 additions and 971 deletions.
7 changes: 4 additions & 3 deletions .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,15 @@ github:
protected_branches:
master:
required_status_checks:
# strict means "Require branches to be up-to-date before merging". (TODO: turnoff when branch is stable)
strict: true
# strict means "Require PR to be up-to-date before merging". (enable when branch unstable)
strict: false
# contexts are the names of checks that must pass (now only enable the basic check)
contexts:
- Analyze (java)
- CodeQL
- check-license
- build (memory, 11)
- build-server (memory, 11)
- build-commons (11)
required_pull_request_reviews:
dismiss_stale_reviews: true
require_code_owner_reviews: false
Expand Down
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,5 @@ hugegraph-store/hg-store-dist/src/assembly/static/bin/libjemalloc_aarch64.so exp
.github/ export-ignore
.idea/ export-ignore
install-dist/scripts/ export-ignore
hugegraph-commons/hugegraph-dist/ export-ignore
docker/ export-ignore
2 changes: 1 addition & 1 deletion .github/workflows/check-dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:
- name: mvn install
run: |
mvn install -DskipTests=true -ntp
mvn install -Dmaven.test.skip=true -ntp
- name: generate current dependencies
run: |
bash $SCRIPT_DEPENDENCY/regenerate_known_dependencies.sh current-dependencies.txt
Expand Down
52 changes: 52 additions & 0 deletions .github/workflows/cluster-test-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "Cluster Test CI"

on:
push:
branches:
- master
- 'release-*'
- 'test-*'
pull_request:

jobs:
cluster-test:
runs-on: ubuntu-latest
env:
USE_STAGE: 'true' # Whether to include the stage repository.

steps:
- name: Install JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'zulu'

- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 5

- name: use staged maven repo settings
if: ${{ env.USE_STAGE == 'true' }}
run: |
cp $HOME/.m2/settings.xml /tmp/settings.xml
mv -vf .github/configs/settings.xml $HOME/.m2/settings.xml
- name: Package
run: |
mvn clean package -U -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -ntp
- name: Run simple cluster test
run: |
mvn test -pl hugegraph-cluster-test/hugegraph-clustertest-test -am -P simple-cluster-test -DskipCommonsTests=true
- name: Run multi cluster test
run: |
mvn test -pl hugegraph-cluster-test/hugegraph-clustertest-test -am -P multi-cluster-test -DskipCommonsTests=true
64 changes: 64 additions & 0 deletions .github/workflows/commons-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: "HugeGraph-Commons CI"

on:
workflow_dispatch:
push:
branches:
- master
- /^release-.*$/
- /^test-.*$/
pull_request:

jobs:
build-commons:
runs-on: ubuntu-latest
env:
# TODO: reset use stage to false later
USE_STAGE: 'true' # Whether to include the stage repository.

strategy:
fail-fast: false
matrix:
JAVA_VERSION: ['11']

steps:
- name: Install JDK ${{ matrix.JAVA_VERSION }}
uses: actions/setup-java@v3
with:
java-version: ${{ matrix.JAVA_VERSION }}
distribution: 'zulu'

- name: Cache Maven packages
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 2

- name: Use staged maven repo settings
if: ${{ env.USE_STAGE == 'true' }}
run: |
cp $HOME/.m2/settings.xml /tmp/settings.xml
cp -vf .github/configs/settings.xml $HOME/.m2/settings.xml && cat $HOME/.m2/settings.xml
- name: Compile
run: |
mvn compile -Dmaven.javadoc.skip=true -ntp
- name: Run common test
run: |
mvn test -pl hugegraph-commons/hugegraph-common -Dtest=UnitTestSuite -DskipCommonsTests=false
- name: Run rpc test
run: |
mvn test -pl hugegraph-commons/hugegraph-rpc -Dtest=UnitTestSuite -DskipCommonsTests=false
- name: Upload coverage to Codecov
uses: codecov/[email protected]
with:
file: target/jacoco.xml
27 changes: 14 additions & 13 deletions .github/workflows/pd-store-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Graph PD & Store & Hstore CI"
name: "HugeGraph-PD & Store & Hstore CI"

on:
push:
Expand All @@ -14,7 +14,8 @@ jobs:
runs-on: ubuntu-latest
env:
# TODO: avoid duplicated env setup in pd & store
USE_STAGE: 'false' # Whether to include the stage repository.
# TODO: reset use stage to false later
USE_STAGE: 'true' # Whether to include the stage repository.
# TODO: remove outdated env
TRAVIS_DIR: hugegraph-server/hugegraph-dist/src/assembly/travis
REPORT_DIR: target/site/jacoco
Expand Down Expand Up @@ -46,11 +47,11 @@ jobs:
- name: Run common test
run: |
mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-common-test
mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-common-test -DskipCommonsTests=true
- name: Run core test
run: |
mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-core-test
mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-core-test -DskipCommonsTests=true
# The above tests do not require starting a PD instance.

Expand All @@ -64,11 +65,11 @@ jobs:
- name: Run client test
run: |
mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-client-test
mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-client-test -DskipCommonsTests=true
- name: Run rest test
run: |
mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-rest-test
mvn test -pl hugegraph-pd/hg-pd-test -am -P pd-rest-test -DskipCommonsTests=true
- name: Upload coverage to Codecov
uses: codecov/[email protected]
Expand All @@ -79,7 +80,7 @@ jobs:
# TODO: avoid duplicated env setup
runs-on: ubuntu-latest
env:
USE_STAGE: 'false' # Whether to include the stage repository.
USE_STAGE: 'true' # Whether to include the stage repository.
# TODO: remove outdated env
TRAVIS_DIR: hugegraph-server/hugegraph-dist/src/assembly/travis
REPORT_DIR: target/site/jacoco
Expand Down Expand Up @@ -120,27 +121,27 @@ jobs:
- name: Run common test
run: |
mvn test -pl hugegraph-store/hg-store-test -am -P store-common-test
mvn test -pl hugegraph-store/hg-store-test -am -P store-common-test -DskipCommonsTests=true
- name: Run client test
run: |
mvn test -pl hugegraph-store/hg-store-test -am -P store-client-test
mvn test -pl hugegraph-store/hg-store-test -am -P store-client-test -DskipCommonsTests=true
- name: Run core test
run: |
mvn test -pl hugegraph-store/hg-store-test -am -P store-core-test
mvn test -pl hugegraph-store/hg-store-test -am -P store-core-test -DskipCommonsTests=true
- name: Run rocksdb test
run: |
mvn test -pl hugegraph-store/hg-store-test -am -P store-rocksdb-test
mvn test -pl hugegraph-store/hg-store-test -am -P store-rocksdb-test -DskipCommonsTests=true
- name: Run server test
run: |
mvn test -pl hugegraph-store/hg-store-test -am -P store-server-test
mvn test -pl hugegraph-store/hg-store-test -am -P store-server-test -DskipCommonsTests=true
- name: Run raft-core test
run: |
mvn test -pl hugegraph-store/hg-store-test -am -P store-raftcore-test
mvn test -pl hugegraph-store/hg-store-test -am -P store-raftcore-test -DskipCommonsTests=true
- name: Upload coverage to Codecov
uses: codecov/[email protected]
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/server-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "Graph Server CI"
name: "HugeGraph-Server CI"

on:
push:
Expand All @@ -9,11 +9,12 @@ on:
pull_request:

jobs:
build:
build-server:
# TODO: we need test & replace it to ubuntu-24.04 or ubuntu-latest
runs-on: ubuntu-20.04
env:
USE_STAGE: 'false' # Whether to include the stage repository.
# TODO: reset use stage to false later
USE_STAGE: 'true' # Whether to include the stage repository.
TRAVIS_DIR: hugegraph-server/hugegraph-dist/src/assembly/travis
REPORT_DIR: target/site/jacoco
BACKEND: ${{ matrix.BACKEND }}
Expand Down
2 changes: 1 addition & 1 deletion BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Required:
* Java 11
* Maven 3.5+

To build without executing tests: `mvn clean package -DskipTests`
To build without executing tests: `mvn clean package -Dmaven.test.skip=true`

## Building in IDEA

Expand Down
78 changes: 78 additions & 0 deletions hugegraph-cluster-test/hugegraph-clustertest-dist/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ 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.
-->

<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://maven.apache.org/POM/4.0.0"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.hugegraph</groupId>
<artifactId>hugegraph-cluster-test</artifactId>
<version>${revision}</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>hugegraph-clustertest-dist</artifactId>

<properties>
<dist.dir>${project.parent.basedir}</dist.dir>
<shell-executable>bash</shell-executable>
<assembly.dir>${project.basedir}/src/assembly</assembly.dir>
<assembly.descriptor.dir>${assembly.dir}/descriptor</assembly.descriptor.dir>
<assembly.static.dir>${assembly.dir}/static</assembly.static.dir>
<executable.jar.name>hg-ct</executable.jar.name>
</properties>

<build>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>assembly-hugegraph-ct</id>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
<configuration>
<attach>false</attach>
<appendAssemblyId>false</appendAssemblyId>
<outputDirectory>${dist.dir}</outputDirectory>
<descriptors>
<descriptor>
${assembly.descriptor.dir}/assembly.xml
</descriptor>
</descriptors>
<finalName>${final.name}</finalName>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>org.apache.hugegraph</groupId>
<artifactId>hugegraph-clustertest-minicluster</artifactId>
<version>${revision}</version>
</dependency>
</dependencies>

</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<!--
~ 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.
-->

<assembly>
<id>distribution</id>
<includeBaseDirectory>false</includeBaseDirectory>

<formats>
<format>dir</format>
</formats>

<fileSets>
<fileSet>
<directory>${assembly.static.dir}</directory>
<outputDirectory>/</outputDirectory>
<includes>
<include>**/*</include>
</includes>
</fileSet>

</fileSets>

<dependencySets>
<!-- code jars -->
<dependencySet>
<outputDirectory>/lib</outputDirectory>
<unpack>false</unpack>
<scope>runtime</scope>
<useProjectArtifact>false</useProjectArtifact>
<includes>
<include>org.apache.hugegraph:${executable.jar.name}:jar:*</include>
</includes>
</dependencySet>
</dependencySets>

</assembly>
Loading

0 comments on commit a0941ae

Please sign in to comment.