Skip to content
Closed
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
6 changes: 2 additions & 4 deletions .github/workflows/ci-jdk11.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ jobs:
with:
java-version: '11'
distribution: 'temurin'
cache: maven

- name: Setup Protoc
uses: arduino/setup-protoc@v2
Expand All @@ -76,7 +77,4 @@ jobs:

# Current hive connector is incompatible with jdk11, implement 4.0.0+ hive version in later.
- name: Build and Test On JDK 11
run: |
test_modules="!geaflow/geaflow-dsl/geaflow-dsl-connector/geaflow-dsl-connector-hive,"
test_modules+="!geaflow/geaflow-dsl/geaflow-dsl-connector-tests"
mvn -B -e clean test -Pjdk11 -pl "${test_modules}" -Duser.timezone=Asia/Shanghai -Dlog4j.configuration="log4j.rootLogger=WARN, stdout"
run: make test-jdk11
6 changes: 3 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Print available memory
run: free -m
Expand All @@ -66,7 +66,7 @@ jobs:
run: sudo ln -sf /usr/share/zoneinfo/Asia/Shanghai /etc/localtime

- name: Set up JDK 8
uses: actions/setup-java@v3
uses: actions/setup-java@v4
with:
java-version: '8'
distribution: 'temurin'
Expand All @@ -78,4 +78,4 @@ jobs:
version: "21.7"

- name: Build and Test On JDK 8
run: mvn -B -e clean test -Pjdk8 -Duser.timezone=Asia/Shanghai -Dlog4j.configuration="log4j.rootLogger=WARN, stdout"
run: make test
50 changes: 50 additions & 0 deletions Makefile
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.
#

SHELL:=/bin/bash

# Log the running target
LOG_TARGET = echo -e "\033[0;32m==================> Running $@ ============> ... \033[0m"

.PHONY: all
all: build

.PHONY: build
build: ## Build the project
@$(LOG_TARGET)
mvn -B -e clean package -DskipTests -Duser.timezone=Asia/Shanghai

.PHONY: test
test: ## Run tests on JDK 8
@$(LOG_TARGET)
mvn -B -e clean test -Pjdk8 -Duser.timezone=Asia/Shanghai -Dlog4j.configuration="log4j.rootLogger=WARN, stdout"

.PHONY: test-jdk11
test-jdk11: ## Run tests on JDK 11 (excludes Hive connector)
@$(LOG_TARGET)
mvn -B -e clean test -Pjdk11 -pl "!geaflow/geaflow-dsl/geaflow-dsl-connector/geaflow-dsl-connector-hive,!geaflow/geaflow-dsl/geaflow-dsl-connector-tests" -Duser.timezone=Asia/Shanghai -Dlog4j.configuration="log4j.rootLogger=WARN, stdout"

.PHONY: checkstyle
checkstyle: ## Run checkstyle
@$(LOG_TARGET)
mvn checkstyle:check

.PHONY: help
help: ## Display this help
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n\nTargets:\n"} /^[a-zA-Z0-9_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 }' $(MAKEFILE_LIST)
Loading