Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/scripts/prepare-backend.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#!/bin/bash
# This script prepares the backend CI environment based on the specified backend type.
# It handles special build requirements for specific backends before invoking the
# standard installation script.
#
# Usage: prepare-backend.sh <backend_type>
# where <backend_type> is one of: memory, rocksdb, hbase, hstore, etc.
set -e

BACKEND=$1

echo "Preparing backend ci environment for $BACKEND..."

if [[ "$BACKEND" == "hstore" ]]; then
mvn package -U -Dmaven.javadoc.skip=true -Dmaven.test.skip=true -ntp
fi

$TRAVIS_DIR/install-backend.sh $BACKEND
jps -l
72 changes: 1 addition & 71 deletions .github/workflows/pd-store-ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: "HugeGraph-PD & Store & Hstore CI"
name: "HugeGraph-PD & Store CI"

on:
push:
Expand Down Expand Up @@ -146,73 +146,3 @@ jobs:
uses: codecov/codecov-action@v3.0.0
with:
file: ${{ env.REPORT_DIR }}/*.xml

hstore:
# TODO: avoid duplicated env setup
runs-on: ubuntu-latest
env:
USE_STAGE: 'false' # Whether to include the stage repository.
TRAVIS_DIR: hugegraph-server/hugegraph-dist/src/assembly/travis
REPORT_DIR: target/site/jacoco
BACKEND: hstore
RELEASE_BRANCH: ${{ startsWith(github.ref_name, 'release-') || startsWith(github.ref_name, 'test-') || startsWith(github.base_ref, 'release-') }}

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@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
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: Prepare env and service
run: |
$TRAVIS_DIR/install-backend.sh $BACKEND

- name: Run unit test
run: |
$TRAVIS_DIR/run-unit-test.sh $BACKEND

- name: Run core test
run: |
$TRAVIS_DIR/run-core-test.sh $BACKEND

- name: Run api test
run: |
$TRAVIS_DIR/run-api-test.sh $BACKEND $REPORT_DIR

- name: Run raft test
if: ${{ env.BACKEND == 'rocksdb' }}
run: |
$TRAVIS_DIR/run-api-test-for-raft.sh $BACKEND $REPORT_DIR

- name: Run TinkerPop test
if: ${{ env.RELEASE_BRANCH == 'true' }}
run: |
$TRAVIS_DIR/run-tinkerpop-test.sh $BACKEND tinkerpop

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3.0.0
with:
file: ${{ env.REPORT_DIR }}/*.xml
12 changes: 6 additions & 6 deletions .github/workflows/server-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,13 @@ jobs:
HEAD_BRANCH_NAME: ${{ github.head_ref }}
BASE_BRANCH_NAME: ${{ github.base_ref }}
TARGET_BRANCH_NAME: ${{ github.base_ref != '' && github.base_ref || github.ref_name }}
RELEASE_BRANCH: ${{ startsWith(github.ref_name, 'release-') || startsWith(github.ref_name, 'test-') }}
RELEASE_BRANCH: ${{ startsWith(github.ref_name, 'release-') || startsWith(github.ref_name, 'test-') || startsWith(github.base_ref, 'release-') }}
RAFT_MODE: ${{ startsWith(github.head_ref, 'test') || startsWith(github.head_ref, 'raft') }}

strategy:
fail-fast: false
matrix:
BACKEND: [ memory, rocksdb, hbase ]
BACKEND: [ memory, rocksdb, hbase, hstore ]
JAVA_VERSION: [ '11' ]

steps:
Expand All @@ -43,10 +43,6 @@ jobs:
java-version: '8'
distribution: 'zulu'

- name: Prepare backend environment
run: |
$TRAVIS_DIR/install-backend.sh $BACKEND && jps -l

Comment on lines -46 to -49
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WARN: Be careful, the order is important due to HBase 2.x used java8 (maybe we could upgrade it to Java11
compatible version)

- name: Install Java ${{ matrix.JAVA_VERSION }}
uses: actions/setup-java@v4
with:
Expand All @@ -70,6 +66,10 @@ jobs:
run: |
mvn clean compile -U -Dmaven.javadoc.skip=true -ntp

- name: Prepare backend unique environment
run: |
bash .github/scripts/prepare-backend.sh $BACKEND

- name: Run unit test
run: |
$TRAVIS_DIR/run-unit-test.sh $BACKEND
Expand Down
Loading