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 2020/12/04 07:52:46 UTC

[incubator-sedona] branch master updated: Use GitHub action to run CI (#491)

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 4ab1285  Use GitHub action to run CI (#491)
4ab1285 is described below

commit 4ab128526c9c1726a9d0fa99f59ac57bfd6652f9
Author: Jia Yu <ji...@apache.org>
AuthorDate: Thu Dec 3 23:51:33 2020 -0800

    Use GitHub action to run CI (#491)
    
    * Update GitHub action
    
    * Cache Maven package
    
    * Separate maven and python test
---
 .github/workflows/java.yml                  | 31 +++++++++++++++++++++++++++++
 .github/workflows/{maven.yml => python.yml} | 29 +++++++++++++--------------
 2 files changed, 45 insertions(+), 15 deletions(-)

diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml
new file mode 100644
index 0000000..c4ebefa
--- /dev/null
+++ b/.github/workflows/java.yml
@@ -0,0 +1,31 @@
+name: Scala and Java build
+
+on: [push, pull_request]
+
+jobs:
+  build:
+
+    runs-on: ubuntu-18.04
+
+    steps:
+    - uses: actions/checkout@v2
+    - uses: actions/setup-java@v1
+      with:
+        java-version: '8'
+    - name: Cache Maven packages
+      uses: actions/cache@v2
+      with:
+        path: ~/.m2
+        key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+        restore-keys: ${{ runner.os }}-m2
+    - run: git submodule update --init --recursive # Checkout Git submodule if necessary
+    - run: mvn -q clean install
+    - run: mkdir staging
+    - run: cp core/target/sedona-*.jar staging
+    - run: cp sql/target/sedona-*.jar staging
+    - run: cp viz/target/sedona-*.jar staging
+    - run: cp python-adapter/target/sedona-*.jar staging
+    - uses: actions/upload-artifact@v2
+      with:
+        name: Package
+        path: staging
diff --git a/.github/workflows/maven.yml b/.github/workflows/python.yml
similarity index 66%
rename from .github/workflows/maven.yml
rename to .github/workflows/python.yml
index 76f51b1..057bfce 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/python.yml
@@ -1,13 +1,6 @@
-# This workflow will build a Java project with Maven
-# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven
+name: Python build
 
-name: Continuous integration
-
-on:
-  push:
-    branches: [ master ]
-  pull_request:
-    branches: [ master ]
+on: [push, pull_request]
 
 jobs:
   build:
@@ -15,14 +8,21 @@ jobs:
     runs-on: ubuntu-18.04
 
     steps:
-    - uses: actions/checkout@master
-    - uses: textbook/git-checkout-submodule-action@master      
-    - uses: actions/setup-python@v2
-      with:
-        python-version: '3.7'
+    - uses: actions/checkout@v2
     - uses: actions/setup-java@v1
       with:
         java-version: '8'
+    - name: Cache Maven packages
+      uses: actions/cache@v2
+      with:
+        path: ~/.m2
+        key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
+        restore-keys: ${{ runner.os }}-m2
+    - run: git submodule update --init --recursive # Checkout Git submodule if necessary
+    - run: mvn -q clean install -DskipTests
+    - uses: actions/setup-python@v2
+      with:
+        python-version: '3.7'
     - uses: vemonet/setup-spark@v1
       with:
         spark-version: '3.0.1' # Exact version
@@ -33,6 +33,5 @@ jobs:
     - run: sudo pip3 install -U virtualenvwrapper
     - run: python3 -m pip install pipenv
     - run: (cd python;pipenv install --dev)
-    - run: mvn -q clean install
     - run: find python-adapter/target/ -iregex "python-adapter\/target\/sedona-python-adapter-[0-9]\.[0-9]\.[0-9]-incubator\(-SNAPSHOT\)?\.jar" -exec cp {} $SPARK_HOME/jars \;
     - run: (cd python;pipenv run pytest tests)