diff --git a/.travis.yml b/.travis.yml index b802e22..408f1ee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,12 +1,17 @@ dist: trusty language: scala -scala: - - 2.11.8 git: depth: 3 jdk: - oraclejdk8 -script: "mvn test -B" + +matrix: + include: + - scala: 2.11.12 + script: "mvn test -B -Pscala-2.11" + + - scala: 2.12.12 + script: "mvn test -B -Pscala-2.12" # safelist branches: diff --git a/README.md b/README.md index abbd9ff..33406d4 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,9 @@ The implementation is based on [Spark Tensorflow Connector](https://github.com/t ## Including the library The artifacts are published to [bintray](https://bintray.com/linkedin/maven/spark-tfrecord) and [maven central](https://search.maven.org/search?q=spark-tfrecord) repositories. -Current releases were built with scala-2.11. -- Version 0.1.x is based on Spark 2.3. -- Version 0.2.x is based on Spark 3.0. +- Version 0.1.x targets Spark 2.3 and Scala 2.11 +- Version 0.2.x targets Spark 2.4 and both Scala 2.11 and 2.12 To use the package, please include the dependency as follows @@ -28,14 +27,13 @@ The library can be built with Maven 3.3.9 or newer as shown below: # Build Spark-TFRecord git clone https://github.com/linkedin/spark-tfrecord.git cd spark-tfrecord -mvn clean install +mvn -Pscala-2.11 clean install # One can specify the spark version and tensorflow hadoop version, for example -mvn clean install -Dspark.version=2.4.6 -Dtensorflow.hadoop.version=1.15.0 +mvn -Pscala-2.11 clean install -Dspark.version=2.4.6 -Dtensorflow.hadoop.version=1.15.0 # Or for building with Spark 3, use the following -mvn clean install -Dspark.version=3.0.0 -Dscala.binary.version=2.12 -Dscala.compiler.version=2.12.11 -Dscala.test.version=3.0.0 -# In this instance we would suggest changing the `` in the `pom.xml` to spark-tfrecord_2.12 +mvn -Pscala-2.12 clean install -Dspark.version=3.0.0 ``` ## Using Spark Shell diff --git a/pom.xml b/pom.xml index 9cc130f..c0b8298 100644 --- a/pom.xml +++ b/pom.xml @@ -4,9 +4,9 @@ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 com.linkedin.sparktfrecord - spark-tfrecord_2.11 + spark-tfrecord_${scala.binary.version} jar - 0.2.2 + 0.2.3 spark-tfrecord https://github.com/linkedin/spark-tfrecord TensorFlow TFRecord data source for Apache Spark @@ -28,13 +28,11 @@ UTF-8 3.2.2 - 2.11 - 2.11.8 1.0 - 2.2.6 + 3.0.8 + 2.4.6 3.0 1.8 - 2.4.6 4.11 1.15.0 @@ -87,7 +85,7 @@ incremental true - ${scala.compiler.version} + ${scala.version} false @@ -173,6 +171,20 @@ + + + org.spurint.maven.plugins + scala-cross-maven-plugin + 0.2.1 + + + rewrite-pom + + rewrite-pom + + + + @@ -223,6 +235,10 @@ + + org.spurint.maven.plugins + scala-cross-maven-plugin + @@ -321,6 +337,23 @@ + + + scala-2.11 + + 2.11 + 2.11.12 + + + + + scala-2.12 + + 2.12 + 2.12.12 + + +