You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sedona.apache.org by ji...@apache.org on 2021/01/01 20:36:39 UTC

[incubator-sedona] branch master updated: Add the CI test for example projects (#504)

This is an automated email from the ASF dual-hosted git repository.

jiayu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-sedona.git


The following commit(s) were added to refs/heads/master by this push:
     new 746b08b  Add the CI test for example projects (#504)
746b08b is described below

commit 746b08b6624a9a491d4b75efda7061f6c7f68292
Author: Jia Yu <ji...@apache.org>
AuthorDate: Fri Jan 1 12:36:29 2021 -0800

    Add the CI test for example projects (#504)
    
    * Add the CI test for example projects
    
    * Cache sbt dependencies
    
    * Cache sbt dependencies
    
    * add this build
    
    * Install sbt by myself
    
    * Fix resolver
    
    * Fix resolver
    
    * Update build.sbt
---
 .github/workflows/example.yml                      | 27 ++++++++++++++++++++++
 examples/rdd-colocation-mining/build.sbt           | 19 ++++++++-------
 examples/rdd-colocation-mining/project/plugins.sbt |  2 +-
 examples/sql/build.sbt                             | 19 ++++++++-------
 examples/sql/project/plugins.sbt                   |  2 +-
 examples/viz/build.sbt                             | 15 ++++++------
 examples/viz/project/plugins.sbt                   |  2 +-
 7 files changed, 55 insertions(+), 31 deletions(-)

diff --git a/.github/workflows/example.yml b/.github/workflows/example.yml
new file mode 100644
index 0000000..c618157
--- /dev/null
+++ b/.github/workflows/example.yml
@@ -0,0 +1,27 @@
+name: Example project build
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+    branches:
+      - '*'
+      
+jobs:
+  build:
+
+    runs-on: ubuntu-18.04
+
+    steps:
+    - uses: actions/checkout@v2
+    - uses: olafurpg/setup-scala@v10
+    - name: Cache SBT
+      uses: actions/cache@v2
+      with:
+        path: | 
+          ~/.ivy2/cache
+          ~/.sbt
+        key: ${{ runner.os }}-sbt-${{ hashFiles('**/build.sbt') }}
+    - run: (cd examples/rdd-colocation-mining;sbt clean assembly;java -jar target/scala-2.12/*.jar)
+    - run: (cd examples/sql;sbt clean assembly;java -jar target/scala-2.12/*.jar)
+    - run: (cd examples/viz;sbt clean assembly;java -jar target/scala-2.12/*.jar)
diff --git a/examples/rdd-colocation-mining/build.sbt b/examples/rdd-colocation-mining/build.sbt
index a7aa4de..af27ab4 100644
--- a/examples/rdd-colocation-mining/build.sbt
+++ b/examples/rdd-colocation-mining/build.sbt
@@ -36,13 +36,13 @@ logLevel := Level.Warn
 logLevel in assembly := Level.Error
 
 libraryDependencies ++= Seq(
+  "com.fasterxml.jackson.core" % "jackson-databind" % jacksonVersion % dependencyScope,
+  "com.fasterxml.jackson.core" % "jackson-core" % jacksonVersion % dependencyScope,
   "org.apache.spark" %% "spark-core" % SparkVersion % dependencyScope exclude("org.apache.hadoop", "*"),
   "org.apache.spark" %% "spark-sql" % SparkVersion % dependencyScope exclude("org.apache.hadoop", "*"),
   "org.apache.hadoop" % "hadoop-mapreduce-client-core" % HadoopVersion % dependencyScope,
   "org.apache.hadoop" % "hadoop-common" % HadoopVersion % dependencyScope,
   "org.apache.hadoop" % "hadoop-hdfs" % HadoopVersion % dependencyScope,
-  "com.fasterxml.jackson.core" % "jackson-databind" % jacksonVersion % dependencyScope,
-  "com.fasterxml.jackson.core" % "jackson-core" % jacksonVersion % dependencyScope,
   "org.apache.sedona" % "sedona-core-".concat(SparkCompatibleVersion).concat("_").concat(ScalaCompatibleVersion) % SedonaVersion,
   "org.apache.sedona" % "sedona-sql-".concat(SparkCompatibleVersion).concat("_").concat(ScalaCompatibleVersion) % SedonaVersion ,
   "org.apache.sedona" % "sedona-viz-".concat(SparkCompatibleVersion).concat("_").concat(ScalaCompatibleVersion) % SedonaVersion,
@@ -52,23 +52,22 @@ libraryDependencies ++= Seq(
   "org.geotools" % "gt-main" % geotoolsVersion % "compile",
   "org.geotools" % "gt-referencing" % geotoolsVersion % "compile",
   "org.geotools" % "gt-epsg-hsql" % geotoolsVersion % "compile",
+  "javax.media" % "jai_core" % "1.1.3" % "compile" from "https://repo.osgeo.org/repository/release/javax/media/jai_core/1.1.3/jai_core-1.1.3.jar",
   "org.datasyslab" % "sernetcdf" % "0.1.0" % "compile" // Only needed if you read HDF files. Under Apache License 2.0
 )
 
 assemblyMergeStrategy in assembly := {
   case PathList("org.apache.sedona", "sedona-core", xs@_*) => MergeStrategy.first
   case PathList("META-INF", "MANIFEST.MF") => MergeStrategy.discard
+  case "META-INF/services" => MergeStrategy.last
   case path if path.endsWith(".SF") => MergeStrategy.discard
   case path if path.endsWith(".DSA") => MergeStrategy.discard
   case path if path.endsWith(".RSA") => MergeStrategy.discard
   case _ => MergeStrategy.first
 }
 
-resolvers +=
-  "Apache Software Foundation Snapshots" at "https://repository.apache.org/content/groups/snapshots"
-
-resolvers +=
-  "Open Source Geospatial Foundation Repository" at "https://repo.osgeo.org/repository/release/"
-
-resolvers +=
-  "Java.net repository" at "https://download.java.net/maven/2"
\ No newline at end of file
+resolvers ++= Seq(
+  "Open Source Geospatial Foundation Repository" at "https://repo.osgeo.org/repository/release/",
+  "Apache Software Foundation Snapshots" at "https://repository.apache.org/content/groups/snapshots",
+  "Java.net repository" at "https://download.java.net/maven/2"
+)
\ No newline at end of file
diff --git a/examples/rdd-colocation-mining/project/plugins.sbt b/examples/rdd-colocation-mining/project/plugins.sbt
index cc9a881..5b20505 100644
--- a/examples/rdd-colocation-mining/project/plugins.sbt
+++ b/examples/rdd-colocation-mining/project/plugins.sbt
@@ -1 +1 @@
-addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.5")
\ No newline at end of file
+addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.15.0")
\ No newline at end of file
diff --git a/examples/sql/build.sbt b/examples/sql/build.sbt
index ce31eb4..ccff320 100644
--- a/examples/sql/build.sbt
+++ b/examples/sql/build.sbt
@@ -36,13 +36,13 @@ logLevel := Level.Warn
 logLevel in assembly := Level.Error
 
 libraryDependencies ++= Seq(
+  "com.fasterxml.jackson.core" % "jackson-databind" % jacksonVersion % dependencyScope,
+  "com.fasterxml.jackson.core" % "jackson-core" % jacksonVersion % dependencyScope,
   "org.apache.spark" %% "spark-core" % SparkVersion % dependencyScope exclude("org.apache.hadoop", "*"),
   "org.apache.spark" %% "spark-sql" % SparkVersion % dependencyScope exclude("org.apache.hadoop", "*"),
   "org.apache.hadoop" % "hadoop-mapreduce-client-core" % HadoopVersion % dependencyScope,
   "org.apache.hadoop" % "hadoop-common" % HadoopVersion % dependencyScope,
   "org.apache.hadoop" % "hadoop-hdfs" % HadoopVersion % dependencyScope,
-  "com.fasterxml.jackson.core" % "jackson-databind" % jacksonVersion % dependencyScope,
-  "com.fasterxml.jackson.core" % "jackson-core" % jacksonVersion % dependencyScope,
   "org.apache.sedona" % "sedona-core-".concat(SparkCompatibleVersion).concat("_").concat(ScalaCompatibleVersion) % SedonaVersion,
   "org.apache.sedona" % "sedona-sql-".concat(SparkCompatibleVersion).concat("_").concat(ScalaCompatibleVersion) % SedonaVersion ,
   "org.apache.sedona" % "sedona-viz-".concat(SparkCompatibleVersion).concat("_").concat(ScalaCompatibleVersion) % SedonaVersion,
@@ -52,23 +52,22 @@ libraryDependencies ++= Seq(
   "org.geotools" % "gt-main" % geotoolsVersion % "compile",
   "org.geotools" % "gt-referencing" % geotoolsVersion % "compile",
   "org.geotools" % "gt-epsg-hsql" % geotoolsVersion % "compile",
+  "javax.media" % "jai_core" % "1.1.3" % "compile" from "https://repo.osgeo.org/repository/release/javax/media/jai_core/1.1.3/jai_core-1.1.3.jar",
   "org.datasyslab" % "sernetcdf" % "0.1.0" % "compile" // Only needed if you read HDF files. Under Apache License 2.0
 )
 
 assemblyMergeStrategy in assembly := {
   case PathList("org.apache.sedona", "sedona-core", xs@_*) => MergeStrategy.first
   case PathList("META-INF", "MANIFEST.MF") => MergeStrategy.discard
+  case "META-INF/services" => MergeStrategy.last
   case path if path.endsWith(".SF") => MergeStrategy.discard
   case path if path.endsWith(".DSA") => MergeStrategy.discard
   case path if path.endsWith(".RSA") => MergeStrategy.discard
   case _ => MergeStrategy.first
 }
 
-resolvers +=
-  "Apache Software Foundation Snapshots" at "https://repository.apache.org/content/groups/snapshots"
-
-resolvers +=
-  "Open Source Geospatial Foundation Repository" at "https://repo.osgeo.org/repository/release/"
-
-resolvers +=
-  "Java.net repository" at "https://download.java.net/maven/2"
\ No newline at end of file
+resolvers ++= Seq(
+  "Open Source Geospatial Foundation Repository" at "https://repo.osgeo.org/repository/release/",
+  "Apache Software Foundation Snapshots" at "https://repository.apache.org/content/groups/snapshots",
+  "Java.net repository" at "https://download.java.net/maven/2"
+)
\ No newline at end of file
diff --git a/examples/sql/project/plugins.sbt b/examples/sql/project/plugins.sbt
index cc9a881..5b20505 100644
--- a/examples/sql/project/plugins.sbt
+++ b/examples/sql/project/plugins.sbt
@@ -1 +1 @@
-addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.5")
\ No newline at end of file
+addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.15.0")
\ No newline at end of file
diff --git a/examples/viz/build.sbt b/examples/viz/build.sbt
index 2b47f06..3047d19 100644
--- a/examples/viz/build.sbt
+++ b/examples/viz/build.sbt
@@ -53,23 +53,22 @@ libraryDependencies ++= Seq(
   "org.geotools" % "gt-main" % geotoolsVersion % "compile",
   "org.geotools" % "gt-referencing" % geotoolsVersion % "compile",
   "org.geotools" % "gt-epsg-hsql" % geotoolsVersion % "compile",
+  "javax.media" % "jai_core" % "1.1.3" % "compile" from "https://repo.osgeo.org/repository/release/javax/media/jai_core/1.1.3/jai_core-1.1.3.jar",
   "org.datasyslab" % "sernetcdf" % "0.1.0" % "compile" // Only needed if you read HDF files. Under Apache License 2.0
 )
 
 assemblyMergeStrategy in assembly := {
   case PathList("org.apache.sedona", "sedona-core", xs@_*) => MergeStrategy.first
   case PathList("META-INF", "MANIFEST.MF") => MergeStrategy.discard
+  case "META-INF/services" => MergeStrategy.last
   case path if path.endsWith(".SF") => MergeStrategy.discard
   case path if path.endsWith(".DSA") => MergeStrategy.discard
   case path if path.endsWith(".RSA") => MergeStrategy.discard
   case _ => MergeStrategy.first
 }
 
-resolvers +=
-  "Apache Software Foundation Snapshots" at "https://repository.apache.org/content/groups/snapshots"
-
-resolvers +=
-  "Open Source Geospatial Foundation Repository" at "https://repo.osgeo.org/repository/release/"
-
-resolvers +=
-  "Java.net repository" at "https://download.java.net/maven/2"
\ No newline at end of file
+resolvers ++= Seq(
+  "Open Source Geospatial Foundation Repository" at "https://repo.osgeo.org/repository/release/",
+  "Apache Software Foundation Snapshots" at "https://repository.apache.org/content/groups/snapshots",
+  "Java.net repository" at "https://download.java.net/maven/2"
+)
\ No newline at end of file
diff --git a/examples/viz/project/plugins.sbt b/examples/viz/project/plugins.sbt
index cc9a881..5b20505 100644
--- a/examples/viz/project/plugins.sbt
+++ b/examples/viz/project/plugins.sbt
@@ -1 +1 @@
-addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.5")
\ No newline at end of file
+addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.15.0")
\ No newline at end of file