Skip to content

Commit

Permalink
chore(commons): basic adapt for commons migration
Browse files Browse the repository at this point in the history
  • Loading branch information
VGalaxies committed Aug 21, 2024
1 parent 459d441 commit b087f08
Show file tree
Hide file tree
Showing 40 changed files with 95 additions and 1,222 deletions.
3 changes: 2 additions & 1 deletion .asf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ github:
- 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
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "hugegraph-commons ci"
name: "HugeGraph-Commons CI"

on:
workflow_dispatch:
Expand All @@ -10,12 +10,16 @@ on:
pull_request:

jobs:
build:
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: ['8', '11']
JAVA_VERSION: ['11']

steps:
- name: Install JDK ${{ matrix.JAVA_VERSION }}
Expand All @@ -36,19 +40,23 @@ jobs:
with:
fetch-depth: 2

- name: License check(RAT)
- name: Use staged maven repo settings
if: ${{ env.USE_STAGE == 'true' }}
run: |
mvn apache-rat:check -ntp
find ./ -name rat.txt -print0 | xargs -0 -I file cat file > merged-rat.txt
grep "Binaries" merged-rat.txt -C 3 && cat merged-rat.txt
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 test
- name: Run common test
run: |
mvn test -pl hugegraph-commons/hugegraph-common -Dtest=UnitTestSuite
- name: Run rpc test
run: |
mvn test -Dtest=UnitTestSuite
mvn test -pl hugegraph-commons/hugegraph-rpc -Dtest=UnitTestSuite
- name: Upload coverage to Codecov
uses: codecov/[email protected]
Expand Down
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
6 changes: 4 additions & 2 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,13 @@ on:
pull_request:

jobs:
# TODO: rename to build-server later
build:
# 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
54 changes: 0 additions & 54 deletions hugegraph-commons/.asf.yaml

This file was deleted.

31 changes: 0 additions & 31 deletions hugegraph-commons/.editorconfig

This file was deleted.

8 changes: 0 additions & 8 deletions hugegraph-commons/.gitattributes

This file was deleted.

96 changes: 0 additions & 96 deletions hugegraph-commons/.github/ISSUE_TEMPLATE/bug_report.yml

This file was deleted.

7 changes: 0 additions & 7 deletions hugegraph-commons/.github/ISSUE_TEMPLATE/config.yml

This file was deleted.

Loading

0 comments on commit b087f08

Please sign in to comment.