-
Notifications
You must be signed in to change notification settings - Fork 169
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
build: Make the build system work out of box #136
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -51,11 +51,7 @@ runs: | |
shell: bash | ||
run: | | ||
cd common | ||
if [ $JAVA_VERSION == "1.8" ]; then | ||
../mvnw -B clean compile -DskipTests -Djava.version=${JAVA_VERSION} -Dspotless.version=2.29.0 | ||
else | ||
../mvnw -B clean compile -DskipTests -Djava.version=${JAVA_VERSION} | ||
fi | ||
../mvnw -B clean compile -DskipTests | ||
|
||
- name: Run Cargo test | ||
shell: bash | ||
|
@@ -64,9 +60,6 @@ runs: | |
# This is required to run some JNI related tests on the Rust side | ||
JAVA_LD_LIBRARY_PATH=$JAVA_HOME/lib/server:$JAVA_HOME/lib:$JAVA_HOME/lib/jli | ||
# special handing for java 1.8 for both linux and mac distributions | ||
advancedxy marked this conversation as resolved.
Show resolved
Hide resolved
|
||
if [ $JAVA_VERSION == "8" ]; then | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I wonder why this is no longer required There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Did some search. It looks like that upgrading to jni-rs 0.21 removes the need for explicit setting (DY)LD_LIBRARY_PATHs. See jni-rs/jni-rs#293 for related code change. First thing first, this test condition is wrong as we have changed the This line was added when I'm adding support for JDK 1.8 support. At the time of make all the tests running, the jni-rs was upgraded from 0.19 to 0.21. So my PR with these wrong and unnecessary lines passes. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. With Java11 the tests run without any LD_LIBRARY_PATH setting since the upgrade to jni-rs 0.21 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Cool, good to know! |
||
JAVA_LD_LIBRARY_PATH=$JAVA_HOME/jre/lib/amd64/server:$JAVA_HOME/jre/lib/amd64:$JAVA_HOME/jre/lib/amd64/jli:$JAVA_HOME/jre/lib/server:$JAVA_HOME/jre/lib:$JAVA_HOME/jre/lib/jli | ||
fi | ||
RUST_BACKTRACE=1 \ | ||
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$JAVA_LD_LIBRARY_PATH \ | ||
DYLD_LIBRARY_PATH=$DYLD_LIBRARY_PATH:$JAVA_LD_LIBRARY_PATH \ | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,8 +21,17 @@ all: core jvm | |
|
||
core: | ||
cd core && cargo build | ||
test-rust: | ||
# We need to compile CometException so that the cargo test can pass | ||
./mvnw compile -pl common -DskipTests $(PROFILES) | ||
cd core && cargo build && \ | ||
LD_LIBRARY_PATH=${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${JAVA_HOME}/lib:${JAVA_HOME}/lib/server:${JAVA_HOME}/lib/jli && \ | ||
DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH:+${DYLD_LIBRARY_PATH}:}${JAVA_HOME}/lib:${JAVA_HOME}/lib/server:${JAVA_HOME}/lib/jli \ | ||
RUST_BACKTRACE=1 cargo test | ||
jvm: | ||
./mvnw clean package -DskipTests $(PROFILES) | ||
test-jvm: core | ||
SPARK_HOME=`pwd` COMET_CONF_DIR=$(shell pwd)/conf RUST_BACKTRACE=1 ./mvnw verify $(PROFILES) | ||
test: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe we can update |
||
./mvnw clean | ||
# We need to compile CometException so that the cargo test can pass | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -492,9 +492,6 @@ under the License. | |
<spark.version>3.2.2</spark.version> | ||
<spark.version.short>3.2</spark.version.short> | ||
<parquet.version>1.12.0</parquet.version> | ||
<java.version>1.8</java.version> | ||
<maven.compiler.source>${java.version}</maven.compiler.source> | ||
<maven.compiler.target>${java.version}</maven.compiler.target> | ||
</properties> | ||
</profile> | ||
|
||
|
@@ -505,9 +502,6 @@ under the License. | |
<spark.version>3.3.2</spark.version> | ||
<spark.version.short>3.3</spark.version.short> | ||
<parquet.version>1.12.0</parquet.version> | ||
<java.version>11</java.version> | ||
<maven.compiler.source>${java.version}</maven.compiler.source> | ||
<maven.compiler.target>${java.version}</maven.compiler.target> | ||
</properties> | ||
</profile> | ||
|
||
|
@@ -517,9 +511,6 @@ under the License. | |
<scala.version>2.12.17</scala.version> | ||
<spark.version.short>3.4</spark.version.short> | ||
<parquet.version>1.13.1</parquet.version> | ||
<java.version>11</java.version> | ||
<maven.compiler.source>${java.version}</maven.compiler.source> | ||
<maven.compiler.target>${java.version}</maven.compiler.target> | ||
</properties> | ||
</profile> | ||
|
||
|
@@ -531,6 +522,43 @@ under the License. | |
</properties> | ||
</profile> | ||
|
||
<profile> | ||
<id>jdk1.8</id> | ||
<activation> | ||
<jdk>1.8</jdk> | ||
</activation> | ||
<properties> | ||
<java.version>1.8</java.version> | ||
<maven.compiler.source>${java.version}</maven.compiler.source> | ||
<maven.compiler.target>${java.version}</maven.compiler.target> | ||
<spotless.version>2.29.0</spotless.version> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 👍 |
||
</properties> | ||
</profile> | ||
|
||
<profile> | ||
<id>jdk11</id> | ||
<activation> | ||
<jdk>11</jdk> | ||
</activation> | ||
<properties> | ||
<java.version>11</java.version> | ||
<maven.compiler.source>${java.version}</maven.compiler.source> | ||
<maven.compiler.target>${java.version}</maven.compiler.target> | ||
</properties> | ||
</profile> | ||
|
||
<profile> | ||
<id>jdk17</id> | ||
<activation> | ||
<jdk>17</jdk> | ||
</activation> | ||
<properties> | ||
<java.version>17</java.version> | ||
<maven.compiler.source>${java.version}</maven.compiler.source> | ||
<maven.compiler.target>${java.version}</maven.compiler.target> | ||
</properties> | ||
</profile> | ||
|
||
<profile> | ||
<id>semanticdb</id> | ||
<properties> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rationale mentions 1.8, but it only works for 11 and 17